[CentOS] iptables nat table rules

Carlos S neubyr at gmail.com
Tue Feb 8 21:43:11 UTC 2011


Thanks for the help.

Robert, you pointed out the mistakes correctly. Not sure why I used
iptables-save command at first place...

--
cs.

On Tue, Feb 8, 2011 at 2:08 PM, Robert Spangler <mlists at zoominternet.net> wrote:
> On Tuesday 08 February 2011 13:36, Carlos S wrote:
>
>>  I am forwarding traffic on port 8080 to port 80 with following rule.
>>  # iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j
>>  REDIRECT --to-port 80
>
> Shouldn't that be '--to-ports'?
>
> http://www.zoominternet.net/~lazydog/iptables-tutorial.html#REDIRECTTARGET
>
>>  # iptables-save
>
> service iptables save
>
> That should save the rules.
>
>>  However, I am unable to add it directly in /etc/sysconfig/iptables. I
>>  think it is used only for filter table and not nat table. So where do
>>  nat table rules go?  Any help?
>
> Same place, /etc/sysconfig/iptables.
>
>
> --
>
> Regards
> Robert
>
> Linux
> The adventure of a lifetime.
>
> Linux User #296285
> Get Counted
> http://counter.li.org/
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>



More information about the CentOS mailing list