[問題] iptables設定問題

看板Linux作者 (別急著吃棉花糖)時間14年前 (2011/07/04 17:06), 編輯推噓4(4012)
留言16則, 5人參與, 最新討論串1/8 (看更多)
各位前輩好: 以下是我目前的iptable設定,但不知為什麼無法開啟127.0.0.1的首頁呢? apache也有重新啟動了 謝謝各位前輩指導 Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:www Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 124.11.170.53

07/04 18:19, , 1F
先關閉iptables再測試以確認是否為iptables的問題
07/04 18:19, 1F

07/04 20:16, , 2F
1. service iptables stop
07/04 20:16, 2F

07/04 20:17, , 3F
2. service httpd start
07/04 20:17, 3F

07/04 20:17, , 4F
3. pstree -pu | grep httpd
07/04 20:17, 4F

07/04 20:17, , 5F
4. netstat -anp | grep 80
07/04 20:17, 5F

07/04 20:18, , 6F
先關防火牆 啟動httpd 查看網路開啟port
07/04 20:18, 6F

07/04 20:18, , 7F
排除httpd 問題再去調整iptables
07/04 20:18, 7F

07/04 20:18, , 8F
5. 把SELINUX 關閉 測試看看
07/04 20:18, 8F

07/04 20:52, , 9F
樓上二位前輩,我用Ubuntu,好像不能直接關閉iptables
07/04 20:52, 9F

07/04 21:05, , 10F
不能關閉就下 iptables -t filter -F
07/04 21:05, 10F

07/04 21:06, , 11F
查了網路,Ubuntu預設是沒有防火牆和selinux的~我裝server
07/04 21:06, 11F

07/04 21:09, , 12F
t大,這是把我下的2條規則都清了~
07/04 21:09, 12F

07/04 21:10, , 13F
因我是為了要測試這2條規則在input 設為drop下能否啟動web
07/04 21:10, 13F

07/04 22:36, , 14F
你可以先清掉,再下那兩條規則。要不然常常先被擋了
07/04 22:36, 14F

07/04 22:37, , 15F
對了,我很嫩 XD RHCE 年齡才一星期多一點 還是別亂回
07/04 22:37, 15F

07/05 10:19, , 16F
aa-status 有apache2的內容嗎?
07/05 10:19, 16F
文章代碼(AID): #1E4OA82m (Linux)
文章代碼(AID): #1E4OA82m (Linux)