Skip to content

Instantly share code, notes, and snippets.

@Nader-abdi
Created October 25, 2022 10:12
Show Gist options
  • Save Nader-abdi/fbfe18ab130d52c9ae35593e7a99d5fa to your computer and use it in GitHub Desktop.
Save Nader-abdi/fbfe18ab130d52c9ae35593e7a99d5fa to your computer and use it in GitHub Desktop.
Hetzener-iptables-setting
#!/usr/bin/env bash
iptables -A OUTPUT -p tcp -s 0/0 -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 192.168.0.0/16 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 100.64.0.0/10 -j DROP
iptables -A OUTPUT -p udp -s 0/0 -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -p udp -s 0/0 -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -p udp -s 0/0 -d 192.168.0.0/16 -j DROP
iptables -A OUTPUT -p udp -s 0/0 -d 100.64.0.0/10 -j DROP
iptables-save
echo 'Set iptables'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment