Suhosin Install Guide Published: Mar 19, 2007
  • Rating

    5/5

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.

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

  • Rating

    5/5

Related Articles

Comments (5)

  • Gravatar - ogy
    ogy 07:14, May 6, 2007
    does it work with on cpanel servers with phpsuexec
  • Gravatar - Steve
    Steve 15:44, May 17, 2007
    Yes Suhosin works on cPanel servers with PHPSuexec
  • Gravatar - hassson
    hassson 00:43, June 17, 2007
    I added<br />
    <br />
    include_path = ".:/usr/lib/php:/usr/local/lib/php:/usr/lib/php/extensions:/usr/lib/php/extensions/no-debug-non-zts-20020429:" ;<br />
    <br />
    And when I add<br />
    <br />
    extension_dir = /usr/lib/php/extensions/no-debug-non-zts-20020429/ ; directory in which the loadable extensions (modules) reside<br />
    <br />
    Httpd Failed
  • Gravatar - Mohammed ALHAJRI
    Mohammed ALHAJRI 22:24, July 11, 2007
    Hi,<br />
    <br />
    Good informatins and thankyou for that :)<br />
    <br />
    i have installed it and evrything is ok , just i want to know how can i make error page that appearant when any user uploade some dangrous file eg : r57.php and c99.php<br />
    <br />
    can you tell me where should i change?><br />
    <br />
    Best Regards
  • Gravatar - Intasar
    Intasar 05:40, May 28, 2011
    Thank you very much, the advanced configuration ++++++Reputation. you saved loads of time of peoples.

    Thanks again.

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2017 WebHostGear.com