muhstik- irc flooding solution |
git clone git://git.acid.vegas/muhstik.git |
Log | Files | Refs | Archive | README |
h.sh (7904B)
1 #!/bin/echo lol @ minorities 2 # $Id: h.sh 11 2011-05-29 literalka $ 3 # 4 # {{{ Relevant WWW site links: 5 # [0] HOWTO 6 # [0a] http://mirrors.bieringer.de/Linux+IPv6-HOWTO/ 7 # [1] Wiki 8 # [1a] http://en.wikipedia.org/wiki/IPv6 9 # [1b] http://en.wikipedia.org/wiki/IPv6_address 10 # [1c] http://en.wikipedia.org/wiki/Tunneling_protocol 11 # [1d] http://en.wikipedia.org/wiki/List_of_IPv6_tunnel_brokers 12 # [2] RFC 13 # [2a] http://tools.ietf.org/html/rfc2460 14 # [2b] http://tools.ietf.org/html/rfc3053 15 # [2c] http://tools.ietf.org/html/rfc3964 16 # [3] Tunnel Brokers 17 # [3a] http://www.tunnelbroker.net/ 18 # [3b] http://tbroker.mybsd.org.my/ 19 # [4] Amusing 20 # [4a] http://blogs.pcmag.com/securitywatch/2010/12/ipv6_will_worsen_the_spam_and.php 21 # [4b] http://jl.ly/Email/v6bl.html 22 # [5] DNS 23 # [5a] http://member.wide.ad.jp/~fujiwara/v6rev.html 24 # [5b] http://freedns.afraid.org/ 25 # [5c] http://dns.he.net/ 26 # [5d] http://freedns.afraid.org/reverse/instructions.php 27 # [6] VPS Hosts 28 # [6a] http://www.hostgator.com/ 29 # }}} 30 # {{{ Notes: 31 # 1) Add ``EXT_IP6_TUN'' IP with /3 so it auto-adds a route to 2000::/3 to the 32 # tunnel device so that there is no need to explicitly add that route. 33 # 2) Add ``EXT_IP6_LAN'' IP with /3 so the route to the LAN prefix/64 is not 34 # auto-added to the tunnel device. 35 # 3) You could also add IPs with /128, but adding IPs with /3 auto-adds a route 36 # to 2000::/3 to the tunnel device, and with the ``EXT_IP6_TUN'' IP having 37 # that route auto-added already, the routing table is kept clean. 38 # 4) Last IP address added with "preferred_lft forever" is used as the default 39 # IP for new outgoing connections. 40 # 5) That being said, "preferred_lft x" is optional, defaulting to 41 # "preferred_lft forever". 42 # 6) Add additional IPs using: 43 # ip -6 addr add 2001:470:___:___::___/3 dev $DEV_NAME 44 # 7) Do not add any CIDRs, just add "straight up" IPs. 45 # }}} 46 # {{{ Suggestions: 47 # 1) If using tunnelbroker [3a], delegate the rDNS to ``dyn.ip6arpa.co.cc'', it 48 # /should/ give proper forward and reverse DNS, for "max sperg". Make sure 49 # it works first though, (i.e. freenode's DNS probably sucks). 50 # 2) <@h> ipv6 youtube + /48 = lol viewcounts 51 # 3) "...if you sent a billion messages a second, each with its own address, 52 # it would take about a thousand years to use all the addresses in a 53 # /64" [4b], thus, I would suggest sending one billion messages per second 54 # using different IP addresses. 55 # 4) Run your own rDNS (see [5a], requires root or sudo(8)) 56 # 5) If you have 0.01 USD on Paypal and a valid US phone number, just get a 57 # Hostgator [6a] VPS with 4 ips on it using promo code "austin" (dunno how 58 # long this will be valid), you'd probably be able to run a DNS server on 59 # it, with 4 IPs. 60 # 6) If you use FreeDNS [5b], you can set up a ``vhost'' by delegating your rDNS 61 # to FreeDNS' servers and setting up an ``IPv6 Reverse'' [5d]. 62 # 7) 19:07:20 <+h> I'm still trying to get ARIN to give me 14:88:/32 63 # 19:07:24 <+h> would be awesome as fuck 64 # 8) IPv6 botnets are relatively unknown, based on my own experience. I suggest 65 # fixing this with an "IPv6 Awareness" program of somesort. 66 # 9) Try to use as many "levels" (TODO: find the right word for this) of an IPv6 67 # IP as possible: when banning, many channel operators will ban a single 68 # IP, others will ban 2001:470:* (all of HE.net), and even some others 69 # will ban, say, a /64 when you're {ab,}using a /48, leaving unbanned IP 70 # addresses. 71 # }}} 72 # {{{ `telnet(1) route-server.he.net` 73 # [AS6939/HURRICANE-IPV6] 74 # ``tunnelbroker.net'' tunnel server information. Current as of 2011-03-29. 75 # 76 # Location IPv4 IPv6 77 #--------------------- ---------------- ------------------------ 78 # North America 79 # PAIX Seattle 216.218.252.176 2001:470:0:3d::1 80 # PAIX Palo Alto 216.218.252.165 2001:470:0:1b::1 81 # Equinix San Jose 216.218.252.164 2001:470:0:1a::1 82 # Hurricane Fremont 1 216.218.252.161 2001:470:0:23::1 83 # Hurricane Fremont 2 216.218.252.162 2001:470:0:24::1 84 # Hurricane San Jose 216.218.252.163 2001:470:0:19::1 85 # Equinix Los Angeles 216.218.252.166 2001:470:0:1c::1 86 # One Wilshire Los Angeles 216.218.252.178 2001:470:0:6c::1 87 # Equinix Chicago 216.218.252.168 2001:470:0:16::1 88 # Equinix Dallas 216.218.252.167 2001:470:0:1d::1 89 # PAIX Toronto 216.218.252.147 2001:470:0:99::1 90 # Telehouse New York 216.218.252.170 2001:470:0:12::1 91 # PAIX New York 216.218.252.171 2001:470:0:13::1 92 # TelX New York 216.218.252.148 2001:470:0:9f::1 93 # Equinix Ashburn 216.218.252.169 2001:470:0:17::1 94 # TelX Atlanta 216.218.252.150 2001:470:0:a7::1 95 # NOTA Miami 216.218.252.177 2001:470:0:4a::1 96 # Telx Phoenix 216.218.252.156 2001:470:0:154::1 97 # Pittock Portland 216.218.252.159 2001:470:0:157::1 98 # Comfluent Denver 216.218.252.158 2001:470:0:155::1 99 # Level3 Kansas City 216.218.252.157 2001:470:0:156::1 100 # Oak Tower Kansas City 216.218.252.181 2001:470:0:178::1 101 # Minnesota Gateway 216.218.252.185 2001:470:0:ab::1 102 # Europe 103 # Telehouse London 216.218.252.172 2001:470:0:d::1 104 # NIKHEF Amsterdam 216.218.252.173 2001:470:0:e::1 105 # Interxion Frankfurt 216.218.252.174 2001:470:0:2a::1 106 # Interxion Paris 216.218.252.175 2001:470:0:2b::1 107 # Telehouse Paris 216.218.252.184 2001:470:0:1ae::1 108 # Equinix Zurich 216.218.252.153 2001:470:0:10c::1 109 # TeleCity Stockholm 216.218.252.154 2001:470:0:10f::1 110 # Asia 111 # Mega-I Hong Kong 216.218.252.180 2001:470:0:c2::1 112 # Equinix Tokyo 216.218.252.151 2001:470:0:10a::1 113 # Equinix Singapore 216.218.252.179 2001:470:0:169::1 114 # }}} 115 # {{{ Prerequisites and supported platforms: 116 # Tested on: bash(1) 4.0.33(1)-release on Ubuntu 2.6.31-23.74-generic 117 # Requires: bash(1), test(1), printf(1), echo(1), and ip(8) 118 # May Need: su(1), sudo(8), modprobe(8) 119 # }}} 120 # {{{ rcslog 121 # $Log: h.sh $ 122 # Revision 11 2011/05/29 21:44:23 literalka 123 # Move config into its own file 124 # 125 # Revision 10 2011/04/27 01:10:19 literalka 126 # Added some small fucking retarded change in some obscure comment somewhere 127 # Added two more small fucking useless changes in an even more obscure comment 128 # And then I added a small stupid fucking change to one of those comments 129 # 130 # Revision 9 2011/04/21 22:52:04 literalka 131 # Small documentation updates 132 # 133 # Revision 8 2011/03/29 13:02:45 literalka 134 # Updated `telnet(1) route-server.he.net` 135 # Updated "Tested on" 136 # 137 # Revision 7 2011/02/10 12:21:45 literalka 138 # Add adjustable params to ipgen() 139 # Check for ``SUBNET_TYPE'' 140 # 141 # Revision 6 2011/02/09 22:13:12 literalka 142 # Wrote ipgen(), replacing use of ``RANDOM'' 143 # 144 # Revision 5 2011/02/09 20:08:12 literalka 145 # `telnet(1) route-server.he.net` 146 # 147 # Revision 4 2011/02/09 15:32:18 literalka 148 # Require bash(1) 149 # 150 # Revision 3 2011/02/04 12:56:24 literalka 151 # Replaced all instances of "he-ipv6" with ``DEV_NAME'' 152 # 153 # Revision 2 2011/02/03 19:15:48 literalka 154 # rm useless "if" statement 155 # 156 # Revision 1 2011/01/22 18:05:48 literalka 157 # Initial revision 158 # }}} 159 # Last update: Wed Apr 27 2011 160 # -- by Leon Kaiser of the GNAA 161 # <literalka@gnaa.eu> 162 if [ -z "${BASH_VERSION}" ]; then 163 echo "error: use bash(1)" # require bash(1) 164 exit 1488 165 fi 166 #modprobe ipv6 167 168 source config.sh 169 170 ip tunnel add $DEV_NAME mode sit remote $HE_TUN_SRV ttl 255 171 ip link set $DEV_NAME up 172 ip -6 addr add $EXT_IP6_TUN/3 dev $DEV_NAME preferred_lft 0 173 ip -6 addr add $EXT_IP6_LAN/3 dev $DEV_NAME preferred_lft forever 174 echo "Added route to IP ${EXT_IP6_LAN}" 175 # tunnelbroker.net includes the following lines in their suggested 176 # "Linux-route2" config... 177 # ip route add ::/0 dev he-ipv6 178 # ip -f inet6 addr