Adding port rules to csf.allow
Posted: 07 May 2019, 14:10
Hello all,
I tried adding port rules for a specific IP that is present in a BLOCKLIST to access the server. It was added to csf.allow
After reloading the csf, when I ran a csf grep, it shows as below
No matter what, the IPs were not able to connect to the server in and out.
When I tried to allow these IPs with temporary access (for eg. csf -ta xx.xx.xx.xx 86400 -p 80), the IPs are able to communicate properly.
I couldn't see much difference in the iptables rules though. Is this some sort of bug?
I tried adding port rules for a specific IP that is present in a BLOCKLIST to access the server. It was added to csf.allow
Code: Select all
tcp|in|d=80|s=xx.xx.xx.xx
tcp|in|d=443|s=xx.xx.xx.xx
tcp|out|s=80|d=xx.xx.xx.xx
tcp|out|s=443|d=xx.xx.xx.xx
Code: Select all
# csf -g xx.xx.xx.xx
Table Chain num pkts bytes target prot opt in out source destination
filter ALLOWIN 1 0 0 ACCEPT tcp -- !lo * xx.xx.xx.xx 0.0.0.0/0 tcp dpt:443
filter ALLOWIN 2 0 0 ACCEPT tcp -- !lo * xx.xx.xx.xx 0.0.0.0/0 tcp dpt:80
filter ALLOWOUT 3 0 0 ACCEPT tcp -- * !lo 0.0.0.0/0 xx.xx.xx.xx tcp spt:443
filter ALLOWOUT 4 0 0 ACCEPT tcp -- * !lo 0.0.0.0/0 xx.xx.xx.xx tcp spt:80
IPSET: Set:bl_XXXBL Match:xx.xx.xx.xx Setting:XXXBL file:/etc/csf/csf.blocklists
When I tried to allow these IPs with temporary access (for eg. csf -ta xx.xx.xx.xx 86400 -p 80), the IPs are able to communicate properly.
I couldn't see much difference in the iptables rules though. Is this some sort of bug?