How to share wired network connection in 18.04
Solution 1
The graphical program that shows the feature you need is
nm-connection-editor
You can launch it from a terminal window or with Alt+F2
Higlight an adapter and hit the cog
Solution 2
To anyone who comes here and is still lost on what to do, I found a tutorial that explains it here.
Basic rundown
First run nm-connection-editor
in your terminal.
Next, you will see a screen that lists a bunch of different network devices.
Click on your wired connection and then click on the cog at the bottom of the window.
A window will open giving you a bunch of options to edit the connection. Go to the IPV4 settings tab and change the method to share to other computers. Finally hit save.
You should be all set to go! It's important to note that you may have to unplug and replug your network cable or reset the connection in order for it to work.
Solution 3
Using nm-connection-editor
set the usb-ethernet connections under IPv4 Settings to Shared to other computers
. Leave the internet ethernet connection alone.
For context, I wanted to give a USB ethernet (eth1) gadget (Pi Zero) access to the internet by sharing the PCI ethernet (eth0) internet connection. However, the only way I could get it working was to set eth1 to Shared ...
, the total opposite of what I expected the setup to be.
Related videos on Youtube
Chris Lundy
I like to use Linux and Ubuntu, but I am not an expert. I have just enough knowledge to be dangerous. I test things until they break.
Updated on September 18, 2022Comments
-
Chris Lundy over 1 year
I had been sharing my network connection through my computer (previously windows 10) with two other computers using usb-ethernet adaptors, and I can't get it to work now that my host computer is running Ubuntu 18.04.
The three wired connections appear in network settings as expected, but I don't know how to configure them to share internet and network.
Tutorials on the internet show a different network settings UI, with IPv4 Settings tab Method: "Shared to other computers". I don't have the option "Shared to other computers" and "Link-Local Only" does not seem to work.
How can I share one wired connection with two others?
-
tallowhawk over 5 yearsTo anyone who comes here and is still lost there's a good tutorial here that explains the process.
-
-
Chris Lundy almost 6 yearsThank you! That was what I needed, now it works perfectly.
-
nazikus over 4 yearshow do you do this from terminal, without gui ?
-
Admin almost 2 yearsIf you see
Unable to init server: Could not connect: Connection refused
check if you're in something like tmux and missing$DISPLAY
.