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 /etc/firewalld/services/snmp.xml

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

Jan D.
Jan D.

"The only real security that a man will have in this world is a reserve of knowledge, experience, and ability."

Articles: 675

Leave a Reply

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *