Host access control
- Insert rule manually
nft insert rule inet filter cPanel-HostAccessControl tcp dport 22 ip saddr 192.168.1.70 counter accept;
-
Save rules
-
Add entire network
-
Add multiple IP's at once
nft insert rule inet filter cPanel-HostAccessControl tcp dport 22 ip saddr {192.168.1.190, 192.168.1.216, 192.168.1.195} counter accept;
- list chain
deleting nft rules¶
- rules can be deleted only by handle numbers
- Getting the handle numbers can be done with the -a flag
- or for a specific chain
-
Deleting the rule from range of handle numbers
-
List chain
-
Drop connection from IP range.
- Results from the above 2
nft list chain inet filter INPUT table inet filter { chain INPUT { type filter hook input priority filter; policy accept; ip saddr 81.30.0.0/16 counter packets 9 bytes 540 drop counter packets 5418555 bytes 4603005116 jump cPanel-HostAccessControl counter packets 5351413 bytes 4594896893 jump cP-Firewall-1-INPUT counter packets 4619458 bytes 4550297507 jump cPanel-HostAccessControl counter packets 4619374 bytes 4550281028 jump cP-Firewall-1-INPUT } }