$ago Hi there, I have an ubuntu workstation and I'm connecting through vpn on internal agency network, but I have a problem. The ovpn file has an old search and servername configuration, so everytime I need to connect to vpn I need to go to /etc/resolv.conf and update the file with another search and nameserver. default resolv.conf: nameserver OLD_IP options edns0 search OLD_HOST homenet.telecomitalia.it resolv.conf edited everytime I connect to vpn: nameserver NEW_IP options edns0 search OLD_HOST homenet.telecomitalia.it NEW_HOST0 NEW_HOST1 There is a way to set this env variable automatically on every vpn connection, so I don't need everytime to change resolv.conf? Thanks a lot.
TinCanTech We tend to favour this solution: Use DNSMasq and https://github.com/alfredopalhares/openvpn-update-resolv-conf As for what you want, your explanation is not clear .. Please see: https://forums.openvpn.net/viewtopic.php?f=30&t=22603
$ago @TinCanTech: thanks a lot for your hint. Sorry for my unclear question, In few words my goal is prevent to edit the resolv.conf by hand with my parameter and find a way to update it automatically with those paramenter every new vpn connection. thnaks