Using IPSET to block countries by IP

FreePBX 16 install.
I was able to build an IPSET with no issue. I added the IPs that I want blocked and then added it to iptables using the following command
iptables -I INPUT -m set --match-set block_Romania src -j DROP

I then ran iptables -L and it’s not there.

As a test I ran the same command and purposely msspelled the IPNET and I got an error that the IPSET didn’t exist, which is what I would expect.

Why is my correct IPNET not appearing in iptables?

Than you

The way to add custom rules is in FreePBX → Firewall → Advanced → Advanced Custom Rules.

By putting your custom iptables rules in this way, they will be preserved.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.