Perhaps this is a scenario you know. In a hotel room and they provide wifi or wired ethernet access but you gotta pay. They do it by MAC address so its difficult to have two systems online at the same time; yet you need to have two or want to have two. On Ubuntu Karmic this is trivially easy and no additional equipment is required and Windows has it the same. You can do an internet connection share using the wired ethernet port very easily and when you plug another computer into the wired port with a crossover cable, the second computer gets an IP address and gets all the routes and dns setup. You have to install the dnsmasq package which itself is easy. Then just go to the network mangler and create a new wired ethernet connection called “shared”. Edit the ipv4 properties for the connection and select “Shared to Other Computers”. Plug in the cable between the systems and off you go. The second computer will get a IP address, etc.
You can also do something even nicer with a cheap little travelers AP. Plug it into the hotel wired ethernet port where you register. These little travelers will do the work and give you wifi in the room however you want it. Art showed me this trick in Singapore and it works a treat. I bought an engenius AP for this which has 3g, usb, and a few ethernet ports on it. The only limitation with the hotel providing wifi is I use a crossover cable and so am tied to the “host” computer. That’s okay though. The primary thing is to not disconnect the first computer when I wish to use my Windows 7 netbook.
On Ubuntu, the “shared to other computers” sets up all the hard stuff dynamically for ya. Great stuff.
Some resources to throw at ya:
Easy peasy.








Simply doesn’t work for me on 9.10. Network Manager drives me crazy. Atleast the kubuntu implementation.
I even switched to gnome to try it out but no go.
I am going to put gentoo on the laptop one of these days..
Yeah. My final test is that network manager does not do this reliably. I am using the iptables method instead. This one works reliably. Using nm, I get the connection dropping and losing the IP address every minute. I gave up before on nm and changed to wicd.
Just for the record; here’s the working method with a few comments that uses iptables and forwarding:
Configure the ethernet interface and iptables. In this case I am receiving hotel internet on wifi and want to share my primary ethernet. Run the following commands:
sudo ifconfig eth0 192.168.0.1 # or whatever you want to give it.
sudo iptables -A FORWARD -i wlan0 -o eth0 -s 192.168.0.0/24 -m conntrack –ctstate NEW -j ACCEPT #watch the line wrap here. But this forwards traffic from eth0 to wlan0
sudo iptables -A FORWARD -m conntrack –ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
sudo sh -c “echo 1 > /proc/sys/net/ipv4/ip_forward”
These commands setup iptables and tell the ubuntu system to do ip forwarding. Make sure the crossover cable is plugged in. I’ve tested this on windows 7 professional and ubuntu and it works much better than the network mangler method I first discussed.
For me even normal DHCP over the wired link has stopped working. I need to restart the network manually everytime.
Maybe it is a KDE-NetworkManager specific configuration bug