Sharing WiFi Connection over Ethernet Ubuntu 18.04

I found my Raspberry Pi in a drawer, and decided to get back into developing small IoT applications for it. Most of what I wanted to do required access to the internet, and my USB WiFi adapter is super trash.

The good news is that Pi's have an RJ45/Ethernet port, the (sorta) bad news is that my house is WiFi only.

To address this, I went wanted to share my Ubuntu 18 desktop's WiFi connection over Ethernet - however, some of the software you need is no longer readily available, as it is superseded by the new settings app in Ubuntu 18.

What you're after is available through the terminal, with:

nm-connection-editor

When it opens, select the wired connection item, clicking the edit button (the cog). In that menu, switch to the IPv4 tab, and select the method: 'shared to other computers'.

Screenshot of the connection editor with settings opened.

After that, save everything and connect your cable if you haven't already, and DHCP should kick-in and set everything up for you!

You could even connect a switch or hub and share the connection further, if you wanted.

Note that if you need to get the IP address of the connection, you can use ifconfig. You'll only need this if DHCP doesn't automatically configure everything.

1 comment:

Featured

Debounce API Requests in a JS Class

I have a react application that needs to access an API endpoint on the client side - which is hit when a user clicks on a button, as well as...

Popular