Re: [CentOS] iptables nat table rules

2011-02-09 Thread Robert Spangler
On Tuesday 08 February 2011 16:43, Carlos S wrote: Thanks for the help. You are welcome. Robert, you pointed out the mistakes correctly. Not sure why I used iptables-save command at first place... Most likely because in ever other distro and web page that is the way to do it. It's just

[CentOS] iptables nat table rules

2011-02-08 Thread Carlos S
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 # iptables-save 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.

Re: [CentOS] iptables nat table rules

2011-02-08 Thread Bob Beers
On Tue, Feb 8, 2011 at 1:36 PM, Carlos S neu...@gmail.com 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 # iptables-save However, I am unable to add it directly in

Re: [CentOS] iptables nat table rules

2011-02-08 Thread Joe DiTommasso
On Tue, Feb 08, 2011 at 12:36:44PM -0600, 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 # iptables-save However, I am unable to add it directly in

Re: [CentOS] iptables nat table rules

2011-02-08 Thread Robert Spangler
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'?

Re: [CentOS] iptables nat table rules

2011-02-08 Thread Carlos S
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 mli...@zoominternet.net wrote: On Tuesday 08 February 2011 13:36, Carlos S wrote:  I am forwarding traffic