CentOS 6.x & Fedora17 開啟8080埠給遠端電腦訪問:防火牆 iptables
參考:[url]http://czpae86.iteye.com/blog/1634564[/url]來設定,並沒有成功,因為我是把-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT放在commit的前面,不知到什麼原因,一直沒有成功,
後來我把它放在22埠後面,然後就可以了,是啥子原因呢?
[color=red][b]CentOS 6.4[/b][/color]
# cd /etc/sysconfig
# vi iptables
一定要在:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
的後面增加:
[color=blue]-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT[/color]
然後儲存,就可以了
[b][color=red]注意:要是在commit前面增加,貌似也不可以,難道INPUT一定要在一起?[/color][/b]
#[color=red][b]service iptables restart[/b][/color]
iptables:清除防火牆規則: [確定]
iptables:將鏈設定為政策 ACCEPT:filter [確定]
iptables:正在解除安裝模組: [確定]
iptables:應用防火牆規則: [確定]
[color=red]上面操作可能引起其他問題
正確操作如下:[/color]
[color=red][b]Fedora17 [/b][/color]
重啟就好
[size=large][color=red][b]Centos 6.5快捷設定埠[/b][/color][/size]
開啟埠:
CentOS 6 iptables 開放埠80 3306 22等
#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
然後儲存:
#/etc/init.d/iptables save
檢視開啟的埠:
# /etc/init.d/iptables status
極端情況
#重啟防火牆
service iptables restart
後來我把它放在22埠後面,然後就可以了,是啥子原因呢?
[color=red][b]CentOS 6.4[/b][/color]
# cd /etc/sysconfig
# vi iptables
一定要在:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
的後面增加:
[color=blue]-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT[/color]
然後儲存,就可以了
[b][color=red]注意:要是在commit前面增加,貌似也不可以,難道INPUT一定要在一起?[/color][/b]
#[color=red][b]service iptables restart[/b][/color]
iptables:清除防火牆規則: [確定]
iptables:將鏈設定為政策 ACCEPT:filter [確定]
iptables:正在解除安裝模組: [確定]
iptables:應用防火牆規則: [確定]
[color=red]上面操作可能引起其他問題
正確操作如下:[/color]
/sbin/iptables -I INPUT -p tcp --dport 9080 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables status
[color=red][b]Fedora17 [/b][/color]
重啟就好
[size=large][color=red][b]Centos 6.5快捷設定埠[/b][/color][/size]
開啟埠:
CentOS 6 iptables 開放埠80 3306 22等
#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
然後儲存:
#/etc/init.d/iptables save
檢視開啟的埠:
# /etc/init.d/iptables status
極端情況
#重啟防火牆
service iptables restart
相關文章
- centos 開啟防火牆指定埠CentOS防火牆
- linux下修改防火牆,開啟8080埠Linux防火牆
- centos 6.x 7.x防火牆開啟埠範圍IP地址 配置CentOS防火牆
- CentOS開啟防火牆及開放指定埠CentOS防火牆
- Centos7 開啟80埠防火牆命令CentOS防火牆
- linux下mysql開啟遠端訪問許可權及防火牆開放3306埠LinuxMySql訪問許可權防火牆
- Linux 防火牆開放特定埠 (iptables)Linux防火牆
- Centos iptables防火牆設定CentOS防火牆
- CentOS 7 開放防火牆埠CentOS防火牆
- CentOS下開放防火牆埠CentOS防火牆
- Centos7 防火牆(firewall)開埠CentOS防火牆
- MySQL 開啟 3306 埠遠端訪問MySql
- 阿里雲Centos配置iptables防火牆阿里CentOS防火牆
- CentOS7使用firewalld開啟關閉防火牆與埠CentOS防火牆
- Centos 7防火牆firewalld開放80埠CentOS防火牆
- CentOS之——CentOS7安裝iptables防火牆CentOS防火牆
- Windows開啟防火牆後SAP不能訪問Windows防火牆
- 使用Tor繞過防火牆進行遠端匿名訪問防火牆
- 防火牆IPTABLES防火牆
- 開啟、關閉防火牆或者開放埠防火牆
- 解決開啟Windows防火牆後,其他電腦ping不通問題Windows防火牆
- CentOS8檢視防火牆狀態,開啟/關閉防火牆CentOS防火牆
- CentOS 中 iptables 和 firewall 防火牆的相關命令CentOS防火牆
- Iptables防火牆應用防火牆
- iptables防火牆規則防火牆
- linux防火牆iptablesLinux防火牆
- 防火牆iptables 設定防火牆
- 動態iptables 防火牆防火牆
- Linux下防火牆開啟相關埠及檢視已開啟埠Linux防火牆
- ubuntu下開啟/關閉防火牆 及埠 - 命令Ubuntu防火牆
- linux在防火牆上開啟1521埠Linux防火牆
- win重啟遠端電腦
- 基於iptables防火牆堵漏防火牆
- 動態 iptables 防火牆(轉)防火牆
- NAT iptables防火牆(script)(轉)防火牆
- iptables 配置LINUX防火牆Linux防火牆
- 在防火牆上開發Oracle埠的問題防火牆Oracle
- Windows上Oracle開放防火牆埠問題(轉)WindowsOracle防火牆