I'm trying to setup a iptables which only allows traffic in via ssh and a catch all that blocks everything else coming into computer. The iptables -L output looks like this
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh DROP all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
The above appears to block anything coming into the computer except for SSH, however, it also seems to block returning traffic from an outgoing request. i.e. if I try to ping www.google.com it seems to time trying to resolve DNS. I'm assuming my DROP all blocking the response from the DNS request.
Can anyone direct me how to setup the catch-all correctly to allow returning traffic back in?