iptables -t nat -A PREROUTING -p tcp -i if0 \
--dport 21 -j REDIRECT --to-ports 2121
On FreeBSD, the rule is as follows:
ipfw add fwd 192.168.1.10,2121 tcp \
from any to any 21 via if0 in
On NetBSD and Solaris:
echo 'rdr if0 0.0.0.0/0 port 21 -> 192.168.1.10 \
port 2121 tcp' | ipnat -f -
35
Need help?
Do you have a question about the GATEWAY SECURITY and is the answer not in the manual?
Questions and answers