BenV's notes

Tag: ipv6

Torrent stuff

by BenV on Nov.07, 2009, under Software

Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically:

  • It has to run on Slackware
  • It has to run as a daemon (in daemontools if possible)
  • There has to be an easy way to control and view the status, like a web based GUI.

(continue reading…)

Leave a Comment :, , , more...

Slackware(64), Qmail and IPv6

by BenV on Oct.06, 2009, under Software

Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU’s running, we soon ran into the need for a dns server and mailer.
Needless to say I don’t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it…), and my experiences with Exim and Postfix aren’t all too great either.
Sure, they work, but they’re too complex for my liking. I like to know what’s going on, so I still use my trusty old Qmail and Djbdns for mail and dns.
However, since those packages haven’t been updated in years, some newer features are missing. So I patch them 4 times over and stab them a bit so they work the way I like ;) (continue reading…)

Leave a Comment :, , , more...

Xen and routed IPv6

by BenV on Sep.28, 2009, under Software

Xenbro has found its way into the Coloclue racks where it is now running with real IP addresses. The Coloclue network routes all IP space to the main IP address of the machine so that precious IP addresses are not ‘lost’ to reserved network and broadcast addresses. This means that my /29 has 8 usable addresses in stead of only 6. In order to set this up you simply change the network-script and vif-script to the -route variants in /etc/xen/xend-config.sxp so it looks like this:

(network-script network-route)
(vif-script     vif-route)

Easy. Make sure ip forwarding is enabled though (check /proc/sys/net/ipv4/ip_forward, it should be 1) , and for IPv6 forwarding you need to enable /proc/sys/net/ipv6/conf/all/forwarding. Note that you must enable it on the -all- directory, only enabling it on a single interface won’t do what you’d expect (this took me a while to figure out ;) ).
After requesting both a set of IPv4 and IPv6 addresses I stumbled upon Xen’s /etc/xen/scripts/vif-route script which doesn’t do anything with IPv6! Since I do want my IPv6 space routed to my domU (and probably to the others as well) I decided to molest the script a little. My modification assumes you provide both the IPv4 address and IPv6 range you want to use on the domU. Here’s the diff:
xen 3.4 vif-route patch to support IPv6 - Version - SHA: e82dd95b8725c326121603fbd6168b3f88f5b881
Note that my patch adds some extra logging as well, you can hack that out yourself if it annoys you.
If patching is too difficult for you, here’s the patched vif-route script:
Patched Xen 3.4.1 vif-route to support IPv6 - Version - SHA: 29a28f4a8cff787233c1163435c86730fd5346fa

Don’t forget to put your IP addresses in your domU’s config file:

# domU.cfg
vif = [ 'mac=00:16:11:11:2b:11, ip=2345::1/64 192.168.2.100' ]

After patching vif-route and enabling the script in xend-config.sxp you still have to set routes to the dom0 in your domU. Example for dom0 with 192.168.1.1 and 1234::1

# IPv4
root@domU# ifconfig eth0 192.168.2.10 netmask 255.255.255.255 # Your domU's IPv4 address here
root@domU# ip ro add 192.168.1.1 dev eth0
root@domU# ip ro add default via 192.168.1.1
# IPv6
root@domU# ip -6 addr add 2345::1/64 dev eth0 # Your domU's IPv6 range here
root@domU# ip -6 ro add 1234::1 dev eth0
root@domU# ip -6 ro add default via 1234::1

Now it works (unless you did something stupid of course) :)

2 Comments :, more...

Minor annoyance about linux

by BenV on Aug.31, 2009, under Morons, Software

So I’m working on a little info script (check out Infoscreen) so I can have a nice overview
of my server when I look at console number one without having to log in etc.

Simple question:
“Where in /proc can I find a list of IP addresses with corresponding interfaces?”

Simple answer:
Try /proc/net/if_inet6!

wouter@wouter-laptop:~:0>cat /proc/net/if_inet6
00000000000000000000000000000001 01 80 10 80       lo
20010888148d0000022100fffe221352 04 40 00 00    wlan1
fe80000000000000022100fffe221352 04 40 20 80    wlan1

… that’s great…. but I really wanted the IPv4 addresses as well.
“/proc/net/if_inet4″ or “/proc/net/if_inet”? Noooooo….

Conclusion: KANKER LINUX!

Obviously I can get the address by calling ‘ip addr show‘, ‘ifconfig‘ or a heap of other solution involving calling ioctl on sockets or using the netlink interface… but seriously, blegh.

The most retarded thing is that pretty much every other statistic about my network devices is there… including active connections and whatnot, but ipv4 addresses? Nooooo….. *RAAH*

Leave a Comment :, , , , more...