Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm in a strange, fun situation with a dual boot windows XP/Ubuntu linux computer that is only connected to the internet via USB 3G dongle, and i need to connect another device that only has a ethernet port. The other device does not support connecting via the USB 3G dongle

Is there some magical, hacky software that can turn the unused ethernet ports of my computer so i just plug the other device and get internet access?

share|improve this question
In windows, you can use internet connection sharing. – MaQleod Jul 26 '12 at 20:12
A better title would be "Use computer as router" – RedGrittyBrick Jul 26 '12 at 21:30
up vote 3 down vote accepted

For the XP site: look up 'internet sharing'. You just need to enable this.

For the GNU/Linux site I think that you just need to

  1. Fire up the 3G connection
  2. Assign an IP address to the NIC
  3. Assign a different IP address to the NIC on the other computer
  4. Add routing table entries.
  5. Enable forwarding. ( sysctl -w net.ipv4.ip_forward=1 )

  6. If you are using non public IP ranges (e.g. 192.168/16) and you want to connect to the Internet then you also need to enable IP Masquerading. (Thank you for reminding me of that @MaQleod).

On both cases you need a crossover cable or a MDI/MDX aware port on at least one of the computers.

share|improve this answer
You also need to enable IP Masquerading under Linux if you only have one externally routable IP address. – Alan Curry Jul 26 '12 at 20:57
Good point. I will add it to the answer. – Hennes Jul 26 '12 at 21:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .