CentOS7使用的是firewall防火墙,不再是原来的iptables
查看firewall防火墙状态
firewall-cmd –state 或者 systemctl status firewalld
打开防火墙
systemctl start firewalld
关闭防火墙
systemctl stop fir……继续阅读 »
往事如烟
5年前 (2020-10-28) 2131浏览 0评论
0个赞
Linux Centos7修改ssh远程登录的默认22端口,简单几步就可以搞定了。
修改配置sshd_config文件
[root@localhost ~]# vim /etc/ssh/sshd_config
看到默认端口是22,我这里已经修改为50011了,(端口不要大于65535,且不能被其他进程占用),修改之前建议先保留原有22端口,新增端口打开后……继续阅读 »
往事如烟
5年前 (2020-10-28) 3119浏览 0评论
0个赞
下面是CentOS5 和7的口令,略有不同。
1:查看防火状态
systemctl status firewalld
service iptables status
2:暂时关闭防火墙
systemctl stop firewalld
service iptables stop
3:永久关闭防火墙
systemctl disable firew……继续阅读 »
往事如烟
6年前 (2019-11-24) 2329浏览 0评论
0个赞