in tools

redirect port 8080 to 80 by iptables in ubuntu


#command
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

#save configration
sudo apt-get install iptables-persistent
sudo invoke-rc.d iptables-persistent save

#clear
sudo /etc/init.d/iptables-persistent flush

Write a Comment

Comment