How to configure iptables for Tomcat

Home > Search > How-to
  by

For instructions on how to add rules to iptables, refer to how to configure the iptables firewall in Linux.

Add the following rule to iptables.

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8009 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8443 -j ACCEPT

 

After adding these rules, save the changes.

[root@server1 ~]# iptables-save > /etc/sysconfig/iptables

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments