All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] DNAT PREROUTING issue with IPTABLES
@ 2007-09-25  5:40 Indunil Jayasooriya
  2007-09-25  7:50 ` Aleksander Kamenik
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Indunil Jayasooriya @ 2007-09-25  5:40 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 1394 bytes --]

Hi,

I have an DNAT ISSUE with PREROUTING.

This is my setup.

I have 2 firewalls running iptables.

Pls asume 1.2.3.4/29 is the internet interace of FIRST firewall.
2.3.4.5/29 is the internet interface of SECOND firewall. it has DMZ zone. in
that DMZ zone, mail server runnig @ 192.168.100.3

Now I want to DNAT port 25 of FISRT firewall ( i.e  -  its ip address -
1.2.3.4/29) to the internet ip address ( 2.3.4.5/29) of SECOND firewall.
That firewal DNATs port 25 to mail server @ 192.168.100.3 in DMZ zone.

These are rules I have added.

FIRST firewall (its internet ip address - 1.2.3.4/29) I have addes below
rule.

iptables -t nat -A PREROUTING -p tcp -i eth0 -d 1.2.3.4 --dport 25 -j DNAT
--to-destination 2.3.4.5:25

That should forward port 25 to SECOND firewall. in SECOND firewall, I have
added 2 below rules.

iptables -t nat -A PREROUTING -p tcp -i eth0 -d 2.3.4.5 --dport 25 -j DNAT
--to-destination 192.168.100.3:25

iptables -A FORWARD -p tcp -d 192.168.100.3 --dport 25 -m state --state NEW
-j ACCEPT

Now, it should forward port 25  to  mail server  @  DMZ Zone.

I think I have added these rules properly. But, It does not work.

I checked from outside world . I telneted to port 25 of first firewaal.
Then, It should forward to mail server @ DMZ zone.
But, no responce.

WHY is that?

YOUR IDEAS?






-- 
Thank you
Indunil Jayasooriya


-- 
Thank you
Indunil Jayasooriya

[-- Attachment #1.2: Type: text/html, Size: 2920 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

end of thread, other threads:[~2007-09-25 10:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-25  5:40 [LARTC] DNAT PREROUTING issue with IPTABLES Indunil Jayasooriya
2007-09-25  7:50 ` Aleksander Kamenik
2007-09-25  8:35 ` Indunil Jayasooriya
2007-09-25  8:44 ` Aleksander Kamenik
2007-09-25  8:54 ` Riccardo (SCASI)
2007-09-25  9:18 ` Indunil Jayasooriya
2007-09-25  9:48 ` Aleksander Kamenik
2007-09-25 10:12 ` Indunil Jayasooriya

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.