Firewalld: Add Puppet master ports to firewalld in CentOS7.

1. Find out what are your server's active zones.

[root@vihitaatma ~]# firewall-cmd --get-active-zones
public
  interfaces: ens192
[root@vihitaatma ~]#

2 Puppet has different ports for different services.

3000: Web based installer 
8140: Communication port between Puppet Master & Agent. 
61613: Used by MCollective for orachestration requests by Puppet agents
443: Puppet Enterprise console web port.
5432: PostgreSQL 
8081: Puppet DB Request Port.
8142: Used by Orachestration services to accept inbound traffic/responses from Puppet Agents  

[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --add-port=8140/tcp
success
[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --add-port=61613/tcp
success
[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --add-port=443/tcp
success
[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --add-port=5432/tcp
success
[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --add-port=8081/tcp
success
[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --add-port=8142/tcp
success
[root@vihitaatma ~]# sudo firewall-cmd --reload
success
[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --list-ports
 8140/tcp 61613/tcp 443/tcp 5432/tcp 8081/tcp 8142/tcp

3. And To Remove Ports

[root@vihitaatma ~]# firewall-cmd --zone=public --remove-port=3000/tcp
success
[root@vihitaatma ~]# firewall-cmd --runtime-to-permanent
success
[root@vihitaatma ~]# firewall-cmd --reload
success
[root@vihitaatma ~]# firewall-cmd --zone=public --permanent --list-ports
8140/tcp 61613/tcp 443/tcp 5432/tcp 8081/tcp 8142/tcp
[root@vihitaatma ~]#



Comments

Popular posts from this blog

grep: unknown device method

Uploading files to FTP/SFTP using CURL

How to find outgoing IP in Linux ?