I've developed a solution to generate a global list for both allowing IP's & denying IP's. Populating the csf.gdeny works perfectly, every seven (7) minutes the server calls for the file reads it and blacklists the IP's.
Unfortunately, the server does not seem to be releasing IP's that have been removed from the list. csf.gdeny no longer has the IP blocked however doing a "csf -g" commands shows its blacklisted.
Server Configuration:
CentOS: v6.7 x86_64bit
cPanel: v11.52.2 (build 1)
IPTables: v1.4.7
IPSet: v6.11, protocol version: 6
CSF: v8.08 (cPanel)
How I've determined this issue ..
Initial Server Load:
Code: Select all
root@server [/var/lib/csf]# cat csf.gdeny | wc -l
1199
Code: Select all
root@server [/var/lib/csf]# grep 174.1.144.2 csf.gdeny
root@server [/var/lib/csf]#
Code: Select all
root@server [/var/lib/csf]# csf -g 174.1.144.2
Chain num pkts bytes target prot opt in out source destination
No matches found for 174.1.144.2 in iptables
IPSET: No matches found for 174.1.144.2
Code: Select all
root@server [/var/lib/csf]# ipset -test chain_GDENY 174.1.144.2
174.1.144.2 is NOT in set chain_GDENY.
Global Deny IP Address:
Code: Select all
root@server [/var/lib/csf]# cat csf.gdeny | wc -l
1200
Code: Select all
root@server [/var/lib/csf]# grep 174.1.144.2 csf.gdeny
174.1.144.2
root@server [/var/lib/csf]#
Code: Select all
root@server [/var/lib/csf]# csf -g 174.1.144.2
Chain num pkts bytes target prot opt in out source destination
No matches found for 174.1.144.2 in iptables
IPSET: Set:chain_GDENY Match:174.1.144.2 Setting:GLOBAL_DENY
Code: Select all
root@server [/var/lib/csf]# ipset -test chain_GDENY 174.1.144.2
174.1.144.2 is in set chain_GDENY.
Removal of IP Address:
Code: Select all
root@server [/var/lib/csf]# cat csf.gdeny | wc -l
1199
Code: Select all
root@server [/var/lib/csf]# grep 174.1.144.2 csf.gdeny
root@server [/var/lib/csf]#
Code: Select all
root@server [/var/lib/csf]# csf -g 174.1.144.2
Chain num pkts bytes target prot opt in out source destination
No matches found for 174.1.144.2 in iptables
IPSET: Set:chain_GDENY Match:174.1.144.2 Setting:GLOBAL_DENY
Code: Select all
root@server [/var/lib/csf]# ipset -test chain_GDENY 174.1.144.2
174.1.144.2 is in set chain_GDENY.
Looking for solution to fix this problem.