More workings on Blosxom export

Now I am working no the import and export functionality of WordPress. Export seems to dump an XML file, with all text as a big CDATA section (see the W3C for what a CDATA is about). It appears that P tags are removed in the XML dump, and carriage returns are used, so the XML export looks readable with preserved line breaks.

Oh well. Progress, perhaps.

Avast! SIP IPTables in mainline kernel

Well, following all the change logs out there for 2.6.18 Linux Kernel release shows that:

Add SIP protocol support to Netfilter (commit), a statistic match which is a combination of the nth and random matches (commit), a quota match (commit), and support for Call Forwarding to the H.323 netfilter module (commit)

Pretty obscure, so let me describe a problem with SIP.

SIP packets, like any other packet, has a header. This header has the standard IPv4 options, of which source address, source port, destination address and destination port are the most blindingly obvious ones. NAT is pretty well performed by most firewall boxes at tweaking these values and replaceing them on traversal of the gateway, and putting things back for responses. No surprises here.

However, the payload of a SIP packet by its design, has the IP address embedded in it. For example, the payload may have:


INVITE sip:3103 at 10.0.0.173 SIP/2.0
Via: SIP/2.0/UDP
10.21.99.221:5060;branch=z9hG4bK6caf7db4
From: "Someone"
<sip:3151 at 10.0.0.221>;tag=as23c4523c
To: <sip:3103 at 10.0.0.173>

The design is so that intermediate gateways can tack on their ‘Via’ headers and the call can be switched virtually between a chain of gateways, each one doing their bit. All well and good until you want to intrduce NAT, as the ‘Via’ then has information for networks the destination cannot necessarily get to.

This patch, I think, does the necessary bits to update the payload to make the payload be corrected as it passes through a NAT.

So, this will probably start to mean that Asterisk people will no longer have to set localnet definitions to be able to correctly operate their internal and external SIP connectivity behind their firewalls.

The implications are even bigger when hard ware vendors of DSL gateways that run Linux kernels also have this enabled – suddenly the Mom and Pop crowd can just plug SIP devices in at home and hey bringo, there goes the Telecomunications industry as we know it (is that good or bad?).

Juniper, hello, Netscreen product line? Your SIP ALG should be doing this?

Viva la revolution!

Reliable (High Availability) networking with Linux

In a word: Bonding. See Nick Ferrier’s post to Debian-Administration. Grab my check_bonding.pl script from my Subversion respository so you can monitor your links. Get two managed switches (I like the DLink DGS-3324SR gigabit switches). Enable MSTP (Multiple vlan Spanning Tree Protocol) on ports 1, 2, 23 and 24, and disable spanning tree on all other ports; patch ports 23 to 1 on the next switch, and 24 to 2 on the next so you have two links between each switch. Plug your two interfaces into any of the other ports (3-22) on each switch. End of story.