Author Topic: Custom Webpage rather than "not solved"  (Read 1370 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
Custom Webpage rather than "not solved"
« 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 ?

Offline
****
Re: Custom Webpage rather than "not solved"
« Reply #1 on: February 10, 2023, 06:02:38 AM »
Quote
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)

Code: [Select]
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 -raThis 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)

Offline
***
Re: Custom Webpage rather than "not solved"
« Reply #2 on: February 10, 2023, 12:39:48 PM »
ummmm


i think this is the one i was looking for...


thankyou sir ...

Offline
****
Re: Custom Webpage rather than "not solved"
« Reply #3 on: February 10, 2023, 03:37:45 PM »
The one-liner above should be:
Code: [Select]
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:
Code: [Select]
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