Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17851

iptables command is adding -m for some reason. Help?

$
0
0

Hi all. Going nuts here. I issue the following command from the cli:

iptables -t nat -A PREROUTING -p tcp --dport 25 -j DNAT --to x.x.x.x:pp

This forwards all traffic heading to port 25 to my external mail server.

What I am expecting to get is:

-A PREROUTING -p tcp --dport 25 -j DNAT --to-destination x.x.x.x:pp

Instead I get:

-A PREROUTING -p tcp -m tcp --dport 25 -j DNAT --to-destination x.x.x.x:pp

Where is the "-m tcp" coming from? How do I prevent it?

Thanks.

submitted by lazylion_ca
[link] [4 comments]

Viewing all articles
Browse latest Browse all 17851