Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
1  
Thanks everyone, for both the GUI approach and through NAT forwarding. I'd never actually noticed the option there in NetworkManager. –  Nerdfest Aug 26 '10 at 21:32

2 Answers 2

up vote 21 down vote accepted

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.

share|improve this answer
    
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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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