一、防火墙设置
1.1 centos7
# systemctl start firewalld #启动
# systemctl stop firewalld #临时关闭,重启系统会再次运行
# systemctl status firewalld #查看状态:
# systemctl disable firewalld #开机禁用
# systemctl enable firewalld #开机启用
1.2 centos6.5 或之前版本
# service iptables status #查看防火墙状态
# service iptables stop #关闭防火墙
# chkconfig iptables --list #查看防火墙开机启动状态
# chkconfig iptables off #关闭防火墙开机启动
二、端口运行查看
# yum install net-tools #若安装忽略
# netstat -nupl #UDP类型的端口
# netstat -ntpl #TCP类型的端口
# netstat -anp #显示系统端口使用情况
“年轻时,我没受过多少系统教育,但什么书都读。读得最多的是诗,包括烂诗,我坚信烂诗早晚会让我邂逅好诗。”
by. 马尔克斯