firewall

Allow SNMP ports in FirewallD CentOS

firewall-cmd –zone=public –add-port=161/udp –permanentfirewall-cmd –zone=public –add-port=161/tcp –permanentfirewall-cmd –zone=public –add-port=162/udp –permanentfirewall-cmd –zone=public –add-port=162/tcp –permanentfirewall-cmd –reload or add XML nano ADD file <?xml version=“1.0″ encoding=“utf-8″?><service>  <short>SNMP</short>  <description>SNMP protocol</description>  <port protocol=“udp“ port=“161″/>  <port protocol=“tcp“ port=“161″/></service> firewall-cmd –zone=public –add-service snmp –permanent firewall-cmd –reload

Modify FW rules

The iptables firewall will need to be modified to allow connections to the Apache web server that will be installed. Edit your /etc/sysconfig/iptables file with your favorite text editor. Modify the file as outlined below by adding the black line…