RVIT
6
Thanks for this kyson-lok. It appears to work great on the “up” event.
However, the resolvfile doesn’t seem to get set back to /tmp/resolv.conf.auto on the “down” event. I’m not sure why.
The result is when I power up the device for the first time, the modem connects to the carrier, consumes the provided DNS, and uses it to resolve the VPN server. Once the connection is up, the script writes the VPN-pushed DNS IP to /tmp/resolv.conf.vpn and changes the resolvfile to this path. However, if the VPN connection closes (either intentionally or on carrier reneg), /tmp/resolv.conf.vpn gets cleared by the script but it is still showing as the path for the resolvfile. CORRECTION: the VPN-pushed IP is still in /tmp/resolv.conf.vpn after the vpn is down. So perhaps none of the down portion of the script is firing at all.
Any ideas why? Thought maybe I forgot to chmod the downdns shell script but that didn’t seem to be the case. Obviously, attempting to reconnect to the VPN a second time does not work since the server address does not resolve (because the resolvfile path is still pointing at /tmp/resolv.conf.vpn which contains the private VPN server-side DNS).