The End of Gentoo

Gentoo’s dead.

Before I hear you say “Long live Gentoo!” I should add that, yes, I know it has an active supporting community. Certainly there are other forks of Gentoo (Sabayon and Funtoo among the most well known of these) that contribute fixes upstream. There’s even a lively community discussing things on the gentoo-dev list. There’s also a lot of good, clever and very smart individuals working on Gentoo from around the world. I envy each and every one of them and admire their dedication and their technical capabilities and contributions.

For me, however, Gentoo is dying on the vine. It will continue to live on for others–there’s plenty of dedicated souls who are more than willing to support it, run it on their servers, home computers, and suffer through another rough period in Gentoo’s colorful history–but my days of running Gentoo are coming to an end. Why? Because I feel that:

  • It lacks clear direction
  • Recent security-related issues are a concern
  • Package support and maintainers are dwindling in number
  • Changing personal preferences

Clear Direction?

Does Gentoo have a clear direction? I think so–or I used to. When the maintainer of OpenRC left to move on to bigger and better things, a lengthy discussion took place, and unsurprisingly, some individuals were calling out for Gentoo to follow suit with other distros to use other init systems. Fortunately, I think the conclusion at the end was that OpenRC will still have a home with Gentoo, and it will be moved (or moved back) into being an in-house project. The discussion does raise some red flags, and I sincerely hope Gentoo doesn’t change toward adopting init systems that go against the spirit of the distribution. Personally, I liked OpenRC–it was fast, it showed a great deal of promise, and that there are forces within the community that would rather move toward a more mainstream (and bloated) init system is worrisome. I’m not sure that sentiment is shared with the majority of developers (I hope not), but that this is even a concern is troubling because I do not want to migrate my systems to one or more different init systems over the next year or two.

I think it’s also fair to deduce that Gentoo no longer pushes updates as frequently as other distributions. This isn’t necessarily a bad thing–and some might argue that it’s a sign of maturity–but it does call into question whether or not certain critical security patches will ever be rolled out relatively quickly. Moreover, many languages, libraries, and other developer-centric tools aren’t being included or updated as frequently as other distributions. Updates, if available, seem to stagnate in ~arch for an eternity before they’re deemed suitable for general availability. While I don’t want Gentoo to become yet another Debian or Ubuntu, subsequently pushing out moderately unstable software in effort to stay on the bleeding edge, I would have appreciated the integration of some established tools–like PHP 5.3–sooner. PHP 5.3 wasn’t introduced into portage until May of 2010 at version 5.3.2, and I think this sort of delay is endemic to a good chunk of the system. That’s to say nothing about how long it took to adopt Python version 2.5 several years ago, mostly thanks to Portage’s dependency on Python, but at least Python 3 has been available in parallel with Python 2 for quite some time. Other software isn’t so lucky.


Years ago, Gentoo used to push updates to various critical components like glibc often enough to coin the joke “I’m sorry I can’t go out tonight, I’m having to recompile my kernel again.” Unfortunately and for various reasons, the security team has been stretched to the point that critical vulnerabilities have gone untouched for an undesirably long time. This isn’t the fault of Gentoo, nor is it the fault of anyone in particular. As Tobias Heinlein stated on the mailing list:

The Gentoo Security team is functional, but running on low flame. There is a huge backlog (a huge amount of open bugs and GLSAs that still need to be sent) and due to a small amount of active members not all bugs are filed/handled in a timely manner and bigger packages (Firefox, Java, etc.) are not easy to draft GLSAs for for various reasons.

There’s just too much work to do and too few hands to do it. It certainly explains the IA32 emulation issue on 64-bit multilib builds, and it possibly explains why advisories like this one were delivered an uncomfortably long time after the exploits were discovered. Of course, patches are no replacement for end-user security as, ultimately, security rests on the shoulders of the systems administrator.

There is a silver lining. In spite of Gentoo’s recent lapse with pushing updates, they have still managed to beat both Microsoft and Adobe in terms of patch turn around and deployment.

Package Support

Whether or not Gentoo is currently hemorrhaging developers is something of a rumor. I don’t think it is. I do think that the current economy has put unwanted constraints on individual contributors who have already been constrained by time; that’s expected. Every distribution sees a slow turn over rate for developers, and I think Gentoo is in that phase where the number of developers leaving is somewhat greater than the number of new developers taking their place. I deduce this mostly by anecdotal evidence. Also, things like the following don’t help either (this is a comparison between several major players in the F/OSS OS market):


[sagittarius:~]$ emerge --search yui
[ Results for search key : yui ]
[ Applications found : 0 ]

Ubuntu 10.10 (server)

[corvus:~]$ aptitude search yui
p   libjs-yui                                                             - Yahoo User Interface Library
p   libjs-yui-doc                                                         - Documentation and examples for the Yahoo User Interface Library
p   yui-compressor                                                        - JavaScript/CSS minifier

FreeBSD 8.1

[exfar:~]$ portsearch -n yui
Port:   yui-3.2.04_2
Path:   /usr/ports/editors/yui
Info:   Rich-featured multi-windows console text editor
B-deps: autoconf-2.67 autoconf-wrapper-20071109 m4-1.4.15,1 perl-5.10.1_2
Port:   yuicompressor-2.4.2
Path:   /usr/ports/www/yuicompressor
Info:   The Yahoo! JavaScript and CSS Compressor
R-deps: desktop-file-utils-0.15_2 gamin-0.1.10_4 gettext- gio-fam-backend-2.24.2 glib-2.24.2 inputproto-2.0 javavmwrapper-2.3.5 jdk- kbproto-1.0.4 libX11-1.3.3_1,1 libXau-1.0.5 libXdmcp-1.0.3 libXext-1.1.1,1 libXi-1.3,1 libXtst-1.1.0 libiconv-1.13.1_1 libpthread-stubs-0.3_3 libxcb-1.7 pcre-8.10 perl-5.10.1_2 pkg-config-0.25_1 python26-2.6.6 recordproto-1.14 xextproto-7.1.1 xproto-7.0.16
2 ports

There are comparisons like this all across the board. It holds true for the YUI libraries, for the Spring framework, and a handful of other minor packages here and there that I’ve run into over the last year and a half. It should be noted that there were three reasons I migrated from FreeBSD to Gentoo some 5-6 years ago: 1) the ports collection wasn’t being updated as frequently as I would have liked, 2) the ports collection often didn’t have packages I needed or wanted, and 3) FreeBSD (-release–I don’t know about –current or –stable from the time period) did not easily support the new printer I had purchased whereas Gentoo did. Oh, how the tables turn.

Now, it should be stated that missing packages aren’t the end of the world. One can easily go search for the latest version, find it, and install it. That’s not the problem. The problem is that as I’ve gotten older (lazier) and more time constrained (impatient), I like to spend less and less time hunting down sundry packages and more time actually doing things. Package managers are the path of least resistance, and as long as they make something easier to do, I’m going to use them. ./configure && make && make install was fun when I was 20. I’m now 29 and have a gazillion different hobbies in addition to paid labor (usually writing code but mostly dealing with data migration and the sorts). I don’t want to have to fool around with some inane package manager any more than necessary (although I do like Portage). Which brings me to…

Personal Preference

This is the one point no one is going to be able to argue with. Gentoo is a labor of love. I used to enjoy having authoritarian control over every little package on the system. It was fantastic building a new install and having only those packages I wanted (and their dependencies) and nothing else. Nowdays, any time I run an:

# emerge -pvu world # or system

…and see more than 30 packages listed, I breathe a sigh of frustration. I used Gentoo as my primary desktop OS for about 2 years between 2006 and 2008, so I know how long it takes to build X, build KDE, and build the various silly libraries needed to support each of them (and whatever else I wanted). In fact, I still have that particular installation of Gentoo sitting on my other drive at home. Ever since I took a .NET class during my last year of college, I realized that sometimes it’s better to get things done than it is to sit, twiddling my thumbs, waiting for that overnight build to finish so I can check e-mail. (Then getting frustrated and turning on my laptop or cancelling the build and booting to Windows.) Granted, I always loved having two disparate operating systems on the same machine: If one failed for whatever reason (Windows), I could boot to Gentoo and still get stuff done. Anymore, though, I’m rather wishing I had installed Ubuntu in place of Gentoo. If I had a nickle for every hour I spent waiting for various window manager breaking emerges to finish…

Crux of the Matter

The crux of this entire long winded post is that I’m getting really damn frustrated with Gentoo. I love the operating system. I’ve used it for years. (Side note and minor correction: I actually first used Gentoo in late 2003/early 2004, but I don’t count those because my home server was still running FreeBSD.) I want to continue using it, but I’m afraid my patience is wearing thin. I seem to remember that a particular friend of mine Tweeted about dumping Gentoo for the U-word earlier this year. I hate to say it, but I’m afraid I’m going to follow suit. “Enter Ubuntu,” as he said. Enter Ubuntu indeed.

And to think: I hate Debian with a passion. I guess there are other BSD-ish options, although I do seem to see VirtualBox OSE in the FreeBSD ports collection… Tempting!

Update July 24th, 2011

Gentoo’s not dead! Rather, that is for me it isn’t. This entire post should have been taken with a grain of salt, but I’ll explain in depth later this week why I feel that this post was not only entirely unfair, but also why I feel that Gentoo has redeemed itself, and why I believe competition is important (or more to the point: why sampling the competition is important).

No comments.

Fun with find

A friend of mine was asking how to append a string to files contained in a directory structure of unknown depth. I dug around a little bit and found this gem.

Eric has been having several difficult issues building KDE 4-point-something on Funtoo (a Gentoo fork) and it occurred to him that it might be possible to add a specific use flag to every IUSE contained within the build. Unfortunately, due to the nature of the package directory structure, it would prove tiresome attempting to append the same string to each file. Besides, that’s what scripting is all about, isn’t it?

Here’s one possible solution:

find . -type f -name 'IUSE' -exec sh -c 'echo "exceptions" >> {}' \;

For a more secure solution, use -execdir:

find . -type f -name 'IUSE' -execdir sh -c 'echo "exceptions" >> {}' \;

If that syntax frightens you, for loop constructs are also a possibility:

for file in `find . -type f -name 'IUSE'` ; do echo "exceptions" >> $i ; done

If you know of others, share them!

No comments.

IPv6, an Experimental Overview

The Internet as we know it is destined to change. That may seem like a profound statement, but it effectively and correctly captures the essence of the Internet’s entire history. Soon–or hopefully very soon–we’ll be witness to one of the most significant transformations made to the very core of how the Internet operates.

I am of course talking about IPv6, the fundamentally-changed and massively-upgraded addressing scheme intended as a replacement to what we’re currently using, IPv4. You may be wondering why IPv6 is such a big deal, and if you haven’t heard of it yet, you should take some time to learn more. There are quite a few compelling reasons pertaining to why we need IPv6, but the most important is simple: We’re running out of publicly-addressable IPv4 addresses. According to Hurricane Electric’s statistics, we have less than two years before the complete exhaustion of our remaining IPv4 pool.

Knowledge is Power: Arm Yourself!

I’m not an authoritative source on IPv6. I’ve simply been testing it for my own diabolical purposes, but there are plenty of places to get started. I know of one particularly excellent blog dedicated to IPv6 fittingly called “Life with IPv6.” You can also find guides for various operating systems. You can find general guides for most operating systems such as this one for (formerly Freenet6). There’s also a really good guide on configuring IPv6 for Gentoo Linux, which is general enough (in some sections) to apply to other OSes. If you happen to have a router supported by the DD-WRT replacement firmware, there’s even a guide to configure it. For the FreeBSD crowd, you have the choice of FreeBSD’s official handbook or KAME’s FreeBSD guide.

So what’s this all about?

This rant of mine has its purpose: During my excursion into the new world, I’ve encountered demons, dragons, angels, angry natives, and the occasional mime. While I haven’t any idea where the mime came from, I do know that it is best to share such discoveries. Thus, this post outlines some of the things I’ve encountered, including a few things that don’t seem to be mentioned anywhere. I may also cover a basic ip6tables setup for use in conjunction with an IPv6 tunnel; if not, don’t worry. I’ll be posting something related to that soon.

But above all else, stay away from the little red berries. Those things give you a nasty full-body rash for a week. That poor mime…

Before we begin: Some Caveats

There’s always a “gotcha,” isn’t there? I should mention this before we dive into “getting started,” otherwise you’re liable to come pounding on my door in the middle of the night complaining that I didn’t provide sufficient warning: If you have a separate consumer-grade router rather than a dedicated *nix box, this probably won’t work. You have two choices: Look around for a way to forward protocol type 41 (IPv6) to the target machine or check’s router database for your make and model. The latter option certainly isn’t for the faint of heart and it can render your router unusable.

However, there is a silver lining. I have heard that some home router manufacturers are starting to include native support for IPv6 and a few of them even include wireless access points. SixXS (another tunnel broker) maintains a wiki of several well-known brands that support IPv6 and IPv6 tunneling.

I did lie about there being only two options. There’s actually one more, but given my experiences, I wouldn’t necessarily recommend it. Freenet6, operated by, is another free and open IPv6 tunnel broker. supplies a special client that can work quite well behind a NAT machine (like your router), but the nearest North American endpoint is located in Montreal, Canada. Freenet6 is a great way to test IPv6 if your options are limited. Unfortunately, it’s also painfully slow. (Side note: The sign-up process is obnoxious and creates a “social networking for network professionals” account.)

I suppose there’s also an unspoken forth option: Don’t use IPv6. I don’t really like that option, and you shouldn’t either! Remember: We have less than two years before all of the IPv4 Internet runs out of addresses. Encouraging adoption should be a high priority among Internet-related hardware and software providers. Keep this in mind the next time you purchase a router for your home network–or dust off an old machine and turn it into a routing box. You’d be surprised how easy that really is.

Getting Started

First, if you don’t have access to a native IPv6 network (and that’s what this post assumes; if you do, stop reading now, you won’t find much more useful information!), you’ll need a tunnel broker. Tunnel brokers provide access to a native IPv6 network and, typically, a large chunk of routeable addresses over an IPv4 tunnel. The Gentoo IPv6 guide is a great place to start and includes links to several tunnel brokers around the world. Hurricane Electric is an excellent broker and provides access via HE also has several locations worldwide, including 10 or so tunnel endpoints across North America. I believe they’ve recently added several new endpoints in Europe.

Hurricane Electric’s service allocates a /64 chunk of routeable addresses and allows you to create up to 5 separate tunnels from different locations. They also provide a full /48 prefix for those in need of a larger address pool, but I can’t imagine anyone who’d be in need of more than 1.8×1019 addresses–which is the address space allocated to a full /64. Better still: Hurricane electric provides configuration samples for several operating systems, including Linux, FreeBSD, and several flavors of Windows. All you have to do is set up your tunnel, pick your external address, and choose from’s configurations what best matches your setup and go from there.

If you’re using Gentoo, the IPv6 guide is mostly safe, but don’t bother following it for configuring your tunnel–you’ll need to follow Hurricane Electric’s suggested configurations for “Linux-route2.” If you don’t, you might wind up being unable to route IPv6 packets between your internal network and the outside world. Don’t say I didn’t warn you.

If all goes well, you should wind up with a new device that looks something like this:

he0       Link encap:IPv6-in-IPv4
          inet6 addr: 2001:470:c:407::2/64 Scope:Global
          inet6 addr: fe80::4800:2c85/128 Scope:Link
          UP POINTOPOINT RUNNING NOARP  MTU:1280  Metric:1
          RX packets:4136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3342 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3564671 (3.3 MiB)  TX bytes:492987 (481.4 KiB)

I won’t go over the details–there’s plenty of guides dedicated to setting up tunnels, configuring your kernel, and installing necessary software. If you can’t get the tunnel working, make sure you did something analogous to:

ip tunnel add he6 mode sit remote <SERVER IPv4 IP ADDRESS> local <YOUR IPv4 ADDRESS> ttl 255
ip link set he6 up
ip addr add <CLIENT IPv6 ADDRESS> dev he6
ip route add ::/0 dev he6

You can verify the link state by pinging a couple of IPv6-only sites (use ping6!). First, try the server IPv6 address from; if that works, try these:

$ ping6
$ ping6

There are many other IPv6-enabled locations. I’ll leave their discovery as an exercise to the reader.

Once you’re able to successfully ping locations beyond your own delegated subnet and Hurricane Electric’s routes, it’s time to move on to more advanced topics.

Router Discovery

IPv6 includes provisions that limit the overall necessity of DHCP. No longer must addresses be delegated by a central host, and IPv6’s auto-configuration provides routing (via discovery) to connected clients. In most cases, DHCP on a pure IPv6 network is only required for supplying name server addresses and other related chores. Even then, I’ve read speculative mumblings on at least one mailing list that some such tasks could be handled via nearest-neighbor discovery. I haven’t yet tested that, however. Windows Vista (and up) already happens to have shaky IPv6 support for anything out of the ordinary.

Depending on your platform, router discovery announcements may be provided by either radvd (most Linux distros) or rtadvd (*BSD). Providing IPv6 access to your network is simply a matter of installing the appropriate package and tweaking radvd/rtadvd’s configuration file. Bear in mind that rtadvd’s configuration is somewhat terser than radvd, though it’s also much shorter. FreeBSD’s handbook has an example for that, too. However, if you’re using some flavor of Linux, you’re in for a real treat. Here’s what my configuration looks like:

interface eth1
    AdvSendAdvert on;
    AdvLinkMTU 1280;
    MaxRtrAdvInterval 300;
    prefix 2001:470:d:407::/64
        AdvOnLink on;
        AdvAutonomous on;

The above configuration was borrowed almost entirely from the Gentoo IPv6 guide and it works well. There are some caveats, though. If you plan on supplying DHCP via IPv6, you must add AdvManagedFlag on; somewhere after the AdvSendAdvert declaration; if you don’t, your clients won’t ever solicit DHCP requests. As far as I can tell, this isn’t mentioned in any how-to guide that I’ve yet read.

The fascinating thing about IPv6 is that the immediate availability of a router discovery service on the local network will propagate IPv6 addresses to all connected clients that support it. It’s almost like magic (in fact, it is). Try pinging some IPv6 hosts from your clients to prove it!

Linux-only Issues

radvd has a nasty habit of unsetting the sysctl variable. When it does, connected IPv6 clients won’t be able to do anything via IPv6 and, if available, will degrade to IPv4 access. If you’re having trouble accessing the IPv6 Internet from your clients (or vice-versa), check this sysctl value. You can do so either via sysctl or by examining the contents of /proc/sys/net/ipv6/conf/all/forwarding. If it’s set to 1, then forwarding is enabled and your tunnel may not be working (or ip6tables might be incorrectly configured). If so, keep reading.

You may also encounter an issue where clients are allocated IPv6 addresses via auto-configuration but refuse to access the IPv6 Internet. Under my Gentoo install, this was resolved when at least one IPv6 address from the pool delegated via my tunnel broker was added to the appropriate interface on the routing box. It’s possible that this issue is specific to my setup.


DHCP is still somewhat necessary on IPv6 networks where neighbor discovery doesn’t work for domain name resolution services. Unfortunately, there’s a big catch: It works. Partially. This section highlights some of my experiences with two main stream DHCP client/server packages: DHCPv6 and ISC DHCP v4.1.


DHCPv6 behaves similarly to the WIDE-DHCP implementation. DHCPv6 has also been superseded by ISC DHCP v4.1. I’ve also had somewhat more luck with static IP assignments using DHCPv6. Here are some thoughts:

  • Most distros provide this as the defacto DHCPv6 DHCP client/server software.
  • Configuration is slightly less verbose than ISC’s DHCP.
  • Lightweight, spartan implementation.
  • Highly finicky configuration system.
  • New development halted; development is in maintenance mode.
  • Requires slightly more work than ISC’s implementation to work correctly.
Example Configuration
interface eth1 {
    allow rapid-commit;
    option dns_servers 2001:470:d:407::1 2001:470:d:407:0:baad:beef:cafe;
    send information-only;
    link AAA {
        allow unicast;
        send unicast;
        send rapid-commit;
        allow rapid-commit;
        pool {
            range 2001:aaa:12:1234::bead:500 to 2001:aaa:12:1234::bead:ffff/64;
            prefix 2001:aaa:12:1234::/64;
    host statichost {
        duid 00:01:00:01:12:aa:23:cb:10:ac:19:83:82:a8;
        iaidinfo {
            iaid 221149200;
            renew-time 1000;
            rebind-time 2000;
        address {
            prefer-life-time 2000;
            valid-life-time 3000;

To a certain degree, I had the most luck with DHCPv6. Static addresses would assign (correctly) to FreeBSD clients and name server addresses would (usually) propagate. Neither Windows Vista nor Windows 7 would accept static IPv6 address assignment; I’m not sure why. Even with the correct DUID-LLT (local link + time), Windows would refuse static assignment. Dynamic addresses worked fine for all OSes I tested.

DHCPv6 version 1.2.x will build under Gentoo but it won’t run. The ebuild is incorrect and the resulting binary will attempt to load data from /var/lib/lib. Fortunately, there is a workaround.


ISC DHCP 4.1 is still very much a work in progress but works fantastic for IPv4 networks and acceptably for IPv6. ISC DHCP is the current defacto standard for DHCP.

  • Configuration is easy to understand and follow
  • DHCP configuration for IPv6 networks is almost identical to its IPv4 counterparts.
  • As an ISC project, ISC DHCP has a long running track record and earlier versions likely power most corporate and ISP networks.
  • IPv6 is only starting to stabilize in the still somewhat experimental 4.x branch.
  • Most basic IPv6 features have been implemented but some esoteric ones have yet to be developed.
  • Slightly larger package than DHCPv6; might not be suitable for highly restricted embedded applications.
Example Configuration
default-lease-time 1800;
max-lease-time 7200;
option dhcp.domain-search "";
option dhcp6.domain-search "";
option 2001:470:d:407::1, 2001:470:d:407:0:baad:beef:cafe;
subnet6 2001:aaa:12:1234::/64 {
    allow unknown-clients;
    default-lease-time 1800;
    min-lease-time 4000;
    max-lease-time 7200;
    # Ranges can be provided in many different ways.
    #range6 2001:aaa:12:1234::bead:10 2001:aaa:12:1234::bead:ffff;
    #range6 2001:aaa:12:1234::10 2001:aaa:12:1234::ffff;
    range6 2001:aaa:12:1234:0:ccee:0:0/96;
host statichost {
    host-identifier option dhcp6.client-id "00:01:00:01:11:f9:4b:5a:08:00:27:c5:40:c7";
    fixed-address6 2001:aaa:12:1234::500;

Note: The “host” declaration can appear inside a subnet declaration. I tend to separate them for my home configurations for aesthetic purposes; don’t do this for larger networks.

Other Thoughts

ISC DHCP supports both IPv4 networks and IPv6. However, it is currently impossible to supply DHCP access to both IPv4 and IPv6 networks at the same time without running multiple instances of dhcpd. It’s possible, and Gentoo certainly makes it easy; however, some tweaks are needed.

The instructions for running multiple instances of dhcpd on the same Gentoo server are somewhat misleading. If you read them, your initial impression would be to simply do something like the following:

# cd /etc/init.d
# ln -s dhcpd dhcpd6
# cp ../conf.d/dhcpd ../dhcpd6
# nano -w ../dhcpd6
# cp ../dhcp/dhcpd.conf ../dhcp/dhcpd6.conf
# # Point /etc/conf.d/dhcpd6's config file to /etc/dhcp/dhcpd6.conf
# # Done!

Unfortunately, this won’t work. Under the checkconfig() function in /etc/init.d/dhcpd (which is now also linked to /etc/init.d/dhcpd6) refuses to honor the DHCPD_OPTS defined in /etc/conf.d/dhcpd. Thus, forcing the server to run in IPv6 mode (with the -6 switch, though IPv6 mode is the server’s default) doesn’t work. Instead, it is necessary as of this writing to create a copy of the /etc/init.d/dhcpd script and modify the function accordingly to include ${DHCPD_OPTS}:

checkconfig() {
        /usr/sbin/dhcpd ${DHCPD_OPTS} -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t 1>/dev/null 2>&1
        if [ $ret -ne 0 ]; then
                eerror "${SVCNAME} has detected a syntax error in your configuration files:"
                /usr/sbin/dhcpd ${DHCPD_OPTS} -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t
        return $ret

(Admittedly, the above code may cause problems if the DHCPD_OPTS variable contains -cf or similar switches.)

Furthermore, it is also necessary to point the server to a different lease file and include the following in a separate dhcpd.conf:

pid-file-name "/var/run/dhcp/";

Here’s what my /etc/conf.d/dhcpd6 looks like:

DHCPD_OPTS="-6 -lf /var/lib/dhcp/dhcpd6.leases"

Also, much like DHCPv6, ISC DHCP won’t supply static addresses to Windows clients. I can only assume this is the consequence of an incorrect understanding of how DUIDs work on my behalf. If I make an insightful discovery or someone posts corrections in the comments, I’ll update these notes accordingly.

Link Local Routing

IPv6 doesn’t really support the notion of private networks. At least, it doesn’t support private networks in the same manner as IPv4. Instead, there are several ranges reserved for router discovery and, more importantly, “link local” addresses. Link local addresses are automatically created whenever IPv6 support is enabled for an interface and exist in the fe80::/16 prefix. Any address in this range is not routeable but can be pinged on the local network.

There is one surprising discovery I made with regards to IPv6’s auto-configuration. On the local network, the link local address of your router actually becomes the gateway for hosts that it has automatically configured. Gone are the *.*.*.1 router conventions of IPv4. This may seem unimportant, but when you consider that it will impact what choices you make with regards to your firewall, it suddenly becomes much more important.

Samba, CIFS, IPv6, and You

I’ve been running Samba on my local network for literally years to supply access to my /home and various file repositories. However, something unusual started happening the day I booted my server with a new kernel including IPv6 support: Windows 7 would announce that it was “unable to connect all network drives” immediately after login. I assumed (incorrectly) that Samba had crashed, and thus opened Windows explorer, double-clicked the drives, and then they mysteriously opened as if nothing were amiss.

After much poking, prodding, and a liberal application of tcpdump I discovered a couple of important things. First, it is important to have Samba upgrade to at least version 3.2 when adding IPv6 to a network (3.0 appears to be resolvable, even though it doesn’t have fully capable IPv6 support). Second, I also learned that IPv6 packets must be routeable to the Samba server–and must be processed by it as well–because Windows Vista and Windows 7 will both attempt to use CIFS over IPv6. If IPv6 queries fail, these versions of Windows will report that attached network drives cannot be mounted even though they appear to degrade successfully to IPv4 access.

Also, one of the more significant contributors to my Samba problems was related to how I had my firewall configured. Being a good netizen and blocking everything (except what I want) by default, I figured allowing access to the local network via eth1 (my internal interface) was enough. That is to say until I realized that I hadn’t correctly allowed my internal network unadulterated access to the server. Moral to the story: Once you get around to setting up ip6tables, double check your settings. I can’t stress this enough.

Chances are, too, that if you’re using Samba, you’ve probably set it up to provide printing access via the local network to Windows machines that don’t yet support IPP. (Of course, if you’re using Windows Vista or Windows 7 x64, you have no other choice than to use IPP but that’s another rant!) If you’ve enabled ip6tables, you might notice a lengthy delay in printing, and searching for a printer will seem nearly impossible. Here’s why:

Feb 19 16:54:39 sagittarius [277797.502535] IN= OUT=lo SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=42045 DPT=631 WINDOW=32752 RES=0x00 SYN URGP=0
Feb 19 16:54:51 sagittarius [277809.502544] IN= OUT=lo SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=42045 DPT=631 WINDOW=32752 RES=0x00 SYN URGP=0
Feb 19 16:55:15 sagittarius [277833.500054] IN= OUT=lo SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=42045 DPT=631 WINDOW=32752 RES=0x00 SYN URGP=0
Feb 19 16:56:03 sagittarius [277881.502542] IN= OUT=lo SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=42045 DPT=631 WINDOW=32752 RES=0x00 SYN URGP=0

Notice anything amiss? The local machine (that’s ::1/128, or all those zeros followed by a 1) keeps sending requests to port 631 but why. What’s wrong?

This is what happens when Samba sends printer list requests to CUPS. Without a reply, it’ll continue trying until it gives up. The fix? Allow localhost. I know it goes without saying, but it’s easy to overlook, particularly in something like iptables. Moreover, when you’re not used to examining IPv6 networks, it’s easy to overlook the rather unusual looking localhost declaration. Besides, there’s no reason not to grant localhost IPv6 access!

Alas, I get ahead of myself. My ip6tables section will be up and coming in a day or two, and I’ll even have a script prepared. Be aware that there are some unusual complications related to some of IPv6’s reserved ranges (more on that later), but by and large, configuring iptables for IPv6 is analogous to IPv4. The only significant difference is that you’ll have more basic rules to contend with to support things like automatic discovery.

See you next time!

No comments.
Page 2 of 41234