Linux:Linux操作防火牆命令


首先查看Linux的防火牆是否關閉

firewall-cmd


Linux上新用的防火牆軟件,跟iptables差不多的工具。

 

firewall-cmd --state # 顯示防火牆狀態

systemctl start  firewalld # 啟動

systemctl status firewalld # 或者 firewall-cmd --state 查看狀態

systemctl disable firewalld # 停止

systemctl stop firewalld  # 禁用

 

詳細命令查看:https://blog.csdn.net/GMingZhou/article/details/78090963

 

然后修改網絡配置

輸入命令
vi /etc/sysconfig/network-scripts/ifcfg-ens33

 

修改ONBOOT屬性值的no改為yes

 

重啟服務

service network restart(重啟服務命令)

ip addr show(查看ip信息命令)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM