This tutorial will tell you How to open firewall port for specific IP on CentOS 7
You will see that while we can manually open a specific port, it is often easier and beneficial to allow based on predefined services instead.
Check the updated rules with Firewalld Zone: Refer Article for understanding zone
]#firewall-cmd –zone=public –list-all
Below command will allow the IP address in zone.
]#firewall-cmd –zone=public –add-source=192.168.7.177
Below command will allow the port number in zone.
]#firewall-cmd –zone=public –add-port=1241/tcp
Check the update rules using below command.
]#firewall-cmd –zone=public –list-all
Now make it as permanent rules.
]#firewall-cmd –runtime-to-permanent
Reload the firewalld service.
]#firewall-cmd –reload
Enjoy 🙂