Hi. I am running both OpenVPN-client, and OpenVPN-server, on the same router. OpenVPN-server uses TCP, so policy in vpn-policy-routing has been configured. All works fine, but till the moment, the client disconnects. It results in messages in log: daemon.err openvpn(custom_config_client)[XXXX]: RESOLVE: Cannot resolve host address: server_link.com:YY (Try again)
At the same time server stops to accept incoming connections, and no messages appear in log. How to reconfigure router to accept incoming connections? I added event in hotplug.d/iface:
#!/bin/sh
if [ "${ACTION}" = "ifdown" ] && (! ip a s tun0 up); then
sleep 1800 && reboot
fi
Is there more elegant solution?
I have noticed, that after disconnect default route disappears. Restart of network results in accept of incoming connections, but I can not login to router from OpenVPN-tunnel via SSH. Additional restart of firewall results in reject of incoming connections.
Restart of vpn-policy-routing results in accept of incoming connections. It seems, that policy is very sensitive to reconfiguration.