IPTables Prerouting

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to use IPTables nat forwarding from public ip address to
internal subnet, but it's not relaying.

Public Ip address

207.202.xxx.xxx -> (Linux router) -> (Linux

I can access the linux machine from's router.

I can access the Internet and the Linux router from the Linux machine.

I'm using the iptables command:

iptables -t nat -A PREROUTING -p tcp  --dport 26 -j DNAT --to

I'm even disabled all of the DENY rules for forwarding.


Re: IPTables Prerouting

On Tue, 02 Oct 2007 13:18:43 -0700, "techjohnny@gmail.com"

Quoted text here. Click to load it

This works for me, so it will work for you.  But I have to wonder what
is on port 26...

iptables -t nat -I PREROUTING -p tcp -d 207.202.x.y --dport 26 \
  -j DNAT --to10.1.10.15:26
iptables -I FORWARD -p tcp -d ---dport 26 -j ACCEPT

Since there is no defined service on TCP 26, you might not see
anything happen, but the iptables lines above are correct.

Re: IPTables Prerouting

Quoted text here. Click to load it

Thanks for the response, but had to create an access-list and forward
a port from the PIX first.


Site Timeline