Re: Local Port Forwarding.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:
	I'm kind of new to IpTables, and I'm having problems to do this kind of
port forwarding in my Fedora Core 3:

Suppose I have some user trying to access Host X:Port X on the Internet
from my Linux, but Instead of that I want to forward this traffic to the
localhost:Port Y, what rule I have to apply?

Thanks in advance,
	Alejandro

Alejandro, are you wanting to redirect the traffic of someone (or something / some daemon) running locally on the box that will be doing the redirection? Or are you wanting to redirect the traffic from an internet connected client to a different system? From what I read of your question the situation is the former. As such I'm going to answer that question.

iptables -t nat -A OUTPUT -d $HostX -p tcp --dport $PortX -j REDIRECT --to-ports $PortY



Grant. . . .


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux