How do I restrict Apache Tomcat to listen only IPv4 address?

Solution Verified - Updated -

Issue

  • How do I restrict Tomcat to listen only on ipv4 address ?

  • By default Tomcat listens only on IPv6 addresses. Following netstat output shows Tomcat is listening only on IPv6 address.

    tcp        0      0 :::8009   :::*   LISTEN      91         8474899    29185/java          off (0.00/0/0)
    tcp        0      0 :::8080   :::*   LISTEN      91         8474862    29185/java          off (0.00/0/0)
    

Environment

  • Red Hat Enterprise Linux
  • Apache Tomcat

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In