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 csf.ignore and csf.allow questions

Discussion in 'Security' started by OlympiaGuy, Mar 28, 2016.

  1. OlympiaGuy

    OlympiaGuy Member

    Joined:
    Oct 22, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Olympia
    cPanel Access Level:
    Root Administrator
    Hey great forum and I love reading daily. I have a question regarding CSF Firewall and adding IP's to the csf.ingore and csf.allow files.
    What I need to do is add my ip and a few others to these two file but as to the formating of the IP is my question.

    Depending on what tutorial I read the IP format is different. Some people say just add the Ip like
    tcp|in|d=22|s=00.00.00.00.0
    but other tutorials just show adding the IP like
    00.00.00.00.0 without the other tcp|in|d=22|s= stuff

    Can anyone advise me as to the correct formatting of putting a ip in these lists?
    I was reading and found that a easy way to add a IP to the block list is to just

    csf -d 000.00.000.0

    and it will add the ip to the deny list. and when it does so the format isn't
    tcp|in|d=22|s=00.00.00.00.0 or something like that it is just the IP

    any clarification would be awesome
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    The advanced format is for blocking the IP only from a certain port. Normal format is to just have the IP in csf.deny which blocks it from the server entirely.

    The same advanced syntax can be used to open specific ports for certain IP addresses as well. Adding an IP to csf.allow normally opens all ports to that IP address. Adding an IP to csf.ignore simply allows the IP to be ignored from brute force detection (LFD) without opening up the extra ports.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. OlympiaGuy

    OlympiaGuy Member

    Joined:
    Oct 22, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Olympia
    cPanel Access Level:
    Root Administrator
    Thank you. Only thing is they say " you can add more complex port and ip filters using the following format"
    tcp/udp|in/out|s/d=port|s/d=ip|u=uid
    So they said this is is just a optional formal if you want to? other wise just adding the IP in both files is fine?
     
  5. OlympiaGuy

    OlympiaGuy Member

    Joined:
    Oct 22, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Olympia
    cPanel Access Level:
    Root Administrator
    Thanks for clearing this up. I am just getting the hang of this and dont want to mess up on something this important.
     
Loading...

Share This Page