To add the iptables redirect rules, SSH to your server as root and execute the below commands:
=========
# iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
# iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
=========
Then save the iptables using command : service iptables save
It will make the Java application work without the use of port 8080 in the URL.
=========
# iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
# iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
=========
Then save the iptables using command : service iptables save
It will make the Java application work without the use of port 8080 in the URL.
Comment