+ Reply to Thread
Results 1 to 2 of 2

Thread: Ban an IP Address From The Server

  1. #1
    Hosting Guru sunny_ag is on a distinguished road
    Join Date
    Jul 2006
    Location
    where the world starts
    Posts
    50

    Ban an IP Address From The Server

    Have a user that keeps hammering your FTP or trying to login over and over and over again that you just want to ban and never see again? We'll show a quick and dirty method to ban an IP address from the server.

    We commonly receive questions like:
    "I would like to ban that ip address to prevent the access to the server.

    how can i ban that Ip address from the server?"

    Simple!

    1) Login to the server as and su - to root.

    2) If you are running iptables, you can enter:

    iptables -A INPUT -s <IP> -j DROP

    3) If you have APF firewall installed

    apf -d <ip>

    4) When you reboot this IP ban will be removed, meaning the IP will no longer be banned anymore.
    If you have APF you can get around this by opening the deny hosts file.

    pico /etc/apf/deny_hosts.rules

    Scroll to the bottom and paste in the IP address.
    Ctrl+X then Y to save the changes and exit.

    5) Restart APF
    /etc/apf/apf -r

  2. #2
    Hosting Guru Jaahntsol is on a distinguished road
    Join Date
    Aug 2018
    Location
    Asia
    Posts
    78
    Thanks for the informative thread. To someone like me without the coding skills, it is too complicated. I use a control panel which intergrates with iptables for doing this. It enables me to easily block the naughty IP addresses and ports after I set up iptables rules.

+ Reply to Thread

Similar Threads

  1. 530 error unknown ip address please help
    By sprabhu in forum Web Hosting Forum
    Replies: 0
    Last Post: 04-14-2008, 07:07 AM
  2. [UK] Fully Managed Dedicated Server - Save 10% on the total server cost
    By webhosting.uk.com in forum Dedicated Server Offers
    Replies: 0
    Last Post: 04-08-2008, 02:28 PM
  3. Get massive server power, without paying the cost for a dedicated server.
    By ashish in forum Shared and Reseller Hosting Offers
    Replies: 0
    Last Post: 04-28-2006, 09:20 AM
  4. Ban an IP Address From The Server
    By incript_services in forum Web Hosting Tutorials
    Replies: 3
    Last Post: 09-03-2005, 08:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts