Linux : How to open a port from a specific source IP address with CSF

By | December 13, 2019

It is possible with Config Security Firewall (CSF) to open an inbound port from a specific source IP address. This is defined outside of the global configuration (csf.conf), within a dedicated config file.

1. Open the following file with your favorite text editor :

2. Follow this syntax to open a specific port for a specific IP [tcp/udp|in/out|s/d=port|s/d=ip] :

Protocol|TrafficDirection|SourceDestinationIP

Example : To open port 8443, using TCP protocol from IP 192.168.15.15, the syntax would be :

Note : One statemet per line must be entered.

3. Save the file and reload CSF :

Be Sociable, Share!