Share your Internet connection under Ubuntu

Updated . Posted . Visible to the public.

This note describes how to setup a box running Ubuntu to share its Internet connection with another PC.

  • You will need two network interfaces to do this. One will connect to the Internet (e.g. UMTS card), one will share the connection with the other PC (e.g. Wired LAN).
  • On the Ubuntu PC, right-click on the connection symbol in the tray. Select Edit connections.
  • Switch to the wired LAN card. Go to Edit and set the method to Shared to other computers.
  • Connect the other PC to your wired LAN card. You can use the same cable that would otherwise connect to a router.
  • Restart the Ubuntu box.
  • While the Ubuntu box is restarting, change the connection settings of that other PC so it uses DHCP to get its IP. Also manually set its DNS setting so it uses Google public DNS Show archive.org snapshot . This serves on the IP 8.8.8.8.
  • On the restarted Ubuntu, connect to the internet with UMTS. Also disconnect any network connection that might have priority over UMTS (e.g. WLAN).
  • Obtain a new IP address on the other PC if it hasn't already done so on its own.
  • You should now be able to use the Internet on both PCs.

Remember to change your wired connection settings back to DHCP when you're no longer sharing the connection.

Henning Koch
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2010-10-31 07:54)