Recently while I am pursuing DevOps, I did CentOS 7 to practice Jenkins.
After the installation of Tomcat, I wanted to access tomcat
or other applications from outside of VM(my local machine).
These are the commands I executed in CentOS to access servers from
outside of the VM.
1. In the VM
network settings, using 'Bridged Adapter'.
2. Turn on the
port of CenOS7: using the following command in terminal(for example port
8080):
$ firewall-cmd --permanent --add-port=8080/tcp
$ firewall-cmd --reload
This solved my issue and I am able to access the
servers/application URLs from outside of the CentOS
Happy learning ☺