How to allow port only from 1 ip address ?

3 posts Page 1 of 1
tegralens
Junior Member
Posts: 5
Joined: 19 Nov 2018, 18:52


I have csf firewall up and working on a centos 7. I have a web control panel that i only want access from a certain ip address. I am not certain about how to do this.

So I know the port is open on the csf.conf. I know I am supposed to add the port and ip address in the csf.allow.

But I am not sure how to do this. Do i remove the port from the csf.conf file ? Then add only the port and ip address in the csf.allow ?

I did find out how to do it based on this website. https://www.knownhost.com/wiki/security ... losed-port but i am not sure how to allow only the port on the ip address i want.

Thanks
sawbuck
Junior Member
Posts: 361
Joined: 10 Dec 2006, 16:20


Generally if it is one IP (or IPs) to a specific port we remove that port from csf.conf. That assumes it is not required for broader access - like port 25.

The guide you mention along with the readme.txt for CSF (https://download.configserver.com/csf/readme.txt) section 10 should provide enough information.

Remember to restart CSF/LFD.
tegralens
Junior Member
Posts: 5
Joined: 19 Nov 2018, 18:52


ok so how can i add a ip address to only access the port
3 posts Page 1 of 1