DHCP and Dynamic DNS for clients with multiple network interfaces

So here’s what I imagine ought to be a common situation.

I fire up my laptop; it registers on my wireless network and acquires an IP address via DHCP. The DHCP server updates the relevant DNS server over Dynamic DNS (or, in the case of dnsmasq, it is the DNS server), so that everyone else on the network knows where my laptop is. All well and good so far, and nothing unusual.

Then I think “damn, this wireless network is far too slow/needs rebooting. I’ll plug in the ethernet cable.” More DHCP. dnsmasq overwrites the DNS record at this point, but that’s fine, the wired interface should take precedence anyway.

“Ok, I copied over the torrent/rebooted the wireless router. And now I’m bored with this cable.” So I disconnect the ethernet. And my DNS is screwed, because it’s still pointing at the IP address for the ethernet interface.

Continue reading

Plus ça change… well, plus ça change

Well, it’s fair to say that my scrawlings here have hardly been the commonplace event I once envisaged. At the end of the day though, it’s hardly as though I or anyone else cares… I’ll write some stuff when I damn well feel like it and not a minute before.

So that still leaves me thinking about where my life has been for the last 11 months. It’s odd; many things are just the same – Wammux still pays me to come up with designs for exciting telephony gateways, and Denbigh Street remains convenient but, uh, “homely”. As I write this, a mouse is doing its best to stare me down. Tragically I seem to have reached the point where I don’t even bother getting the traps out any more – I know the mice will just stare at them, interesting museum pieces which ensnared their naive ancestors. I’ve been outwitted by one of the smallest mammals in the world.

One thing that has, of course, changed, is that Tom is no longer around. One was always used to Tom being away for months at a time, so in some ways his death has been a little easier to come to terms with than one might have feared; and indeed on a day-to-day basis it’s not too hard to put such matters out of one’s mind. But to see it that way is is to take a very superficial point of view; you only need the briefest of reminders – a memory of a night out, a link to some of his work, even his “poetry” on the Denbigh Street fridge – for the memories to return and for you to realise that you’ll never be able to share those good times again; you won’t be able to meet up for a chat about beer, music, girls; there won’t be any more tales about ending up at a stranger’s wedding with a camel and a bottle of Zubrovka.

ipt_recent brokenness

After noticing a lot of password brute-force attempts on sw1v.org, I decided to use the ipt_recent netfilter module to limit the number of connections a single host can make to the ssh port in a 5-minute period.

This seemed to work well, but after a while I noticed that I was unable to get in myself. I threw together this hacky bit of perl to give me an analysis of the historical packet data used by the module, from /proc/net/ipt_recent. All seemed present and correct, but I still couldn’t get in :( .

Then I read this bug report. It seems I have to patch the ipt_recent source… Actually, I think this is the wrong solution anyway, and I need to disable hosts at the sshd level after a few failed password attemps.

The bus of doom

Here’s one to start us off: the demise of the Routemaster. Whilst it’s undeniably true that these dinosaurs were inefficient in terms of maintenance, fuel, personnel and pollution, they were not without advantages, and here’s one: the fact that you can hop off them whenever you damn well feel like it.

Last night I caught a bus from Chiswick to the Seven Stars. A good idea in theory; however it turns out that TFL, in their wisdom, have decided to divert the 94 around that particular bit of Goldhawk Road. Not really their fault if the road is being dug up, but it would have been nice to have been told about it before the bus randomly disappeared up towards Acton. What made the experience particularly bad is that the driver then refused to let off any of the protesting passengers until he got to Shepherds Bush – by which time, we’re all a mile from where we wanted to be. Arguments were proffered about how he could let us out at this traffic light, or that random bus stop, but to be fair to the driver, he’s only doing what he’s been told to.

The question is really – why on earth do the Bus companies insist on having a policy of not letting passengers off except at scheduled stops? It’s not just in this situation that it’s annoying – much of central London is prone to having buses sitting in a traffic jam, full of passengers who could walk to their destination in a quarter of the time it will take the traffic to clear.

What harm would it do to let us out? It’s not costing anyone any time or effort. I suspect it’s a symptom of an over-litigious society: the bus operators are worried that some numpty will step out into the path of an oncoming truck and they’ll get sued. But come on, you’re stupid enough to get out of a bus without looking, you deserve a Darwin award anyway.

Anyway, congratulations, London United: you win the Stupid Person Of the Week award.

That’ll teach me to be too lazy to walk :( .