CentOS 配置防火墻操作實例(啟、停、開、閉port)
CentOS 配置防火墻操作實例(啟、停、開、閉port):
註:防火墻的基本操作命令:
查詢防火墻狀態:
[[email protected] ~]# service iptables status<回車>
停止防火墻:
[[email protected] ~]# service iptables stop <回車>
啟動防火墻:
[[email protected] ~]# service iptables start <回車>
重新啟動防火墻:
[[email protected] ~]# service iptables restart <回車>
永久關閉防火墻:
[[email protected] ~]# chkconfig iptables off<回車>
永久關閉後啟用:
[[email protected] ~]# chkconfig iptables on<回車>
1、查看防火墻狀態
[[email protected]
2、編輯/etc/sysconfig/iptables文件。
我們實例中要打開8080port和9990port
用編輯器打開/etc/sysconfig/iptables
4、保存/etc/sysconfig/iptables文件,並在終端運行
[[email protected]