1

I wanted to test removing all default iptable rules and replacing them with my own, using ufw. I have a very simple LAN that just needs 1/2 dozen ports, and iptable defaults are causing major conflicts when I try blocking IP's.

So I created the ufw rule: ufw allow 22/tcp then I issued: echo "ufw reload" | at now + 1 min and iptables --flush with the expectation that my ssh session would be restored after a minute. But that didn't happen - I had to reboot the server running ufw. Is there anything else in the default iptables that is mandatory to restore a ssh session?

1

UFW is just a tool that manipulates iptables rules. This means if you apply an UFW rule (in this case port 22) and run iptables -F after that, you will flush the rule you've just entered with UFW.

You can check your rule by doing iptables -L after applying the ufw rule.

|improve this answer|||||
  • 1
    I think you missed the use of at in the question. – womble Oct 27 '17 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.