Script to add the required iptables and ip6tables rules while ensuring the Cloudflare IP ranges are allowed first
Here’s a script to add the required iptables
and ip6tables
rules while ensuring the Cloudflare IP ranges are allowed first.
Save this as iptables_block.sh
How to Use
Save the script:
(Paste the script and save with
CTRL + X
, thenY
, thenENTER
.)Make it executable:
Run the script:
Check applied rules: