Dns – How to setup dns settings in the Gentoo linux box? nslookup already do it

dnsgentoo

I can't resolve dns requests for most of programs in my Gentoo machine. I have local network at my work. It contain two dns services for local machine names and one tmg gateway for internet access.

I can't resolve dns names which must be processed by service of our internet provider.

Here is my /etc/conf.d/net configuration:

dns_domain_lo="local"
config_eth0="dhcp"
routes_eth0=(
  "default gw 131.107.1.20" # gateway of my local network
)
dns_servers_eth0=(
  "195.20.194.2"            # internet provider dns server
)

After I run /etc/init.d/net.eth0 restart /etc/resolv.conf doesn't contain specified dns server. Only two local servers which were accepted from local dhcp service.

But I cat get appropriate ip address with nslookup www.google.com and successful open it with internet browser.

Where I make mistake?

Best Answer

This'll do..

dns_domain_lo="local"
config_eth0="dhcp"
dhcp_eth0="nodns"
routes_eth0=(
  "default gw 131.107.1.20" # gateway of my local network
)
dns_servers_eth0=(
  "195.20.194.2"            # internet provider dns server
)