Page 1 of 1

Allowed IP ranges dont work

Posted: 20 Apr 2024, 16:48
by ruthygels1999
Dear Sir,

I have installed CSF firewall on Centos Stream 9 on my VPS server successfully without errors.

However, after I set some IP ranges in this file:

$ vi /etc/csf/csf.allow

like:

###############################################################################
# Copyright 2006-2018, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
# The following IP addresses will be allowed through iptables.
# One IP address per line.
# CIDR addressing allowed with a quaded IP (e.g. 192.168.254.0/24).
# Only list IP addresses, not domain names (they will be ignored)
#
# Advanced port+ip filtering allowed with the following format
# tcp/udp|in/out|s/d=port|s/d=ip
# See readme.txt for more information
#
# Note: IP addressess listed in this file will NOT be ignored by lfd, so they
# can still be blocked. If you do not want lfd to block an IP address you must
# add it to csf.ignore
tcp|out|u=0 # Added by DirectAdmin - Thu Apr 18 19:42:01 2024
udp|out|u=0 # Added by DirectAdmin - Thu Apr 18 19:42:01 2024
x.x.x.x # csf SSH installation/upgrade IP address - Fri Apr 19 05:55:07 20

x.x.x.0/24
x.x.x.0/24
x.x.x.0/24

I can still access SSH from other IP addresses not belonging the above IP ranges.

Can you please advise how to fix this issue?

Thanks

Re: Allowed IP ranges dont work

Posted: 22 Apr 2024, 09:30
by ruthygels1999