On Tue, March 28, 2006 14:37, Bruno Nunes wrote:
> i want all connections incoming from IP1 to be
forwarded to the IP2
> ip1 is a internet ip
> ip2 is a local ip
>
> i only need an ip redirection...so if I use ssh, http
or ftp or
> anything iptables must route ip1 to ip2 directly
>
> how can i do that with iptables?
In a previous post "ip redirection and multiport
noobish question" (where I
fail to see what the multiport question was) you asked
something similar. Did
you actualy look for yourself in the tutorial ?
If you did, you would have been able to construct this :
$ipt -t nat -A PREROUTING -i <if_inet> -d IP1 -j DNAT
--to $IP2
However, if you'd ask me then my advice would be not doing
this.
Gr,
Rob
|