Redirecting local port

Patrick Schaaf bof@bof.de
Sat, 1 Dec 2001 11:37:58 +0100


> I cannot find a way to do this with 2.4/iptables. The closest I get is:
> 
> iptables -A INPUT -p tcp -d 130.94.203.135 --dport 23 -j REDIRECT
> --to-port 1111
> 
> which comes back with
> 
> iptables: No chain/target/match by that name

iptables -t nat -A PREROUTING -p tcp -d 130.94.203.135 --dport 23 \
	-j REDIRECT --to-port 1111

> Is local port forwarding (non-NAT) possible with iptables?

No.

regards
  Patrick