Quantcast
Channel: Active questions tagged openvpn - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 823

Make user made entries in /etc/hosts permanent

$
0
0

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 Connect61.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


Viewing all articles
Browse latest Browse all 823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>