Announcement

Collapse
No announcement yet.

Redirect traffic received on port 80 to port 8080 for tomcat

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redirect traffic received on port 80 to port 8080 for tomcat

    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.
    Last edited by Spark; 06-02-2014, 17:33.

  • #2
    Re: Redirect traffic received on port 80 to port 8080 for tomcat

    Thanks Spark. This will do the trick.

    Comment

    Working...
    X