Last active
June 5, 2023 09:57
-
-
Save Gribnik2K/ba72448cdd47fabe866aea1afde609de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
sudo iptables-save > /etc/iptables/rules.v4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment