Here are the rules I setup..
iptables -P INPUT DROP
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
When I try to make an outgoing connection, it gets blocked.
What's missing?
Here's the output from iptables -n -L
Chain INPUT (policy DROP)
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 source IP range 93.0.0.0-93.255.255.255
tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 state NEW recent: SET name: DEFAULT side: source
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 state NEW recent: UPDATE seconds: 60 hit_count: 15 name: DEFAULT side: source
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Note.. the first rule is there to block a particular range and the next two are supposed to limit the number of requests anyone can make within 60 seconds.
When I try to make an outgoing connection, it gets blocked.
. What do you mean by an "outgoing connection"? What happens when the connection is "blocked"? Command outputs, logs, etc. would be helpful.