You are not logged in.

#1 2010-04-12 11:07:22

Fletch
Member
From: Ukraine
Registered: 2007-09-03
Posts: 14

Specify DNS for network interface

Hello
Please help me to specify name server for one network interface. Can't use resolv.conf because it's automatically rewrited by pppd script which establish connection with pppoe provider.
Here is the diagram.
L.png
There's a local zone maintained by local dns. It would be great if you helped me to configure eth0 to use local dns for only queries to local zone.
Sorry for my bad english.

Offline

#2 2010-04-12 15:48:29

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: Specify DNS for network interface

scanning the manpage, this jumps up:

usepeerdns
Ask the peer for up to 2 DNS server addresses. The addresses supplied by the peer (if any) are passed to the /etc/ppp/ip-up script in the environment variables DNS1 and DNS2, and the environment variable USEPEERDNS will be set to 1. In addition, pppd will create an /var/run/ppp/resolv.conf file containing one or two nameserver lines with the address(es) supplied by the peer.

check if you have userpeerdns in your configuration file, this options makes ppp overwrite /etc/resolv.conf

Offline

#3 2010-04-12 23:00:26

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Specify DNS for network interface

You can not specific a different DNS server based on the zone of the query, you either need to:
1) Setup named to run on the local machine, with a "forward" type zone that forwards requests for the internal zone to your internal DNS servers.
2) Use the internal DNS servers for everything.

As mentioned, the PEERDNS setting needs to be off to prevent resolv.conf being over-written.

Edit: removed irrelevant info.

Last edited by fukawi2 (2010-04-12 23:05:33)

Offline

Board footer

Powered by FluxBB