Page 1 of 1

SSH Login Problem with CSF because of Dynamic IP

Posted: 28 Aug 2020, 15:03
by dbmtrde
Hello everybody,

I use the CSF as a firewall on my VPS.
But since I don't have a static IP, every time I get a new IP, I first have to log in via the KVM console and whitelist my new IP and only then can I connect to SSH via putty.

Can I somehow share all connections on SSH port 22 so that I can save myself the trouble?

I have already added the following rule to the /etc/csf/csf.allow file and started CSF (csf -r) but still doesn't help ..

tcp|in|d=22|s=0.0.0.0/0 # Enable all connections to SSH

Does anyone have an idea how I can solve the problem? :confused:

Re: SSH Login Problem with CSF because of Dynamic IP

Posted: 03 Sep 2020, 01:09
by ksihota
Not sure if this is what you are asking.
Can't you just add Port 22 to your allowed list in the csf.conf file? I assume you are talking about the IP address (changing) on the computer you use to access your server and not the Server's IP address.

# Allow incoming TCP ports
TCP_IN = "20,21,22,25,26,53,80,110,143,443,465,587,993,995"

# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,26,53,80,110,113,443,587,993,995"