Skip to content

Instantly share code, notes, and snippets.

@ameri110
Created April 14, 2021 13:04
Show Gist options
  • Save ameri110/7f850300619b4227b1dfbf6d2fd1528a to your computer and use it in GitHub Desktop.
Save ameri110/7f850300619b4227b1dfbf6d2fd1528a to your computer and use it in GitHub Desktop.

Revisions

  1. ameri110 created this gist Apr 14, 2021.
    9 changes: 9 additions & 0 deletions block_RFC1918_RFC6598.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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