Skip to content

Instantly share code, notes, and snippets.

@daslicht
Created July 9, 2014 11:23
Show Gist options
  • Select an option

  • Save daslicht/57045515d1d4029f6389 to your computer and use it in GitHub Desktop.

Select an option

Save daslicht/57045515d1d4029f6389 to your computer and use it in GitHub Desktop.

Revisions

  1. @thepapanoob thepapanoob renamed this gist Jul 4, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @Kruemmelmonster Kruemmelmonster revised this gist Jan 7, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,6 @@ wget http://www.okean.com/chinacidr.txt
    sed -i '1,4d' chinacidr.txt
    sed -i 's/ China//g' chinacidr.txt
    ipset create china hash:net
    while read line; do ipset add china ; done < chinacidr.txt
    while read line; do ipset add china $line; done < chinacidr.txt
    iptables -I INPUT -m set --match-set china src -j DROP
    rm chinacidr.txt
  3. @invalid-email-address Anonymous created this gist Nov 11, 2013.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/bash
    #Copyright 11.11.13 Michell Gailing <gailing.michell@gmail.com>
    #It's Licensed under DWWWI 'Do whatever you want with it!'
    wget http://www.okean.com/chinacidr.txt
    sed -i '1,4d' chinacidr.txt
    sed -i 's/ China//g' chinacidr.txt
    ipset create china hash:net
    while read line; do ipset add china ; done < chinacidr.txt
    iptables -I INPUT -m set --match-set china src -j DROP
    rm chinacidr.txt