Newer version of the Raspberry Pi OS ship with NetworkManager instead of dhcpd running. I've seen lots of guides on how to do this with things like dnsmasq. But in all these guides, it's assuming dhcpd is running.

What I want is to share my wifi connection via my ethernet port. Clients will connect to the ethernet port and connect to the internet through the rpi's wifi.

1 Answer 1


The following worked for me:

sudo nmcli c add con-name custom-shared-con type ethernet ifname eth0 ipv4.method shared ipv6.method ignore

sudo nmcli c up custom-shared-con

This creates a DHCP server and sets up packet forwarding. I got the idea from here: https://ubuntu.com/core/docs/networkmanager/configure-shared-connections

It's so easy! There's nothing to install.

  • Answered your own question - Good for you! You should "accept" this as the answer (may have to wait a day or two) so others will know that. it worked.
    – Seamus
    Commented Oct 31, 2023 at 11:53
  • Worked for me - I just had to replace eth0 with end0
    – Melllvar
    Commented Mar 3 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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