Secara sederhana :
ip firewall nat
add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080
comment=”Redirect Koneksi Port 80” disabled=no
Lebih lengkap :
/ ip firewall nat
add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080
comment=” ” disabled=no
add chain=dstnat protocol=tcp dst-port=3128 action=redirect
to-ports=8080 comment=” ” disabled=no
add chain=dstnat protocol=tcp dst-port=8000 action=redirect
to-ports=8080 comment=” ” disabled=no
Secara sederhana, Linux :
iptables -A PREROUTING -t nat -j REDIRECT -p tcp -s 192.168.0.0/24 -d 0/0 –dport 80 –to-ports 8080
Ubuntu :
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.1:8080
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
Kalo salah harap maklum...nubie...
