MESSENGER, IPSET and subnet block
Posted: 17 Jan 2020, 09:35
Hello,
When messenger service is active, and specific subnet is blocked (in csf.deny), but one IP address of this subnet is whitelisted (in csf.allow), the user (whitelisted IP) is still being redirected to messenger service.
I think it because of IPSET chains order, messenger chain before allow chain.
for example:
csf.deny
csf.allow
csf -g 192.168.1.100
CSF version: csf: v14.00 (generic)
IPSET version: ipset v7.1, protocol version: 7
When messenger service is active, and specific subnet is blocked (in csf.deny), but one IP address of this subnet is whitelisted (in csf.allow), the user (whitelisted IP) is still being redirected to messenger service.
I think it because of IPSET chains order, messenger chain before allow chain.
for example:
csf.deny
Code: Select all
192.168.1.0/24
Code: Select all
192.168.1.100
Code: Select all
Table Chain num pkts bytes target prot opt in out source destination
No matches found for 192.168.1.100 in iptables
IPSET: Set:MESSENGER Match:192.168.1.100
IPSET: Set:chain_ALLOW Match:192.168.1.100 Setting: File:/etc/csf/csf.allow
IPSET: Set:chain_DENY Match:192.168.1.100 Setting: File:/etc/csf/csf.deny
ip6tables:
Table Chain num pkts bytes target prot opt in out source destination
No matches found for 192.168.1.100 in ip6tables
csf.allow: 192.168.1.100
Permanent Blocks (csf.deny): 192.168.1.0/24 # test - Fri Jan 17 11:28:36 2020
IPSET version: ipset v7.1, protocol version: 7