You are here

Block a host (iptables firewall)

Thanks to lowendtalk.com and Alex_Liquidhost for this:

iptables -A INPUT -s x.x.x.x -j DROP

where x.x.x.x is the IP address

I haven't tried it but it seems fairly straight forward and should work.

Of course, please be careful using the iptables command since it can be used to block all connections to your server.

Good luck!

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.