Simple Internet connection sharing with NetworkManager

24 March 2009

NetworkManager version 0.7, shipped with Ubuntu 8.10 and later, contains a redesigned user interface for managing network connections.

Among the new features and UI is an option to make a connection “Shared to other computers”. This is basically a dead-simple NAT (Network Address Translation), or Internet connection sharing, built right in to NetworkManager.

To enable this, you must follow three steps:

  1. Install dnsmasq on your computer. (On Ubuntu, you will want to install the dnsmasq-base package.
  2. Make sure your WAN connection (i.e. Internet-connected connection) is all configured (e.g. with DHCP or a static address) and working.
  3. For your LAN interface (which might be a second network card or a wireless card), select “Shared to other computers” in the IPv4 Settings tab.

NetworkManager doing sharing

If everything works right, NetworkManager should have auto-configured a subnet and DHCP server on your LAN interface, and is ready for sharing your Internet connection. Easy peasy!

IPv6 certification

20 January 2009

I’ve just become an “IPv6 Sage” according to Hurricane Electric’s free IPv6 certification program.

The program is a series of tests that encourages you to learn about IPv6, and put your skills into practice by setting up tunnels, web servers, mail servers, and DNS configuration that is all IPv6-enabled.

Signing up is easy and free. Just register on the site, and you can begin right away through a series of automated tests. It begins easy, with setting up a tunnel, having your computer pinged, and gets progressively harder with tasks such as setting up an IPv6-enabled web server and mail server. When you have set up each task (e.g. web server), the certification website will connect to your server to verify that it’s all working, and award you the relevant level.

Doing the tests gives you loads of fun (if you are that way inclined), and I highly recommend it to anybody who is remotely interested in system or network administration.

Internode provides 6to4 (but don’t announce it)

9 January 2009

I’ve used 6to4 in the past, which impressed me because of the simplicity of its configuration. It uses the specially assigned anycast IP address 192.88.99.1 to magically find the nearest 6to4 router.

Well, most of the time (like when we were signed up with iiNet), if you do a traceroute to 192.88.99.1, you’ll find that the nearest 6to4 router is somewhere in Antarctica, or some lunar base on the Moon — and latency is terrible.

If you’re an Internode customer, you’ll know that they already provide IPv6 access to their customers, but the only documented way for non-Ethernet customers to get on IPv6 is via a Gateway6 tunnel broker that they provide, which is a bit painful to configure.

Well, just out of curiosity, I thought I’d do a traceroute 192.88.99.1, and lookie what I found:

traceroute to 192.88.99.1 (192.88.99.1), 30 hops max, 40 byte packets
 1  192.168.0.1 (192.168.0.1)  1.026 ms  3.103 ms  3.774 ms
 2  lns10.syd7.internode.on.net (150.101.197.27)  30.188 ms  34.723 ms  39.424 ms
 3  vl114.cor2.syd7.internode.on.net (150.101.120.166)  44.651 ms  49.756 ms  54.390 ms
 4  gi6-0-0-102.bdr1.syd7.internode.on.net (150.101.120.169)  82.688 ms  87.482 ms  92.403 ms
 5  pos2-3.bdr1.adl6.internode.on.net (203.16.212.22)  98.641 ms  111.468 ms  111.975 ms
 6  gi1-22.cor1.adl6.internode.on.net (150.101.225.94)  120.101 ms  50.369 ms  52.897 ms
 7  fa0-0.sixtofour.adl6.internode.on.net (150.101.1.165)  53.626 ms * *

Looks like Internode provide their own 6to4 router, of which the ping time is around 50msec. Awesome!

Was this meant to work?

18 June 2008

Just been reading about Zeroconf on Wikipedia, and apparently 224.0.0.251 is a special IP address reserved for multicast DNS. Out of curiosity, I pinged this address, and our Zeroconf-enabled printer (HP PSC 2510) responded to the ping.

jeremy@glenstorm:~$ ping -c 1 224.0.0.251
PING 224.0.0.251 (224.0.0.251) 56(84) bytes of data.
64 bytes from 192.168.0.33: icmp_seq=1 ttl=64 time=106 ms

--- 224.0.0.251 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 106.604/106.604/106.604/0.000 ms

Was that meant to work? None of our Avahi-running computers responded to the ping, so does that suggest the printer has a broken Zeroconf implementation?