iptables -- trying to redirect, but doesn't work

Trevor "TeC" Christian trevor at bouyon.dalive.com
Mon May 2 03:15:33 UTC 2005


John G. Norman wrote:

>Hi.
>
>I'm trying to redirect from one port to another with iptables
>(destination NAT -- transparent proxying . . . e.g., "destination NAT"
>in this article: http://www.linux-mag.com/content/view/849/2236/).
>
>I've done this many times before, including on SuSE and various
>flavors of BSD (with ipfw).
>
>For some reason I can't get it to work on Fedora 3.
>
>I do have ip forwarding on (/proc/sys/net/ipv4/ip_forward shows 1)
>
>The command I am trying to use is:
>
>/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j
>REDIRECT --to-port 8080
>  
>
I think this should probably by 
	/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-port 8080

I believe that's what works for me...


-- 
*Trevor "TeC" Christian*
Cell #: (767) 225 4472
IM
   MSN: trevorc98 at hotmail.com / trevor at bouyon.dalive.com
   YM : trevorc01
   AIM: DoubleOTeC
------------------------------------------------------------------------
Curriculum Vitae (PDF) <http://bouyon.dalive.com/cv/curriculum_vitae.pdf>
Curriculum Vitae (HTML) <http://bouyon.dalive.com/cv/curriculum_vitae.html>




More information about the users mailing list