Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    May 2003
    Posts
    31

    Default How to unblock an ip?

    Hi,

    one of our trusted customers is blocked by BFD due too much failed logins. No he can't access the server anymore. How do I remove his ip from the block list? I've tried

    iptables -A INPUT -s 84.107.***.* -j ACCEPT

    but that doesn't work...

    Thanks in advance!

    Gunther.

  2. #2
    Member
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    237

    Default

    Gunther:

    The correct syntax to remove an entry from the iptables is:

    iptables -D INPUT Line#

    To determine the Line#, run iptables -L and count from the top which entry you want to remove.

    As an example, let's say after running the list you see:

    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    DROP all -- 111.222.333.444 anywhere
    DROP all -- 123.456.789.101 anywhere
    DROP all -- 346.778.123.010 anywhere
    acctboth all -- anywhere anywhere
    etc.

    ... and you want to remove the 123.456.789.101 entry, that would be line 3, or:

    iptables -D INPUT 3
    Last edited by RickG; 04-13-2005 at 04:04 PM.

  3. #3
    Member
    Join Date
    May 2003
    Posts
    31

    Default

    Thanks.

  4. #4
    Member rootuser's Avatar
    Join Date
    Jan 2005
    Location
    ***INDIA***
    Posts
    125

    Default

    One More Doubt If I Want To Open A Particular Dynimic Port To Particular Ip Address , What Is The Command For That.i Mean Through Iptables.

  5. #5
    Ramsy
    Guest

    Default

    take a look in /etc/apf/conf.apf

  6. #6
    Member rootuser's Avatar
    Join Date
    Jan 2005
    Location
    ***INDIA***
    Posts
    125

    Default

    Quote Originally Posted by Ramsy
    take a look in /etc/apf/conf.apf

    I want to open port 2001 . In /etc/apf/conf.apf i includeds this particular port to IG and EG sections , but it is not working .So i ask. Do u know any other way .T hanks!

  7. #7
    Member GeekPatrolMille's Avatar
    Join Date
    Mar 2004
    Location
    McKinney, Texas, USA
    Posts
    84

    Default

    Be certain to reload APF rules when modifying ports

    apf -r

    or

    apf --restart

    They both do the same thing but this will allow the existing tables in APF to be flushed and the new changes to become active

    -greg
    Gregory A. Miller
    AGBSM Networks, LLC
    McKinney, Texas
    469-247-1444

    removespam.gmiller@agbsm.net

  8. #8
    Member
    Join Date
    May 2003
    Posts
    31

    Default

    Quote Originally Posted by RickG
    Gunther:

    The correct syntax to remove an entry from the iptables is:

    iptables -D INPUT Line#

    To determine the Line#, run iptables -L and count from the top which entry you want to remove.

    As an example, let's say after running the list you see:

    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    DROP all -- 111.222.333.444 anywhere
    DROP all -- 123.456.789.101 anywhere
    DROP all -- 346.778.123.010 anywhere
    acctboth all -- anywhere anywhere
    etc.

    ... and you want to remove the 123.456.789.101 entry, that would be line 3, or:

    iptables -D INPUT 3

    Problem: this works fine but the day after the ip is in the list again and the customer can't access the server again... Do I have to save something first?

  9. #9
    FWC
    FWC is offline
    Member
    Join Date
    May 2002
    Location
    Ontario, Canada
    Posts
    354

    Default

    Quote Originally Posted by groefie
    Problem: this works fine but the day after the ip is in the list again and the customer can't access the server again... Do I have to save something first?
    Put their IP in /usr/local/bfd/ignore.hosts or tell them to stop being a dumbass and generating failed logins.

  10. #10
    Member GeekPatrolMille's Avatar
    Join Date
    Mar 2004
    Location
    McKinney, Texas, USA
    Posts
    84

    Default

    I was required to remove one entry before from /etc/apf/deny_hosts.rules because of a similar issue. This file is just a simple text file of all the IP and host names you wish to block. Delete the line you want to unblock. Now, if you have some tool in addition to APF which logs entries automatically into the firewall deny list, there may be other files to remove these entries from also but I could not tell you what that may be without more info.

    -greg
    Gregory A. Miller
    AGBSM Networks, LLC
    McKinney, Texas
    469-247-1444

    removespam.gmiller@agbsm.net

  11. #11
    Member GeekPatrolMille's Avatar
    Join Date
    Mar 2004
    Location
    McKinney, Texas, USA
    Posts
    84

    Default

    I agree with the dumbass process described by FWC... This should be applied across all user policy...
    Gregory A. Miller
    AGBSM Networks, LLC
    McKinney, Texas
    469-247-1444

    removespam.gmiller@agbsm.net

Similar Threads & Tags
Similar threads

  1. Unblock cPHulk brutes
    By FreedomBI in forum Feature Requests for cPanel/WHM
    Replies: 2
    Last Post: 02-12-2010, 11:43 PM
  2. How do I unblock my ip from my dedicated server
    By Frano8 in forum New User Questions
    Replies: 2
    Last Post: 01-20-2009, 05:18 AM
  3. Brute Force - how to unblock ip's ?
    By Cemtey in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-24-2007, 03:16 PM
  4. Somebody's IP is blocked... How do I unblock the ip address they have?
    By grabyourhosting in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-24-2007, 03:10 AM
  5. Unblock host or IP
    By dingolingo in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-20-2005, 09:22 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube