All of lore.kernel.org
 help / color / mirror / Atom feed
* Internal machines can't resolve external addresses
@ 2002-06-12  3:00 Michael Hudin
  2002-06-12 12:30 ` Matthew Hellman
  0 siblings, 1 reply; 16+ messages in thread
From: Michael Hudin @ 2002-06-12  3:00 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 2503 bytes --]

Machines in the outside world, can view my websites fine, but whenever I try to go to one of them from a machine on my internal network behind the firewall, neither the domain name nor the IP will resolve.  I also have the same problem with my mail server and have to use the internal address of the mail server.  I am going to guess that the best solution to this is to run some kind of local DNS server on the inside of the firewall which resolves all my sites internally, but since I don't have a server at my disposal for it, is there some way around this?  I had the POSTROUTING MASQ line on and that did allow the internal machines to resolve, but it also hid the originating address for any outside machine, thus creating a security disaster.

-michael

*nat
:PREROUTING ACCEPT [241:88600]
:POSTROUTING ACCEPT [0:9862]
:OUTPUT ACCEPT [68:4275]
-A PREROUTING -d 10.10.10.252 -p tcp -m tcp --dport 110 -j DNAT --to-destination 192.168.77.2
-A PREROUTING -d 10.10.10.252 -p tcp -m tcp --dport 25 -j DNAT --to-destination 192.168.77.2
-A PREROUTING -d 10.10.10.251 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.77.2
-A PREROUTING -d 10.10.10.250 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.77.2
-A PREROUTING -d 10.10.10.250 -p tcp -m tcp --dport 22 -j DNAT --to-destination 192.168.77.2
-A POSTROUTING -o eth0 -j SNAT --to-source 10.10.10.254
#-A POSTROUTING -o eth1 -j MASQUERADE
COMMIT

*mangle
:PREROUTING ACCEPT [18365:3221456]
:INPUT ACCEPT [10886:760348]
:FORWARD ACCEPT [7269:2438049]
:OUTPUT ACCEPT [8009:752540]
:POSTROUTING ACCEPT [15177:3182145]
COMMIT

*filter
:INPUT ACCEPT [0:229546]
:FORWARD ACCEPT [363:1553786]
:OUTPUT ACCEPT [2:619341]
-A INPUT -p udp -m udp --sport 500 --dport 500 -j ACCEPT
-A INPUT -p tcp -j ACCEPT
-A INPUT -p esp -j ACCEPT
-A INPUT -p ah -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A FORWARD -i eth1 -j ACCEPT
-A FORWARD -i eth0 -o eth1 -p tcp -m tcp --dport 110 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -p tcp -m tcp --dport 25 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -p tcp -m tcp --dport 80 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -p tcp -m tcp --dport 22 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -p udp -m udp --sport 500 --dport 500 -j ACCEPT
-A OUTPUT -p tcp -j ACCEPT
-A OUTPUT -p esp -j ACCEPT
-A OUTPUT -p ah -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
COMMIT


[-- Attachment #2: Type: text/html, Size: 3313 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Internal machines can't resolve external addresses
@ 2002-06-12  3:23 Hard__warE
  0 siblings, 0 replies; 16+ messages in thread
From: Hard__warE @ 2002-06-12  3:23 UTC (permalink / raw)
  To: netfilter

Yo just answered your own Question ... lol

no Internal MAchines will not be able to go out through your NAT box and
back in

thats just unethical and a big waste of Traffic ...

so do what i do and run a local Bind 9 DNS on your internal

LAN , and set it up so it forwards requests to your ISP's DNS server

or one / many of OpenNICS Servers ... (OpenNIC is a free Domian Name Server
Service )

then setup all your machines to use it as the DNS server for the Internet
(yes even the IPTABLES box if  ya want, even easier just Set up

Bind 9 on your Firewall Box and set bind to only answer to requests on your
Local LAN, and please if your going to do this make sure

you are running Bind9 (DNS Daemon) as a Sercure User/Group that has basiclly
no privliges ei (named)

last but not least you would the have to edit your /etc/reslove.conf on your
Firewall box and set the nameserver to your internal

Ethernet Card IP and for Secondary add  127.0.0.1 (localhost) ..... yay
... :D

you will find this runs great ... If you run into problems feel free to send
me an EMAIL ...  hard__ware@hotmail.com

im on my computer 24/7 (yes with no sleep so please dont piss me off  with
SPAM ... :P )



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2002-06-12 20:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-12  3:00 Internal machines can't resolve external addresses Michael Hudin
2002-06-12 12:30 ` Matthew Hellman
2002-06-12 15:07   ` Glover George
2002-06-12 15:13     ` Ramin Alidousti
2002-06-12 15:16     ` Antony Stone
2002-06-12 16:48       ` Glover George
2002-06-12 17:28         ` Ramin Alidousti
2002-06-12 19:59           ` Antony Stone
2002-06-12 20:02             ` Ramin Alidousti
2002-06-12 20:22               ` Glover George
2002-06-12 15:34     ` George Georgalis
2002-06-12 15:58       ` George Georgalis
2002-06-12 16:48         ` Michael Hudin
2002-06-12 18:21           ` George Georgalis
2002-06-12 20:05           ` Joe Patterson
  -- strict thread matches above, loose matches on Subject: below --
2002-06-12  3:23 Hard__warE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.