Can't access instance after setting up iptables rules
- For rules in the
OUTPUT
chain you should specify the source port match (--sport
), not the destination port (--dport
). - Anyway
DROP
policy in theOUTPUT
chain isn't a common practice. - Read the iptables tutorial and example rule sets.
- To avoid of lost of the connection, better use
iptables-save
andiptables-apply
tools.