LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-31-2011, 10:49 AM   #1
pastoreerrante
LQ Newbie
 
Registered: May 2009
Posts: 7

Rep: Reputation: 0
Dns resolution not working while vpn is established [SOLVED]


Hi all,

I'm running vpnc from my Debian GNU/Linux 6.0.3 (squeeze) laptop. I managed to set up the vpn tunnel towards my office network, but the dns resolution is broken.

After the vpn is established, I can see that vpnc modified my resolv.conf in order to use my office dns servers.

This is my resolv.conf during vpn connection:

root@produzione:/etc/vpnc# cat /etc/resolv.conf
#@VPNC_GENERATED@ -- this file is generated by vpnc
# and will be overwritten by vpnc
# as long as the above mark is intact
# Generated by NetworkManager
domain eu.didata.local
search WAG320N
nameserver 10.159.3.195
nameserver 10.159.225.11


The vpn tunnel is working fine, since I can ping some private ip addr used in my company, but I cannot browse the office intranet due to this resolution problem.

It seems like the system is still using normal dns (not the vpn-given dns), despite the modified resolv.conf.

Another detail: on my laptop I virtualized Win 7. From windows I can connect to the office vpn (with the cisco vpn client) and all is working fine. The dns obtained after vpn is established are the same that vpnc writes into resolv.conf!

As you can see, this is the Windows 7 virtual interface created by cisco vpn client while connected to the office vpn:

Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . : eu.didata.local
Description . . . . . . . . . . . : Cisco Systems VPN Adapter
Physical Address. . . . . . . . . : 00-05-9A-3C-78-00
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.249.252.226(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.254.0
Default Gateway . . . . . . . . . : 10.249.252.1
DNS Servers . . . . . . . . . . . : 10.159.3.195
10.159.225.11
NetBIOS over Tcpip. . . . . . . . : Enabled

How can I fix this?

Thank you in advance,

pastoreerrante

Last edited by pastoreerrante; 11-07-2011 at 12:02 AM. Reason: Solved
 
Old 10-31-2011, 04:30 PM   #2
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
Here this works fine:
1. prohibit dynamic resolv.conf updates (stop resolvconf or chattr +i the file)
Here mine:
nameserver 127.0.0.1
search my-home.dyndns-at-home.com ad.my-work.at my-work.at

setup a local dns server ("caching-only" should do, but you may create entries for your
local network hosts) and add the forwarders
from w0rkplace like here:

zone "my-work.at" {
type forward;
forwarders { 172.18.64.49; 172.18.64.50; };
};

Obviously you should use the appropriate IPs here.
 
Old 11-01-2011, 04:05 AM   #3
pastoreerrante
LQ Newbie
 
Registered: May 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Hi Woodypecke, thank you for the fast reply!

Can you explain to me why the dns in the vpnc-modified resolv.conf are not working at all? I mean, if I have company dns in my resolv.conf, shouldn't firefox and all my system use those in order to provide names resolution? I don't understand why it's not working.

The first time I set up the vpn connection, all was working fine but the second time I tried to bring up the tunnel the names resolution was suddenly broken. From this I deduce I don't really need a dns server on my laptop.

Thank you in advance,

pastoreerrante
 
Old 11-01-2011, 12:46 PM   #4
pastoreerrante
LQ Newbie
 
Registered: May 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Ok, now it's working!

the working resolv.conf is this one:

root@produzione:/home/daniele# cat /etc/resolv.conf
#@VPNC_GENERATED@ -- this file is generated by vpnc
# and will be overwritten by vpnc
# as long as the above mark is intact
# Generated by NetworkManager
nameserver 10.159.3.195
nameserver 10.159.225.11
search eu.didata.local


I don't know why now vpnc modified my resolv.conf in this way.

Thank you!
 
Old 11-06-2011, 12:19 PM   #5
cheesus
Member
 
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 186

Rep: Reputation: 25
then please mark thread as solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
name resolution not working on new dhcp/dns server rbees Linux - Software 6 07-03-2009 05:44 AM
How to established VPN Server using linux cheesewizz Linux - Networking 1 11-14-2008 03:53 AM
Local network DNS resolution fails, but DNS resolution to internet is OK farge Linux - Networking 6 05-28-2008 11:49 PM
DNS resolution to net randomly not working xcoldfyrex Linux - Networking 0 03-07-2007 01:49 PM
2.6: ping on established(!) VPN tunnel doesn't! sundialsvcs Linux - Networking 1 12-09-2005 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration