There are some situations where you want to do the opposite of creating a wireless hotspot and you want to share a wireless connection to an ethernet connection. For example, if you’re at a hotel that offers only WiFi internet access, you could share that connection to an ethernet switch and plug in more devices. Also, you could get online with your wireless connection and create a small NAT network to test a network device without mangling your home network.
Doing this in older versions of GNOME and NetworkManager was fairly easy. Newer versions can be a bit more challenging. To get started, I generally like to name my ethernet connections with something I can remember. In this example, I have a USB ethernet adapter that I want to use for sharing a wireless connection. Opening the Network panel in GNOME 3 gives me this:
Click the cog wheel at the bottom right and then choose the Identity tab on the next window. Use a name for the interface that is easy to remember. I chose Home USB Ethernet for mine:
Press Apply and then go to a terminal. Type nm-connection-editor and you should get a window like this:
We can add a shared network connection by pressing the Add button. Do the following afterwards:
- Choose Ethernet from the list and press Create…
- click IPv4 Settings
- Choose Shared to other computers in the Method drop-down menu
- Enter Share via ethernet as the Connection name at the top (or choose a name you prefer)
When that’s all done, you can close the Network Connections menu we opened via the terminal. Now open the Network control panel once more. It should have two profiles for your ethernet connection now (mine is a USB ethernet device):
If it’s not already selected, just click on the Share via ethernet text. NetworkManager will automatically configure NAT, DHCP and firewall rules for you. When you’re ready to go back to normal ethernet operation and you want to stop sharing, simply click on the other profile (mine is called Home USB Ethernet). NetworkManager will put the ethernet device back into the original way you had it configured (default is DHCP with automatic IPv6 via SLAAC).





Hi,
Now, let’s suppose you want to share your ethernet connection via Wi-Fi.
Did you find a way to customize the settings of a Wi-Fi share ?
Not worked.
When I clicked “shared connection”, it broke up and automatically passed to normal connection.
EDIT:
It worked after installing dnsmasq package on Archlinux
sudo pacman -S dnsmasq
On Debian base distros:
sudo apt-get install dnsmasq
Thanks
Hi Major… I’m a Software Engineer by profession. I would like to know your experience of using Linux for work. Have you ever faced issues with any application that you need to use for work, which is not present in Linux , but is in OSX/Windows ? I’m asking because I’m planning to buy Lenovo Thinkpad X1C3 instead of Macbook Pro which I’ll be using for both personal stuff and work. And I want to use Linux in X1C3. So if you could share your insight on this, it’d be so helpful for me :) . BTW , my company uses MS Exchange for mail.
Hey Lalit — Everyone feels a little differently about this question. As for Windows, I don’t use any Windows software during my daily work. Windows doesn’t make sense for me.
OS X is good, but I found myself facing plenty of issues in 10.10 that I couldn’t fix. The response from Apple was usually non-existent on most issues, and there was very little I could do to fix things on my own other than simply waiting for Apple to make a fix.
Switching to Linux was a rough start. I ended up with a bunch of initial issues, but they ended up being fairly easy to fix. I’ve found that I’ve had slightly fewer problems with Linux than OS X, but the problems I do have are ones that I can fix.
At least on Debian Jessie, the required dnsmasq-base package is not a network manager dependency, so you’ll have to install that first. Just do not install the dnsmasq package, as that contains the dnsmasq daemon and will confuse network manager to no end.
Hi Major,
I would like to do the opposite, I mean I have a notebook with Debian Jessie (GNOME environment) and I would like to share its wired connection via WiFi to connect an Android tablet with Internet. Do you know some way to do it?
Thanks,
Don.
It works for me. I test it from fedora 22 to windows 10 computers. Thank you
Hello, thank you for writing such a useful guide, it works perfectly for me in Lubuntu 14.04 and 16.04.
As I can make this connection is only in LAN network mode and prevent internet access, on demand?
I tried to edit the network connection IPv4Setting >> Method >> Manual Link Local Only, but it did not work, I guess I need something extra to configure.
Thanks.
Where can I change the default network setting it is using for dhcp? I got some 10.42 network and I want it to be a 192.168 network. I found and changed the iptables to reflect that, but the gui still shows the 10.network. I found some network manager config files like ifcfg-interface but there was no ip schema indicated. can I add settings in there?
Thanks! Works like a charm on Fedora 25 :)
thank you so much, you made my day
I managed to share my laptop 3G connection over Wifi, I was missing your valuable informations
Thank you very much
Works flawlessly on Fedora 25, thanks! I find that it also works for USB LTE modem that I have.
I’m now looking for a way to make it on a Fedora server also. It should be possible with nm without GUI.
Hello! At the beginning, every thing is well but its about two weeks I connecting with share connection profile is not working. I am using debian 8.8
Awesome work it! Thank you
Hello. I want to configure an ip camera, but I want to connect it to my wifi fedora hotspot. However the IP camera needs to be connected to the Ethernet port for the first use. (The camera do this for copy the modem essid and the wpa password). So. How can I configure the Ethernet hotspot using the parameters of my wifi hotspot?
Thanks for your help.
Hey That did the trick!
I had an issue with a VOIP phone (needed to be connected to private VPN to download it’s config on TFTP… Was a headache! Your trick did it! I knew I had done that before but could not remember that nm-connection-editor! That’s what I was looking for. Good post! Thanks again! You saved me a round trip to Montreal just to get an IP!
SP
It works perfect with Debian 9.
Thanks a lot.