Hello,
I've a problem with my openpn configuration.
The VPN runs on 2 native Debian Linux Systems, the server has no static ip, so dyndns is needed.
Everything runs fine, until the server changes it's IP.
The tunnel brakes down, but the routes where not set back to clients defaults.
-> No connection to internet, not able to resolve hostname
How can I force openvpn to reset to default routes, if the tunnel brakes down?
Fri Oct 7 10:28:35 2016 us=647395 RESOLVE: Cannot resolve host address: xxx.biz: [TRY_AGAIN] A temporary error occurred on an authoritative name server.
Fri Oct 7 10:29:20 2016 us=683917 RESOLVE: signal received during DNS resolution attempt
Fri Oct 7 10:29:20 2016 us=684652 TCP/UDP: Closing socket
Here is my config:
Server:
port 1194
proto udp
dev tun0
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
dh /tmp/openvpn/dh.pem
server 10.9.8.0 255.255.255.0
push "redirect-gateway"
push "route 192.168.0.0 255.255.255.0"
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
client-config-dir /tmp/openvpn/ccd
route 192.168.10.0 255.255.255.0
client-to-client
Client:
client
dev tun
proto udp
remote xxxx.biz
port 1194
nobind
ca /etc/openvpn/easy-rsa2/keys/ca.crt
cert /etc/openvpn/easy-rsa2/keys/client1.crt
key /etc/openvpn/easy-rsa2/keys/client1.key
comp-lzo
verb 4
ping 15
resolv-retry 300
persist-key
persist-tun
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf