CentOS7防火墙开放指定IPSSH登录

firewall-cmd --permanent --remove-service=ssh
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.0.0/24" port protocol="tcp" port="22" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="22" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="127.0.0.0/24" port protocol="tcp" port="22" accept'
 
systemctl enable firewalld
systemctl status firewalld
firewall-cmd --reload
firewall-cmd --zone=public --list-rich-rules
systemctl restart firewalld
© Copyright Notice
THE END
If you like it, please support it.
like0Appreciate Share
Comment Grab the sofa
avatar
Welcome to leave valuable insights!
submit
avatar

Nick name

Cancel
Nick nameexpressioncodepicture

    There are currently no comments available