Completely botched iptables... Help!
While I can access my node using Lish, I can't ssh into the server (timeout). Or ping it. Or access web stuff on port 80.
I've tried to flush iptables and ip6tables rules/restore them to the most "basic" setup, but now I am completely lost.
Right now "sudo iptables -L -nv" in Lish returns:
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 /* Allow loopback connections */
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 /* Allow Ping to work as expected */
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22,80
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Where do I go from here?
Thanks in advance.
1 Reply
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
Then clean your INPUT chain:
iptables -F INPUT
You now have a clean firewall ruleset.