I have 2 computers, both with Gigabit controllers, connected with a regular Ethernet cable. I have a host machine, which is connected to the internet, and a client machine, which is only connected to the host machine.

I would like to share the host's internet connection with the client machine. I have read online, and I found out the best way to do this is by opening Network Manager's GUI on my host machine, editing my Ethernet connection and setting the IPv4 settings to "Shared to other computers".

On my client machine, I have it set to automatically get an IP address using DHCP.

My host machine does not detect the cable as being plugged in under these settings, and my client machine reports me it cannot connect to the network.

enter image description here

How do I properly share my internet connection from the host machine to my client machine, preferably using Network Manager.

  • Please expand the question with the following info: 1. How is your host machine connected to the internet? 2. Have you used a cross-over cable between the machines? 3. Do you have a DHCP server running on your host machine, if so which and how configured?
    – Anthon
    Sep 7 '14 at 17:38
  • @Anthon I am connected to the internet using my wirless interface. I am not using a crossoever cable as I understand the Gigabit Ethernet should be able to work without one. I am not running a DHCP server, I assumed Network Manager would take care of that?
    – Jeroen
    Sep 7 '14 at 17:42
  • Few people read beyond the question into the comment exchange, that is why I asked you to expand the, currently incomplete, question.
    – Anthon
    Sep 7 '14 at 18:04

There are multiple things that have to work in order for your host machine to be able to work as a router for your client machine.


You will need a cross-over cable to connect the machines. If you have a cable and you don't see the lights next to the connectors come up when you plug it in, you are not using the right cable.¹

DHCP server on the host

A normal installation doesn provide the client for DHCP on a Linux machine, but normally not the server. You have to install and configure a package for that. On my Ubuntu system that package is isc-dhcp-server. Configure it such that it services C-class address range different from what the wireless connection on your host is using. Don't forget to have the DHCP server provide the DNS information it has got (from your provider) to the client, otherwise it cannot do name resolutions.²

Route on host

You have to setup a route on the host to forward traffic from the client to the wireless interface. That is not a trivial matter a non-exhaustive description for that can be found here, among other places.

¹ As the wikipedia indicates this is also needed for Gigabit ethernet. There are ethernet interfaces that can handle either cable, but this are primarily found on routers, not on PC mainboards.
² Alternatively you can setup a (caching) DNS server on the host and have the client ask the host.

I have had a setup like this when I had an ISDN based internet connection in my Linux Box (with SuSE 4) and several client machines. I am glad that I nowadays my router that takes care of all this at a price level of 15-20 minutes of what work.

  • 1
    Thanks for your answer. I do not think I need a cross over cable as I know my host has the Auto-MDIX 'extension'. What does Network Manager's option to share internet actually do if it isn't sharing internet?
    – Jeroen
    Sep 7 '14 at 18:13
  • How does one go about "configur[ing] it such that it services a C-class address range different from what the wireless connection on your host is using"? I am running into an issue where DHCP will not start up (debian9). I am trying, however, to do exactly this: forward my laptop's wireless connection to a desktop via direct ethernet connection.
    – Chris
    Mar 19 '19 at 15:30

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.