Sample Header Ad - 728x90

Make user made entries in /etc/hosts permanent

0 votes
1 answer
2657 views
I use Juniper Networks network connect to connect to the office network. Once i am inside the office network, i check the server ips and add entries for them in /etc/hosts file like, 10.199.xx.yy offi When i come out of the VPN network into public domain, network connect resets all changes it made and brings my /etc/hosts file to the state it was in before entering the network. I think, this behaviour is Juniper Network connect's expected behaviour as it adds an entry on the top of the hosts file as, # BEGIN hosts added by Network Connect 61.xx.yy.zz vpn.ip.com # END hosts added by Network Connect But in trying to reset its own entries, network connect reset the user made entries as well.. I tried to make /etc/hosts as immutable using chattr +i /etc/hosts but that caused my vpn login to fail as network connect comes out, if it fails to write into /etc/hosts
Asked by user93868
Jul 30, 2015, 12:21 PM
Last activity: Jul 28, 2025, 09:06 PM