The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CSf Firewall: Edit csf.deny, the IP address deny file (Currently:1000 permanent IP b

Discussion in 'Security' started by crazyaboutlinux, Dec 9, 2010.

  1. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Hi there,

    there is 1000 permanent IP bans in the csf.deny file

    Edit csf.deny, the IP address deny file (Currently: 1000 permanent IP bans)

    I want to release some ips from this file

    what i want is release all Ips which starts contain 113.244.11.xxx

    see example

    113.244.11.xxx
    113.244.12.xxx
    113.244.22.xxx
    113.244.33.xxx
    113.244.64.xxx
    113.244.67.xxx


    there are more than 150 lines which start contains from 113.244
     
    #1 crazyaboutlinux, Dec 9, 2010
    Last edited: Dec 9, 2010
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Re: CSf Firewall: Edit csf.deny, the IP address deny file (Currently:1000 permanent I

    This seems to me a question better asked on the ConfigServer forums.


    You might want to read the details on that setting, 1000 is a high number to use, IMO.


     
  3. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Re: CSf Firewall: Edit csf.deny, the IP address deny file (Currently:1000 permanent I

    Hi Infopro

    thanks for the suggestion already contacted ConfigServer forums but i have got a solution from WHT

    I just used

    sed -i '/113\.244\.../d' csf.deny

    All lines were successfully removed from csf.deny file which IPs are starts from 113.224


    this is the solutions which i wanted
     
  4. Cindu

    Cindu Well-Known Member

    Joined:
    Feb 7, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Re: CSf Firewall: Edit csf.deny, the IP address deny file (Currently:1000 permanent I

    Hello Nilesh,

    Sed is such a powerful command ! Thanks for sharing it with us!
     
  5. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Re: CSf Firewall: Edit csf.deny, the IP address deny file (Currently:1000 permanent I

    yeah sed is really most powerful command
     
  6. Cindu

    Cindu Well-Known Member

    Joined:
    Feb 7, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Re: CSf Firewall: Edit csf.deny, the IP address deny file (Currently:1000 permanent I

    Hey!

    Yoo to SED !!
     
Loading...

Share This Page