I'm not particularly new to OpenVPN but it used to work fine for me ever since.
However, I'm now running into trouble.
I've setup a OpenVPN server on an OpenWRT router with this config:
Code: Select all
mode server
tls-server
### network options
port 1194
proto udp
dev tun
### Certificate and key files
ca /etc/easy-rsa/keys/ca.crt
cert /etc/easy-rsa/keys/server.crt
key /etc/easy-rsa/keys/server.key
dh /etc/easy-rsa/keys/dh1024.pem
server 10.0.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.23" # Change this to your router's LAN IP Address
client-to-client
### (optional) compression (Can be slow)
comp-lzo
persist-key
persist-tun
verb 3
keepalive 10 120
log-append /var/log/openvpn/openvpn.log
Code: Select all
client
dev tun
proto udp
remote XXXX.dyndns.tv 1194
resolv-retry infinite
nobind
;user nobody
;group nogroup
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 5
float
When I try to establish the tunnel from the command line, I somehow get double entries in the routing table.
This is the routing table when using networkmanager:
Code: Select all
Ziel Router Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.5 0.0.0.0 UG 0 0 0 tun0
10.0.0.0 10.0.0.5 255.255.255.0 UG 0 0 0 tun0
10.0.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
31.18.XX.XX 193.174.XX.XX 255.255.255.255 UGH 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
193.174.XX.XX 0.0.0.0 255.255.255.0 U 1 0 0 eth0
And this is the table when starting from the command line (openvpn --config test.ovpn)
Code: Select all
Ziel Router Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.5 128.0.0.0 UG 0 0 0 tun0
0.0.0.0 193.174.XX.XX 0.0.0.0 UG 0 0 0 eth0
10.0.0.0 10.0.0.5 255.255.255.0 UG 0 0 0 tun0
10.0.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
31.18.XX.XX 193.174.XX.XX 255.255.255.255 UGH 0 0 0 eth0
128.0.0.0 10.0.0.5 128.0.0.0 UG 0 0 0 tun0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
193.174.XX.XX 0.0.0.0 255.255.255.0 U 1 0 0 eth0
The reason I was playing around with the prompt is that I actually wanted to exclude my local network from the VPN tunnel.
I therefore put these lines in the client configuration file:
Code: Select all
route 193.174.XX.XX 255.255.255.0 net_gateway
Thank you in advance!