Please help! Iptables
I am a big fan of Fedora 11. Also, I am using wireless broadband USB to access internet. For the sake of practising Iptables, I configured my Iptables as the following:
# Generated by iptables-save v1.4.3.1 on Sat Jan 16 16:50:19 2010
*filter
:INPUT DROP [49:5544]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [50:2918]
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.1/32 -p tcp -m tcp --tcp-flags FIN,SYN,ACK FIN,SYN,ACK -j AC
CEPT
-A INPUT -d 127.0.0.1/32 -p tcp -m state --state RELATED,ESTABLISHED -j
ACCEPT
-A INPUT -d 127.0.0.1/32 -p tcp -m state --state NEW -m tcp --sport 80 -
j ACCEPT
-A INPUT -d 127.0.0.1/32 -p tcp -m state --state NEW -m tcp --sport 443
-j ACCEPT
-A INPUT -d 127.0.0.1/32 -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -d 127.0.0.1/32 -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A INPUT -d 127.0.0.1/32 -p icmp -m icmp --icmp-type 0 -j ACCEPT
COMMIT
# Completed on Sat Jan 16 16:50:19 2010
When I use "service iptables stop". I can access internet. But when I start iptables, I couldn't access internet. Then I use this command "netstat -ant" to check if there is anything blocking access to internet. And this is the result:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:32773 0.0.0.0:* LISTEN
tcp 0 0 :::111 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
It seems like there is something wrong with my iptables configuration but I am at my wit's end. I couldn't figure out why I couldn't access internet with my iptables on. And I am also Linux newbie. Any help would be appreciated.
|