Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2005
    Posts
    299

    IP not being blocked properly

    Hi,

    I need to block a specific IP:
    93.6.224.242

    It adds fine when I do:
    iptables -A INPUT -s 93.6.224.242 -j DROP

    However, the IP is still accessing files and pages on the site according to Apache:
    website.com 93.6.224.242 - - [28/Jun/2009:12:51:58 +0200 blah blah

    When I ban other IP's they are blocked from accessing anything on the server (e.g. it wouldn't even reach Apache level because of firewall), but this IP just isn't banning properly.

    Any idea?

  2. #2
    Join Date
    May 2008
    Posts
    340
    Give the web server(Apache) a restart and see if the connections from that IP address are still coming in.

  3. #3
    Join Date
    Mar 2004
    Location
    Chennai India
    Posts
    115
    just restart the firewall once agian .
    /etc/init.d/iptables restart
    miOOt Chat Solutions
    live chat Software for web hosting Customer Service
    Importance of Live Chat Software for Web Hosting Business

  4. #4
    Join Date
    Jun 2006
    Location
    United Kingdom
    Posts
    1,766
    Run

    Code:
    iptables -L
    You can then double check the rule has been loaded.
    -- Adam

  5. #5
    Join Date
    Mar 2009
    Location
    /home/khunj
    Posts
    432
    Quote Originally Posted by zymic View Post

    iptables -A INPUT -s 93.6.224.242 -j DROP
    If you want to block an IP, you should use "I"nsert instead of "A"ppend.

    iptables -I INPUT -s 93.6.224.242 -j DROP

  6. #6
    Join Date
    Apr 2005
    Posts
    1,711
    Try adding a route reject for it:

    # route add 93.6.224.242 reject
    Zach E. - Kualowww.kualo.com
    Shared Web Hosting, Reseller Hosting, Cloud VPS & Dedicated Servers
    UK: 0800 138 3235 ❘ USA: 1-800-995-8256

  7. #7
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    you have to restart the service (apache in this case) to kill established connections.
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  8. #8
    Join Date
    May 2009
    Location
    SLASH ROOT
    Posts
    853
    After inserting the iptables rules, save and then restart the firewall.

    /etc/init.d/iptables save or iptables-save

    If you find difficult playing with iptables use CSF or APF along with iptables.

    If you are running Cpanel server, CSF can be integrated and managed via WHM. It does have a lot of attack mitigation features too..

  9. #9
    why not install a firewall and blcok IP address as even firewall uses IP tables in background and it is very easy to manage

  10. #10
    Join Date
    Oct 2007
    Location
    Moldova
    Posts
    103
    Quote Originally Posted by khunj View Post
    If you want to block an IP, you should use "I"nsert instead of "A"ppend.

    iptables -I INPUT -s 93.6.224.242 -j DROP
    + 1 for -I


    and you don't need to restart apache

  11. #11
    If you are finding it tough to use iptables then I think you should prefer the csf firewall it would easily work for you,

    # csf -d Ipaddress

    Just using this command will help you to deny the specific IP to contact your server.
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

  12. #12
    Join Date
    May 2009
    Location
    SLASH ROOT
    Posts
    853

Similar Threads

  1. su doesn't work properly
    By jthornton in forum VPS Hosting
    Replies: 2
    Last Post: 12-30-2007, 05:23 PM
  2. How to transfer DNS properly???
    By dav in forum Dedicated Server
    Replies: 1
    Last Post: 01-19-2006, 10:28 AM
  3. SSL doesn't work properly
    By arnot in forum Web Hosting
    Replies: 2
    Last Post: 10-14-2005, 09:54 AM
  4. Using my pc as a phone, and I mean properly!
    By jonathanbull in forum Web Hosting Lounge
    Replies: 6
    Last Post: 07-09-2004, 10:54 PM
  5. My DNS hasn't resolved properly
    By Fyrestarter in forum Hosting Security and Technology
    Replies: 4
    Last Post: 06-12-2004, 07:37 AM

Posting Permissions

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