Block all expect .... on port 22
Posted: 23 Sep 2015, 09:42
Hi,
I'm having trouble getting CSF firewall to work...
My understanding is that the default behaviour is block/deny all. However this doesn't seem to be happening.
In csf.allow I have:
my.ip.address.here
And then I want to "Block all other access to port 22 / ssh"
I would have expected this to work by default if the default is deny all but nope.
I added the following to csf.deny:
tcp|in|d=22|s=0.0.0.0
And still I can SSH in from another IP
And if I add:
0.0.0.0/22
Again I can still SSH from another IP
I can only block IPs by using:
0.0.0.0/0
However this blocks ALL ports, so the end user cannot even see port 80/website.
Ultimately I want to:
Allow anyone to see port 80 and 433
Block everyone apart from my IPs on port 22 and 21
Any advice, most appreciated.
Many thanks
I'm having trouble getting CSF firewall to work...
My understanding is that the default behaviour is block/deny all. However this doesn't seem to be happening.
In csf.allow I have:
my.ip.address.here
And then I want to "Block all other access to port 22 / ssh"
I would have expected this to work by default if the default is deny all but nope.
I added the following to csf.deny:
tcp|in|d=22|s=0.0.0.0
And still I can SSH in from another IP
And if I add:
0.0.0.0/22
Again I can still SSH from another IP
I can only block IPs by using:
0.0.0.0/0
However this blocks ALL ports, so the end user cannot even see port 80/website.
Ultimately I want to:
Allow anyone to see port 80 and 433
Block everyone apart from my IPs on port 22 and 21
Any advice, most appreciated.
Many thanks