iptables firewall commands

Terminal commands for blocking incoming connections from an IP as well as viewing all currently blocked IP's:

Block an IP:

sudo iptables -A INPUT -s IP-ADDRESS -j DROP

View currently blocked IP's:

sudo iptables -L INPUT -v -n

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Categories: