Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Juniper Network Connect has been an issue on 64bit linux for quite sometime. I have found 2 solutions to the Java issue (Solution 1 and 2) but now I am struggling with a new issue.

Network connect makes changes directly to the /etc/resolv.conf file. This causes issues with the newer way that Ubuntu does DNS resolutions which is to point DNS to the local resolver/cacher: dnsmasq. Once NC disconnects and you change networks, eg go from office to home then DNS stops working correctly. What happens is that NC deletes the /etc/resolv.conf file which is actually symlinked to /run/resolvconf/resolv.conf. Whats worse is that NC actually deletes the original file not the link. So when you try to restore the file with:

sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

It fails as /run/resolvconf/resolv.conf is now gone. re-installing resolvconf does not fix it and neither does running resolvconf. So the best way I have found so far is to first backup /run/resolvconf/resolv.conf to another location. After you disconnect NC I then run a script that removes /etc/resolv.conf, replaces the deleted /run/resolvconf/resolv.conf and then links it's back to /etc again.

Does anyone know a way to avoid this or do I pretty much have he best "fix" in place already? Any way to prevent NC from breaking it in the first place.

Oh how I wish Juniper would sort their issues out. Juniper has been notoriously HORRIBLE on Linux and 64bit especially for over 4 years now.

share|improve this question
    
Not just 64 bit. I have the same issue on 32 bit 12.04. –  user68186 Oct 5 '12 at 2:40

4 Answers 4

The best way to fix the /etc/resolv.conf symlink is to run

sudo dpkg-reconfigure resolvconf

and answer YES to prepare resolv.conf for dynamic updates.

share|improve this answer

First: clicking the Sign Out button in the Network Connect window (the window that shows the VPN IP while connected) and

Then clicking on the Sign Out button in the logged-in web page avoids this problem.

Please indicate in comment if this works or not.

Thanks

share|improve this answer
1  
I found this to be true as well. It's really stupid to have to click 2 log out buttons, but this works. –  Chris Nov 8 '13 at 12:58
    
Thanks for confirming. I agree this is stupid. However, I think two clicks is far better than typing 30 or more characters on the terminal afterwords. –  user68186 Nov 8 '13 at 14:05

After Network Connect has been stopped it suffices to do the following.

sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
sudo resolvconf -u  # Regenerate /run/resolvconf/resolv.conf

You don't need to back up /run/resolvconf/resolv.conf beforehand.

share|improve this answer

I would expect that you do not need to reinstall the package. Just restarting resolvconf should fix the problem:

sudo service resolvconf restart

If that does not happen to work, in addition you can try restarting the network service which will try to write a new set of values to /etc/resolv.conf

sudo service network restart
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.