Page 1 of 1

How to allow port only from 1 ip address ?

Posted: 18 Jan 2019, 16:25
by tegralens
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

Re: How to allow port only from 1 ip address ?

Posted: 18 Jan 2019, 18:35
by sawbuck
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.

Re: How to allow port only from 1 ip address ?

Posted: 18 Jan 2019, 19:06
by tegralens
ok so how can i add a ip address to only access the port