I'm not 100% sure I'm using the correct terminology in the title, so if someone knows better than I do please amend it.
I'm trying to replicate a malicious script that I've seen in the wild for the purposes of testing my options to respond to it. It binds to a bunch of ip addresses on an IPv6 /64 and is then used to flood IRC from hundreds or thousands of different ip addresses. The fact that it's able to bind to different addresses allows it to bypass some automatic per-hostname throttling and cause trouble despite existing measures in place.
Basically, the problem I'm trying to solve boils down to this. I'm using a test machine running Ubuntu Server 13.10:
$ uname -a Linux sandbox 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 i686 i686 GNU/Linux
My network is setup in the following manner:
$ ifconfig eth0 Link encap:Ethernet HWaddr 00:18:f8:0d:c0:d5 inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::218:f8ff:fe0d:c0d5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9184009 errors:0 dropped:751 overruns:0 frame:57518 TX packets:1143073 errors:12057087 dropped:0 overruns:0 carrier:23942906 collisions:0 txqueuelen:1000 RX bytes:1475317803 (1.4 GB) TX bytes:287318593 (287.3 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:4007947 errors:0 dropped:0 overruns:0 frame:0 TX packets:4007947 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:663390993 (663.3 MB) TX bytes:663390993 (663.3 MB)
inet6 line of the eth0 listing indicates to me that the entire /64 upon which the listed address resides is allocated as link-local to this machine, but I'm not 100% sure this is true. In any case, the following command I'm using to test connectivity is failing to work as I expect:
$ telnet -6 -b fe80::1234:1234:1234:1234%eth0 fe80::218:f8ff:fe0d:c0d5%eth0 6667 telnet: bind: Cannot assign requested address
Am I incorrect in assuming that the entire /64 is allocated to this one machine? If it's not, how can I configure something that will allow this to work (a Host-only solution is fine since this is only for testing)? Otherwise, what should I be doing instead to correctly bind to this address?