Symptoms
Traffic is not blocked according to the rules added in WHM via Home / Security Center / Host Access Control.
Cause
The Host Access Controls adds entries in a chain in the nftables firewall to process the rules. This issue is typically caused when the INPUT chain of the inet filter for nftables is missing the Host Access Control chain.
You can view your current nftables ruleset with the following command:
# nft list table inet filter
The INPUT chain should at least contain the following:
CONFIG_TEXT: chain INPUT {
type filter hook input priority filter; policy accept;
counter packets 10 bytes 688 jump cPanel-HostAccessControl
counter packets 10 bytes 688 jump cP-Firewall-1-INPUT
}
Resolution
- Access the server's command line as the 'root' user via SSH or Terminal in WHM.
Reconfigure the firewall.
# nft list ruleset > /root/firewall.backup-$(date +%s)
# nft flush ruleset
# mv -v /etc/sysconfig/nftables.conf{,.bak-$(date +%s)}
# /scripts/configure_firewall_for_cpanel
# nft list ruleset > /etc/sysconfig/nftables.conf
Rules held in /etc/sysconfig/nftables.conf will be updated shortly after they are added in Host Access Controls.
Comments
0 comments
Article is closed for comments.