1

I typed iptables -F by mistake, how can I undo it?

I see now strange activity on my routers IP, scanned it and saw that strange ports are open. How can I block these ports?

valiano
  • 1,985

1 Answers1

1

According to This Post iptables -F only flushes out the currently running rule set and everything will be back after reboot.

To block ports, you can follow This Howto or use the following (blocking incoming on port 80 as an example):

sudo iptables -A INPUT -p tcp --destination-port 80 -j DROP
sudo service iptables save
Joshua Besneatte
  • 4,773
  • 5
  • 23
  • 42