中文字幕亚洲第一精品|精品国产免费一区二区|久久婷婷五月六月综合版|中文字幕熟妇久久久人妻|久久综合精品国产一区无码|国产成人精品永久免费视频|午夜亚洲国产精品理论片a级|久久精品一区二区三区无码护土

 訪問手機(jī)版  

Linux常用命令|Linux培訓(xùn)學(xué)習(xí)|考試認(rèn)證|工資待遇與招聘,認(rèn)準(zhǔn)超級(jí)網(wǎng)工!

招聘|合作 登陸|注冊(cè)

網(wǎng)絡(luò)工程師培訓(xùn)

當(dāng)前位置:網(wǎng)絡(luò)工程師 > 技術(shù)課程 > linux > 熱點(diǎn)關(guān)注 > linux常用命令

Linux 各種命令

時(shí)間:2019-08-16

linux格式化命令_linux 命令_linux命令

linux查看防火墻狀態(tài)及開啟關(guān)閉命令

#查看防火墻狀態(tài)
[root@localhost /]# service iptables status
表格:filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
#防火墻開啟,關(guān)閉防火墻
[root@localhost /]# service iptables stop
iptables:清除防火墻規(guī)則:                                 [確定]
iptables:將鏈設(shè)置為政策 ACCEPT:filter                    [確定]
iptables:正在卸載模塊:                                   [確定]
[root@localhost /]# 
[root@localhost /]# 
[root@localhost /]# service iptables status
iptables:未運(yùn)行防火墻。
#防火墻關(guān)閉,開啟防火墻
[root@localhost /]# service iptables start
iptables:應(yīng)用防火墻規(guī)則:                                 [確定]
[root@localhost /]#
#查看防火墻狀態(tài)
[root@localhost /]# /etc/init.d/iptables status
表格:filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination        
#防火墻開啟,關(guān)閉防火墻
[root@localhost /]# /etc/init.d/iptables stop
iptables:清除防火墻規(guī)則:                                 [確定]
iptables:將鏈設(shè)置為政策 ACCEPT:filter                    [確定]
iptables:正在卸載模塊:                                   [確定]
[root@localhost /]# 
[root@localhost /]# 
[root@localhost /]# /etc/init.d/iptables status
iptables:未運(yùn)行防火墻。
[root@localhost /]#
#防火墻關(guān)閉,開啟防火墻
[root@localhost /]# /etc/init.d/iptables restart
iptables:應(yīng)用防火墻規(guī)則:                                 [確定]
[root@localhost /]#