1

iptables: allow OUTPUT only for http and ssh

view story
linux-howto

http://stackoverflow.com – How to allow outgoing trafic only for http and ssh? i've tried: iptables -A OUTPUT -p tcp --dport ssh -j ACCEPT iptables -A OUTPUT -p tcp --dport http -j ACCEPT but as soon as i add iptables -A OUTPUT -j DROP nothing works, it blocks everything. Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:22151 ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere (HowTos)