DHCP client rewrites resolv.conf

I get an IP address on the WAN interface (eth0) from my ISP via DHCP. I set up an ipsec tunnel and get the DNS server address from the VPN server. Strongswan adds DNS addresses to resolv.conf:

nameserver 100.100.1.1   # by strongSwan
### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###

# dhcp-eth0
nameserver 192.168.20.1

Everything works fine until the DHCP client rewrites resolv.conf when renewing the address. This breaks the resolving. How to prevent the file from being overwritten?

Try
set interfaces ethernet eth0 dhcp-options ?
to see if an option exist to ignore the DNS setting received by DHCP

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.