Is it possible to open a CSF-LFD closed port without attaching an IP to it?

Solution 1:

As it seems it can be changed via:

nano /etc/csf/csf.conf

There search "TCP_IN" (without quoute marks) and there add 10000 to

TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995"

So it would be:

TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,10000"

Save and then restart the CSF service via service csf restart.


I also wanted to go pro and automate this process as part of a script, so I did:

sed -i 'TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995"/TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,10000"/g' /etc/csf/csf.conf

But in case you have yet to learn basic sed and basic Bash scripting, just use the first way of changing it manually (I would recommend to learn basic sed and basic Bash scripting for new commers as it could save you much time in Unix work).