Mailinglist Archive: opensuse (4446 mails)

< Previous Next >
[opensuse] Multiple DNS servers in /etc/resolv.conf
  • From: Sylvester Lykkehus <zly@xxxxxxxxxxxxxx>
  • Date: Wed, 06 Dec 2006 00:17:36 +0100
  • Message-id: <4575FE10.8090709@xxxxxxxxxxxxxx>
Hi,

I recently (just now), installed and configured the pptp-client, to help
me hook me up to my workplace's MS VPN server.
Unfortunately, i have ran into a little bump in the road, regarding
nameservers, and how hosts are looked up.

Take this scenario:
------------------------------
Company setup:
VPN server: vpn.company.com
Internal network (company.net): 10.0.0.0/8
Internal gateway: 10.5.26.2
VPN client IP's: 10.5.26.X
DNS: 10.12.1.2 / 10.12.2.2

My setup:
Local IP (eth0): 10.0.0.2/24
Default GW (router): 10.0.0.1
DNS: 10.0.0.1
Tunnel device: ppp0
------------------------------
I dont want to route my normal internet traffic through the VPN, so i
connect to vpn.company.com, and add the network with:
add -net 10.0.0.0 netmask 255.0.0.0 ppp0

So far so good. Connection to both internet and internal company hosts
are working.

Now, i want to be able to go to opensuse.org, routed through eth0, using
10.0.0.1 as nameserver.
At the same time, i want to be able to go to intranet.company.net,
routed through ppp0, using 10.12.1.2 as nameserver.

My guess at this configuration would be:
/etc/resolv.conf:
domain company.net
nameserver 10.0.0.1
nameserver 10.12.1.2
But this results in opensuse.org being looked up, while
intranet.company.net fails.

Another guess:
/etc/resolv.conf
domain company.net
nameserver 10.12.1.2
nameserver 10.0.0.1
Which leads to intranet.company.net being looked up, while opensuse.org
fails.


How on earth do i get around this, and why does it seem that both
nameservers are not queried ?

Best Regards
Sylvester Lykkehus
< Previous Next >