0
sudo openvpn --auth-nocache --config Downloads/ubuntu.ovpn 
[sudo] password for chris: 
Fri Dec 15 09:34:04 2017 OpenVPN 2.4.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul  3 2017
Fri Dec 15 09:34:04 2017 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Fri Dec 15 09:34:05 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]81.153.56.141:1194
Fri Dec 15 09:34:05 2017 UDP link local: (not bound)
Fri Dec 15 09:34:05 2017 UDP link remote: [AF_INET]81.153.56.141:1194
Fri Dec 15 09:34:08 2017 [server] Peer Connection Initiated with [AF_INET]81.153.56.141:1194
Fri Dec 15 09:34:09 2017 TUN/TAP device tun0 opened
Fri Dec 15 09:34:09 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Fri Dec 15 09:34:09 2017 /sbin/ip link set dev tun0 up mtu 1500
Fri Dec 15 09:34:09 2017 /sbin/ip addr add dev tun0 10.8.0.4/24 broadcast 10.8.0.255
Fri Dec 15 09:34:09 2017 Initialization Sequence Completed

The config works fine on Android, Windows, and Mac so I presume it's an issue with Ubuntu 17.10

Is there a reason it's not working? Here's the server config;

dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/server.crt
key /etc/openvpn/easy-rsa/pki/private/server.key
dh /etc/openvpn/easy-rsa/pki/dh4096.pem
topology subnet
server 10.8.0.0 255.255.255.0
# server and remote endpoints
# ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
# push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OPenVPN Subnet
# push "route 10.8.0.0 255.255.255.0"
# your local subnet
# push "route 0.0.0.0 "
# Set your primary domain name server address for clients
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
duplicate-cn
keepalive 10 120
tls-version-min 1.2
tls-auth /etc/openvpn/easy-rsa/pki/ta.key 0
cipher AES-256-CBC
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
log /var/log/openvpn.log
verb 1 

However I cannot connect to to any servers or services e.g 192.168.1.100:6789 this IP works from all other devices, Android, Mac & Windows, just not Linux

1
  • Could you show your OpenVPN server configuration? Dec 9, 2017 at 16:31

2 Answers 2

0

I think this is just a syntax error. Linux does not like this part - ifconfig 10.8.0.1 10.8.0.2 - push "route 10.8.0.1 255.255.255.255"
If you remove that from the server config I think it will work

1
  • I have done that and restarted the server. I get the same result
    – eekfonky
    Dec 15, 2017 at 8:12
0

I'm not so sure, but I think you don't need to push route to Sever and local subnet. (push "route 10.8.0.1 255.255.255.255" and push "route 10.8.0.0 255.255.255.0") You have topology subnet, and server 10.8.0.0 255.255.255.0 This will give routes to your client without pushing it. Try to comment this two lines.

4
  • see above for edited response
    – eekfonky
    Dec 15, 2017 at 9:44
  • On your configuration, and question you didn't mention this subnet 192.168.1.100 From where this address come? Is this local address behind vpn? then push to clients in configuration this subnet! Dec 15, 2017 at 9:57
  • It's just a server in the network. This and 2 others all work fine once I'm connected on all other devices. Android, Mac and Windows
    – eekfonky
    Dec 15, 2017 at 9:59
  • Check on Ubuntu your routes. Where points default route? Probably you have two default routes with different metric, and Ubuntu don't use one from vpn. Dec 15, 2017 at 10:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .