开启端口
firewall-cmd –zone=public –add-port=873/tcp –permanent
查询端口号80 是否开启:
firewall-cmd –query-port=80/tcp
删除一个端口:
firewall-cmd –zone=public –remove-port=31199/tcp –permanent
重启防火墙:
firewall-cmd –reload
查询有哪些端口是开启的:
firewall-cmd –list-port

开放指定端口给指定ip

firewall-cmd –permanent –add-rich-rule=”rule family=”ipv4″ source address=”23.11.11.1″ port protocol=”tcp” port=”1199″ accept”

发表评论

邮箱地址不会被公开。 必填项已用*标注