CSF Messenger - Show users the IP Blocked message via HTTPS

Greg M

Active Member
May 26, 2016
36
12
8
Glasgow, Scotland
cPanel Access Level
Root Administrator
So I was trying to find this info myself and found it rather difficult to find what I wanted. Yes the CSFs docs to cover it but unless you knew exactly what you were looking for there's a good chance you'll miss it.

IF you have the messenger service enabled, by default it will only show the "Your IP is blocked by server" text to non secure (http) connections. For IPs who are blocked but trying to connect via secure (https) connections, the defaults will NOT show them message instead, the address will seem to time out leading the user to most likely think the server / site is down rather than them being blocked.

To enable Messenger for HTTPS you can do the following steps



In CSF config you need to modify the following either via GUI or the conf file itself:


1. Obviously enable Messenger service if not already
2. Messenger User - this must not be a cpanel user/account - using something like 'csf' is fine.
3. Messengerv2 - Set this to 1 - without this HTTPS will not show a message to blocked IP's and will timeout instead (potentially making users think your site/server is down)
4. Messenger_https_in - Set these ports for your HTTPS web port and cpanel and WHMs https ports - e.g. 443, 2083, 2086, 2087, 2089, 2096
5. Done - everything else should be either left at their defaults or are optional. Read the docs to see if you want to change more


Hope this will help someone as I struggled to find the info for this in the first place
 
  • Like
Reactions: cPanelLauren