That's pretty much it. If I connect to the Internet on wlan0, how can I share this connection with a device plugged into my wired Ethernet port eth0?


I had a MacMini running Ubuntu 9.10 using the Wireless connection for internet. Then I connected my Xbox360 into the MacMini's ethernet port in order to use Xbox Live.

It's ridiculously easy. Simply right click on your network manager and choose "Edit Connections". Then in the "Wired" tab, you can either use your existing wired connection, (or create a new one by hitting the "Add" button, name your new connection "Shared Network Port" or something similar), pop into its IPv4 tab and in "Method", choose "Shared to other computers". Apply everything and close the network manager windows.

Now when you need to plug something into that ethernet port, you can share your WIFI internet conenction simply by clicking on network manager and choosing the "Shared Network Port" entry there.

If you want this to be a constantly used ethernet connection used for sharing and nothing else, feel free to edit "Auto Eth0" instead of creating a new entry like I describe above. Creating a new entry gives you some flexibility to choose however.

Note that this uses a bit of NAT (network address translation) magic to work properly, so the Xbox360 (or whatever you plug into your wired port) will get a funky IP address.

From memory, it will only be able to see the internet too - I don't think you can see the host computer, the one with the internet connection. You can set that up, but it requires a bit of messing about with DHCP servers, I believe. I didn't need it, so I didn't go down that road.

| improve this answer | |
  • 1
    Using the GUI method, a machine plugged in to the eth0 port does not seem to get an IP address ... I can see eth0 on the 'sharing' side giving a 10.x IP address to eth0, but no luck getting an address on the client. I've done a networking restart ... I'm assuming that a reboot is not necessary. – Nerdfest Aug 26 '10 at 21:01
  • ... nevermind. I tried it using a different client machine (Linux instead of Windows ... figures) and it worked fine. – Nerdfest Aug 26 '10 at 21:30

That is easy. Right click the network manager and click edit connections. The under Wired tab, Add a new connection. Under the IPV4 Setting tab, select "Shared to others" for Method.

Now other machines should connect to LAN and get Internet access automatically.

Sharing internet over ethernet

| improve this answer | |
  • doesnt work for me... ubuntu 16,04 and sony xperia x running android 7,1,1 was not able to connect under these settings... – Dinesh Dec 12 '17 at 14:05
  • How would you do this from the command-line, for instance if you don't have a GUI? – Andy Forceno Mar 27 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.