Results 1 to 3 of 3
  1. #1

    Cant get the CSF allow list to work

    Hi, I was wondering if someone could help with a problem im having with the CSF firewall on centos, Im trying to block some ports but allow only specific IP addresses to access these ports, so I edited the csf config

    nano /etc/csf/csf.conf

    and removed the ports I didn't want access to, this worked and only the IP address I used to install CSF was allowed access to the ssh and port 80 other IP addresses are denied, I then tried to allow access from another IP address by enabling IGNORE_ALLOW = "0" in the csf config and adding that IP address to the csf.allow list, I then reloaded the CSF rules, that didn't work.

    I then restarted CSF and again that didn't work the new IP address was still being blocked,so finally I added the IP address to csf.ignore and rebooted, but its still not working, I then removed the first IP address from the csf.allow list and restarted but access from the first IP address was not denied,

    so I come to the conclusion that the csf.allow list isn't working for me, Im having this issue on both a dedicated server and a VPS running centos 6.2 and centos 6.4.

    Iv been trying for a while with no luck so would appreciate any help on what Im doing wrong.

    Thanks

  2. #2
    Join Date
    Oct 2012
    Location
    Europe and USA
    Posts
    922
    This method will not work for allowing only specific IPs to access specific ports.

    To do this, follow these steps. For example, let's say that you want to block the WHM ports 2086 and 2087 to anyone and allow it only for your IP address 11.22.33.44


    First, open the ports in /etc/csf/csf.conf
    so ports 2086,2087 should be included in the TCP_IN section.

    Then add these lines in /etc/csf/csf.allow

    Code:
    tcp|in|d=2086|s=11.22.33.44
    tcp|in|d=2087|s=11.22.33.44
    Then add this lines in /etc/csf/csf.deny

    Code:
    tcp|in|d=2086|s=0.0.0.0/0
    tcp|in|d=2087|s=0.0.0.0/0
    Restart CSF and then WHM (ports 2086 and 2087) should be accessible only from your IP address 11.22.33.44
    Network Panda :: Web Hosting SSD Powered :: Reseller Hosting
    Instant activation, fast servers, SSD disks, cPanel, Softaculous 1-click apps installer, daily backups, SSL certificates
    Multiple hosting locations: USA, Canada, France, UK, Germany, Italy, Spain, Poland, Finland

  3. #3
    Quote Originally Posted by NetworkPanda View Post
    This method will not work for allowing only specific IPs to access specific ports.

    To do this, follow these steps. For example, let's say that you want to block the WHM ports 2086 and 2087 to anyone and allow it only for your IP address 11.22.33.44


    First, open the ports in /etc/csf/csf.conf
    so ports 2086,2087 should be included in the TCP_IN section.

    Then add these lines in /etc/csf/csf.allow

    Code:
    tcp|in|d=2086|s=11.22.33.44
    tcp|in|d=2087|s=11.22.33.44
    Then add this lines in /etc/csf/csf.deny

    Code:
    tcp|in|d=2086|s=0.0.0.0/0
    tcp|in|d=2087|s=0.0.0.0/0
    Restart CSF and then WHM (ports 2086 and 2087) should be accessible only from your IP address 11.22.33.44
    Thanks so much, this method works

Similar Threads

  1. Manual edit csf firewall csf.allow or csf.ignore?
    By hostyourdream in forum Hosting Software and Control Panels
    Replies: 8
    Last Post: 09-14-2015, 06:31 PM
  2. CSF - blocklists, do you use it, which list you find works best?
    By sh33pz in forum Hosting Security and Technology
    Replies: 1
    Last Post: 06-25-2013, 10:54 AM
  3. do long do you empty csf deny list one time ?
    By ttgt in forum Hosting Security and Technology
    Replies: 4
    Last Post: 05-08-2011, 01:38 PM
  4. cron to flush ip from csf deny list except those marked as do not delete
    By sharmaine1111 in forum Hosting Security and Technology
    Replies: 6
    Last Post: 12-05-2009, 11:05 PM
  5. How to disbale all iptable and all csf firewall blocks ip list
    By nabeelamjad in forum Hosting Security and Technology
    Replies: 7
    Last Post: 09-03-2009, 03:50 PM

Posting Permissions

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