linux关防火墙

Posted on 2019-10-16 16:19  橙子j  阅读(126)  评论(0编辑  收藏  举报

CentOS:

# systemctl stop firewalld
# systemctl disable firewalld

 

Suse:

systemctl stop SuSEfirewall2.service

systemctl stop SuSEfirewall2_init.service

systemctl disable SuSEfirewall2.service

systemctl disable SuSEfirewall2_init.service

sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config

# 启动 sshd 服务

systemctl restart sshd

systemctl enable sshd