As a developer, you also need to deploy some war file to a VM so that yo can have a test or for other aim.
You need to know that the configuration file is located in :/etc/sysconfig/iptables
First, you may want to check whether the port is opened , you can run this command: iptabes -nL,
then you will see all of the opened ports.
After that , there are two ways to open port:
- vi /etc/sysconfig/iptables -> add one more line: -A INPUT -p tcp -m tcp --dport 8889 -j ACCEPT ->/etc/init.d/iptables restart
- if you don't want to modify the iptables file, you can simply run the comman: iptables -I INPUT -p tcp --dport 8889 -j ACCEPT
You might have a case that need to close a port, then you can :
iptables -I OUTPUT -p tcp --dport 8889 -j DROP