Page 1 of 1

Blocking access on an IP

Posted: 29 Jul 2013, 12:45
by ab92012
Hi

I have several hosting accounts on my cPanel server, however for one of the accounts I want to disable access to all connections apart from 1 specified IP and port (including disabling apache access).

The account has a dedicated IP address.

Is it possible to do this?

Thanks

Re: Blocking access on an IP

Posted: 29 Jul 2013, 20:35
by Sergio
CSF is not for that type of things, but you can try to do the following, I have never tried but give it a try.
1. Open CSF gui and go to DENY SERVER IPs and select the IP that you don't want to give access.
2. Then go to FIREWALL ALLOW IPs and add a line like this:
tcp|out|d=port|s=xxx.xxx.xxx.xxx|d=yyy.yyy.yyy.yyy
where xxx.xxx.xxx.xxx is the IP that you want to allow that port to your server yyy.yyy.yyy.yyy address.

For more info, read the "10. Advanced Allow/Deny Filters" on the readme file.

Sergio