#1 2018-11-18 06:36:10

jogibjorn
Trusted Member
Registered: 2018-11-17
Posts: 29

Problems with getting OpenVPN working - not sure if Tun/Tap is enabled

I have used to following steps to set up OpenVPN on my NAT VPS server.

1. Ticked "Enable Tun/Tap" in the VPS configuration.

2. Restarted VPS

3. ALLOWED one of my assigned NAT ports 1234 (example) in UFW

4. Downloaded and ran the OpenVPN scgript from Github (wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh)
- During installation I used the following:
- Which port do you want for OpenVPN? 1234
- OpenVPN listening on: my private IP address
- External IP: 185.x.x.x

5. Created VPN client

The command line  shows that:

Nov 18 01:11:39 xxxx systemd[1]: Starting OpenVPN connection to server...
Nov 18 01:11:39 xxx.xx ovpn-server[973]: OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 201
Nov 18 01:11:39 xxx.xx ovpn-server[973]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Nov 18 01:11:39 xxx.xx ovpn-server[973]: daemon() failed or unsupported: Resource temporarily unavailable (errno=11)
Nov 18 01:11:39 xxx.xx ovpn-server[973]: Exiting due to fatal error
Nov 18 01:11:39 xxx.xx systemd[1]: [email protected]: Control process exited, code=exited status=1
Nov 18 01:11:39 xxx.xx systemd[1]: Failed to start OpenVPN connection to server.
Nov 18 01:11:39 xxx.xx systemd[1]: [email protected]: Unit entered failed state.
Nov 18 01:11:39 xxx.xx systemd[1]: [email protected]: Failed with result 'exit-code'.

It seems that Tun0 is not available?

Suggestions of why OpenVPN isn't available?

Last edited by jogibjorn (2018-11-18 06:36:46)

Offline

#2 2018-11-18 06:41:26

mikho
Low End Mod
From: Hell and gore == Sweden
Registered: 2013-03-02
Posts: 1,719
Website

Re: Problems with getting OpenVPN working - not sure if Tun/Tap is enabled

Have you tried another dist?

Offline

#3 2018-11-18 06:50:04

jogibjorn
Trusted Member
Registered: 2018-11-17
Posts: 29

Re: Problems with getting OpenVPN working - not sure if Tun/Tap is enabled

Am using Ubuntu 16, which is usually pretty reliable, and would hate to have reconfigure a new server again. Is there any way to check that the "Enable Tun0" is actually taking effect?

Offline

#4 2018-11-18 07:13:15

jogibjorn
Trusted Member
Registered: 2018-11-17
Posts: 29

Re: Problems with getting OpenVPN working - not sure if Tun/Tap is enabled

After commenting out the LimitNPROC line in /lib/systemd/system/[email protected], the OpenVPN service now starts OK, but I am still unable to make a connection.

Nov 18 02:07:53 xxx.xx ovpn-server[2896]: /sbin/ip addr add dev tun0 10.8.0.1/24 broadcast 10.8.0.255
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: GID set to nogroup
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: UID set to nobody
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: UDPv4 link local (bound): [undef]
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: UDPv4 link remote: [undef]
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: MULTI: multi_init called, r=256 v=256
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: IFCONFIG POOL: base=10.8.0.2 size=252, ipv6=0
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: IFCONFIG POOL LIST
Nov 18 02:07:53 xxx.xx ovpn-server[2896]: Initialization Sequence Completed
Nov 18 02:09:58 xxx.xx systemd[1]: Started OpenVPN connection to server.

netstat shows:
[email protected]:~$ sudo netstat -ltnup | grep xx01
udp        0      0 0.0.0.0:xx01            0.0.0.0:*                           5647/openvpn

Last edited by jogibjorn (2018-11-18 08:02:19)

Offline

#5 2018-11-18 08:06:21

jogibjorn
Trusted Member
Registered: 2018-11-17
Posts: 29

Re: Problems with getting OpenVPN working - not sure if Tun/Tap is enabled

I finally got it working by:

sudo systemctl enable [email protected]
sudo systemctl start [email protected]

The problem was with the LimitNPROC line.

Solution was uncommenting the line.

Offline

#6 2018-11-18 09:01:59

WSS
Trusted Member
Registered: 2016-12-22
Posts: 451

Re: Problems with getting OpenVPN working - not sure if Tun/Tap is enabled

Solution is removing systemd.


RbyeR4Nm.png

Offline

Board footer

Powered by FluxBB