av在线影院,91大神精品网站在线观看,黑丝美女被草,欧美人人爽,欧美美女视频在线,美女视频黄色的免费的,国产美女视频免费高视频

13
云服務(wù)器問(wèn)題
控制臺(tái)使用
基礎(chǔ)類(lèi)問(wèn)題
應(yīng)用類(lèi)問(wèn)題
網(wǎng)絡(luò)類(lèi)問(wèn)題
安全類(lèi)問(wèn)題
Linux中iptables(防火墻)中如何打開(kāi)指定的端口(centos6.x)

例:當(dāng)修改了ssh遠(yuǎn)程連接端口,如何在iptables上打開(kāi)新的端口(這里將默認(rèn)22端口號(hào)修改為33端口號(hào))

#輸入命令打開(kāi)33端口。

[root@niaoyun ~]# iptables -I INPUT -p tcp --dport 33 -j ACCEPT
#查看防火墻規(guī)則,發(fā)現(xiàn)33端口號(hào)已經(jīng)打開(kāi)了。
[root@niaoyun ~]# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:33 
295 23186 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
34 2310 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
2342 200K REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 15 packets, 1412 bytes)
pkts bytes target prot opt in out source destination
#iptables規(guī)則已經(jīng)更改,我們需要對(duì)規(guī)則進(jìn)行保存。
[root@niaoyun ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
#保存完畢,重啟iptables服務(wù)。
[root@niaoyun ~]# service iptables restart
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]

#同樣,用此方法也可以打開(kāi)web的默認(rèn)端口80

iptables -I INPUT -p tcp --dport 80 -j ACCEPT && service iptables save && service iptables restart


這條幫助是否解決了您的問(wèn)題? 已解決 未解決

提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好! 很抱歉未能解決您的疑問(wèn)。我們已收到您的反饋意見(jiàn),同時(shí)會(huì)及時(shí)作出反饋處理!

https://s19.#/z_stat.php?id=1261961198&web_id=1261961198