Subscribe to the RSS Feed or Atom Feed

Beware of the plushies and their button eyes

Neko Nyan Liberation

Serving up both kinds of moe

magikaru banhammer on hatsune

Posted Oct 22, 01:56 AM by cyanoacry to WTF (にゃんでやねん)

So hatsune’s got a magikaru banhammer; if anybody has over 10 established connections they’re nullrouted.

http://a.imouto.org/banhammer.txt

The nullroute script is a nice oneliner and runs every 10 minutes:

netstat -an -f inet | awk '/67\.159\.44\.34\.80.*ESTABLISHED/ {split($5,address,"."); connections[address[1]"."address[2]"."address[3]"."address[4]]++; } END {for(moo in connections) { if (connections[moo] > 10) { printf $moo "\n" ; }}}' | (while read -s moo; do printf "banning $moo\n";route add $moo 127.0.0.1; done;)

(Tested on FBSD 6.2-RELEASE, bash 3.2.25)

There’s probably a nicer way to do it, if anybody’d like to comment.


Comments

Leave a Comment!

Add your comment. Preview then Submit.


Hidden


Textile Help