On 11/17/2015 11:12 AM, Nick Bright wrote:
firewall-cmd --zone=monitoring --add-source=1.2.3.4/32
firewall-cmd --zone=monitoring --add-service=snmp
firewall-cmd --zone=monitoring --add-interface=ens192
firewall-cmd --runtime-to-permanent
I went ahead and tried this and found that the zone and service must first be created, which requires use of:

firewall-cmd --new-zone=monitoring --permanent (--permanent is required)
firewall-cmd --new-service=snmp

edit /etc/firewalld/services/snmp.xml:
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>snmp</short>
<description>Simple Network Management Protocol</description>
<port port="161" protocol="udp" />
</service>

firewall-cmd --reload

However, at the end
firewall-cmd --zone=monitoring --add-interface=ens192

This results in a zone conflict. I'm not sure if it's even possible to have two zones on the interface.

--
-----------------------------------------------
-  Nick Bright                                -
-  Vice President of Technology               -
-  Valnet -=- We Connect You -=-              -
-  Tel 888-332-1616 x 315 / Fax 620-331-0789  -
-  Web http://www.valnet.net/                 -
-----------------------------------------------
- Are your files safe?                        -
- Valnet Vault - Secure Cloud Backup          -
- More information & 30 day free trial at     -
- http://www.valnet.net/services/valnet-vault -
-----------------------------------------------

This email message and any attachments are intended solely for the use of the 
addressees hereof. This message and any attachments may contain information 
that is confidential, privileged and exempt from disclosure under applicable 
law. If you are not the intended recipient of this message, you are prohibited 
from reading, disclosing, reproducing, distributing, disseminating or otherwise 
using this transmission. If you have received this message in error, please 
promptly notify the sender by reply E-mail and immediately delete this message 
from your system.

_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos

Reply via email to