Control Web Panel
Security => CSF Firewall => Topic started by: PakPos on February 10, 2023, 05:23:18 AM
-
hello
is there any way to redirect blocked visitor ip from firewall to something.tld/you-are-blocked.html rather than just unable to connect ?
-
Messenger service
Enabling this feature allows CSF to send a more informative message to the client when a block is applied. This feature has both pros and cons. On one hand, enabling it provides more information to the client, and thus may cause less frustration for instance in case of failed logins. On the other hand, this provides more information, which might make it easier for an attacker to attack your VPS.
https://codepre.com/en/como-configurar-messenger-en-csf-parte-1.html#:~:text=This%20one%20line%20command:%201%20backup%20of%20the,logged%20in%20as%20root%20or%20have%20sudo%20access) (https://codepre.com/en/como-configurar-messenger-en-csf-parte-1.html#:~:text=This%20one%20line%20command:%201%20backup%20of%20the,logged%20in%20as%20root%20or%20have%20sudo%20access))
p /etc/csf/csf.conf{,.backup} && csf -u && sed -i 's/MESSENGER = "0"/MESSENGER = "1"/g' /etc/csf/csf.conf ; sed -i 's/MESSENGERV2 = "0"/MESSENGERV2 = "1"/g' /etc/csf/csf.conf ; sed -i 's/MESSENGER_HTTPS_IN = ""/MESSENGER_HTTPS_IN = "443"/g' /etc/csf/csf.conf ; useradd csf -s /bin/false ; csf -ra
This one line command:
backs up the CSF configuration file
updates CSF to the latest version
make the necessary changes to the configuration file
then restart the CSF services to enable the messaging feature
(You will need to be logged in as root or have sudo access)
-
ummmm
i think this is the one i was looking for...
thankyou sir ...
-
The one-liner above should be:
cp /etc/csf/csf.conf{,.backup} && csf -u && sed -i 's/MESSENGER = "0"/MESSENGER = "1"/g' /etc/csf/csf.conf ; sed -i 's/MESSENGERV2 = "0"/MESSENGERV2 = "1"/g' /etc/csf/csf.conf ; sed -i 's/MESSENGER_HTTPS_IN = ""/MESSENGER_HTTPS_IN = "443"/g' /etc/csf/csf.conf ; useradd csf -s /bin/false ; csf -ra
And here it is as multiple lines:
cp /etc/csf/csf.conf{,.backup}
csf -u
sed -i 's/MESSENGER = "0"/MESSENGER = "1"/g' /etc/csf/csf.conf
sed -i 's/MESSENGERV2 = "0"/MESSENGERV2 = "1"/g' /etc/csf/csf.conf
sed -i 's/MESSENGER_HTTPS_IN = ""/MESSENGER_HTTPS_IN = "443"/g' /etc/csf/csf.conf
useradd csf -s /bin/false
csf -ra