OPNsense Forum

English Forums => General Discussion => Topic started by: Tripple_Delta on November 20, 2016, 09:32:21 pm

Title: OpenVPN
Post by: Tripple_Delta on November 20, 2016, 09:32:21 pm
I'm trying for weeks to connect my Mint Linux laptop to my OPNsense box with OpenVPN with no luck.

I've been following this tutorial: https://www.kirkg.us/posts/building-an-openvpn-server-with-opnsense/ (https://www.kirkg.us/posts/building-an-openvpn-server-with-opnsense/)

This is the last error I see in /var/log/openvpn.log:
Nov 20 21:21:08 firewall openvpn[44222]: TLS Error: cannot locate HMAC in incoming packet from [AF_INET]

Any idea where I make a mistake?
Title: Re: OpenVPN
Post by: fabian on November 21, 2016, 06:43:34 am
HMAC is usually calculated using a digest algorithm like SHA-256. You may have a mismatch there.
Title: Re: OpenVPN
Post by: Tripple_Delta on November 21, 2016, 05:45:02 pm
Maybe I should start with the first problem.
When I try to import the exported files (.ovpn, .p12 and .key) I get this error:
The file "...." could not be read or does not contain recognized VPN information.
Error: unknown error

Title: Re: OpenVPN
Post by: fabian on November 21, 2016, 09:00:03 pm
you should try to run it on the command line: openvpn config.ovpn
Title: Re: OpenVPN
Post by: Tripple_Delta on November 22, 2016, 08:53:55 pm
Almost there. Works with iPhone and iPad. This is the error on my linux laptop:
Tue Nov 22 20:40:30 2016 ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
Tue Nov 22 20:40:30 2016 Exiting due to fatal error

Any ideas?
Title: Re: OpenVPN
Post by: Tripple_Delta on November 22, 2016, 09:42:44 pm
Fixed.  :)
I needed sudo

This method is new to me. Maybe someone can point me in the right direction what's next.
The commond line seems to hang but it looks like that is the point where I have a working VPN connection. Is there a way to save this setup or do I always have to do it like this?
Title: Re: OpenVPN
Post by: fabian on November 23, 2016, 04:10:39 pm
You can start the connection via systemd or NetworkManager on Linux. NetworkManager offers you the possibility to import your configuration.
Title: Re: OpenVPN
Post by: Tripple_Delta on November 23, 2016, 04:42:56 pm
That's where things go wrong. I'm unable to import. I get an error.
Title: Re: OpenVPN
Post by: fabian on November 23, 2016, 06:19:30 pm
On my computer I can import *.ovpn files. I use files in pem format for the key and the certificates. Maybe it is because of your p12 file.
Title: Re: OpenVPN
Post by: Tripple_Delta on November 23, 2016, 09:43:32 pm
Could be, but I don't see an option what to export in the archive file.