Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-13-2004, 07:02 PM   #1
LQ Newbie
Registered: Jul 2004
Posts: 7

Rep: Reputation: 0
BIND and /etc/hosts + NAT

Hey everyone,

first up stats:

Running Slack 9.1
kernel 2.4.22
iptables v1.2.8
bind 9.2.2_P3

the basics i can think of right now..

I currently run this box as a NAT box for me and the family, but lately security has been more and more of a problem on a few of the computers.

to prevent from spyware/viruses/popus/ all the crap, i use the host file from

now i keep this on my machine but its a pain to always go and update them on other computers all the time. And no login scripts with samba are not currently an option due to the many computers coming in and out of this network.

So currently I have BIND running and working just fine, all the computers on the network use it without a problem. The only problem is that BIND seems to completly ignore the /etc/hosts file

from the actual linux console:

root@drunkfrog:~# ping
PING ( 56(84) bytes of data.
64 bytes from localhost ( icmp_seq=1 ttl=64 time=0.232 ms
( it of course gets this address because of the /etc/hosts file

root@drunkfrog:~# host has address
(the host command, like many others, seem to skip the actual /etc/hosts file)

From a windows box behind the box
Pinging [] with 32 bytes of data:
( seems to skip as well )

Basically, what i want is for any machine on the network behind the NAT box, to read from the /etc/hosts file and use the result from there and not from the actual DNS server, and that if the host is not within the file, then to go and use the DNS server.

I know its alot to explain and it might not all be clear, but any help would be welcome in regards to this.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I make BIND override arbitrary hosts? davidgro Linux - Networking 4 05-13-2005 02:54 AM
NAT / BIND / Proxy / IPTables??? izrunas Linux - Networking 1 04-24-2005 01:53 PM
Help With Bind,squid,nat And Proxy debloxie Linux - Networking 0 01-20-2004 05:43 AM
Help With Bind,squid,nat And Proxy debloxie Linux - Networking 1 01-19-2004 05:40 PM
NAT and DMZ hosts help ghost-ils Linux - Networking 0 09-07-2001 02:08 AM

All times are GMT -5. The time now is 08:15 AM.

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