Skip to content

Block a remote IP Address using iptables

Ban a remote IP Address using iptables

Answer:

iptables -A INPUT -s IP -j DROP

Replace IP with the actual remote IP address.

Note that the blocking will be lost when server reboot. You would need to save the rule(s) into a script and reload when server reboot.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  1. How to transfer your identity.pub to the remote machine’s authorized_keys?
  2. Running a command on the remote server
  3. Copy file to remote server using scp
  4. Convert IP address to HEX in Bash script
  5. How to mount a NFS share?

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*