您的位置:首页 > 其它

在防火墙配置自定义服务

2016-05-10 20:50 387 查看
cd /etc/vmware/firewall
chmod 777 service.xml 修改service.xml的属性,否则无法修改该文件

chmod +t service.xml

vi service.xml
<service id='0099'>
<id>AAAA</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>5555</port>
</rule>
<rule id='0001' >
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>src</porttype>
<port>5555</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>

chmod 444 service.xml 修改完之后要将该文件的属性修改回来
esxcli network firewall refresh 刷新一下防火墙设置
esxcli network firewall ruleset rule list | grep AAAA 验证自定义服务AAAA是否生效,也可在vSphere client中查看
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  firewall