On Mon, Aug 31, 2015 at 9:10 AM, Martin Lund <scsi7...@gmx.com> wrote:

> Hello All,
>
> I was thinking on how to solve this problem because starts to get
> annoying. I have my linux machine connecting through openvpn with a script.
>
> After connecting my script replaces the dns servers in /etc/resolv.conf
> with OpenDNS so all the DNS requests will be forwarded through the VPN
> tunnel.
>
> The only problem is that if the VPN tunnel dies and it tries to re-resolve
> the address it can't because those DNS requests will be sent through the
> tunnel as well.
>
> Is there a solution for this?
>

Consider using a "down" script which restores the original DNS entries.
Note that if the *--persist-tun* option is active, OpenVPN does not invoke
the down script during (at least some types of) restarts, so you might need
to avoid that option, too.

And/or consider using the *--persist-remote-ip* option.
------------------------------------------------------------------------------
_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to