Skip to content

Instantly share code, notes, and snippets.

@c29r3
Last active December 30, 2020 13:58
Show Gist options
  • Save c29r3/0b72e59e5b3169a03a727e75563fb332 to your computer and use it in GitHub Desktop.
Save c29r3/0b72e59e5b3169a03a727e75563fb332 to your computer and use it in GitHub Desktop.
#!/bin/bash
iptables -A OUTPUT -d 0.0.0.0/8 -j DROP
iptables -A OUTPUT -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -d 100.64.0.0/10 -j DROP
iptables -A OUTPUT -d 169.254.0.0/16 -j DROP
# iptables -A OUTPUT -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -d 192.0.0.0/24 -j DROP
iptables -A OUTPUT -d 192.0.2.0/24 -j DROP
iptables -A OUTPUT -d 192.88.99.0/24 -j DROP
iptables -A OUTPUT -d 192.168.0.0/16 -j DROP
iptables -A OUTPUT -d 198.18.0.0/15 -j DROP
iptables -A OUTPUT -d 198.51.100.0/24 -j DROP
iptables -A OUTPUT -d 203.0.113.0/24 -j DROP
iptables -A OUTPUT -d 224.0.0.0/4 -j DROP
iptables -A OUTPUT -d 240.0.0.0/4 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment