Initial situation, context

For a number of Ubuntu releases, connection sharing was made easy.

  • With Ubuntu 16.04, my wi-fi connected laptop can easily share its connection to a local LAN (with a cable or a switch and a number of local Ethernet-connected clients).
  • A similar situation is connecting the laptop using an Ethernet cable and sharing via creating a wifi hotspot, see an equivalent bug for that situation in Wired connection sharing in Kubuntu 17.04 .

Both situations worked well with Ubuntu 16.04 and older, also with Xubuntu and probably other variants.

On those releases, it used to be offered like this:

Older releases

On Ubuntu 17.04 it failed with a cryptic error message which is off-topic here. As a result I sticked to Ubuntu 16.04.

How situation evolved

On Ubuntu 17.10 (today's daily) connection sharing is not even offered. See image below.

"Automatic", "manual", "link-local" options shown below were offered previously, though not visible in screenshot above because it was a drop-down box.

Connection parameters do not offer sharing

Question

Which summary below corresponds to reality?

  1. Ubuntu 17.10 still offer a simple way to share connection. Then how? I reasonably searched parameter settings, found nothing relevant.
  2. It is necessary to do it manually, via manual NetworkManager tweaking.
  3. It is necessary to do it manually, by telling NetworkManager to not manage the interface used for sharing and directly fiddling with iptables ?

Example of case 2 and 3 are explained (on older releases) on https://askubuntu.com/a/693769/68124 . Notice that installing dnsmasq-base is no longer needed because the missing dependency was added, see Bug #1678606 “[packaging] Missing dnsmasq-base dependency causes...” : Bugs : network-manager package : Ubuntu. Incidentally, it means that connection sharing is not clearly an abandoned feature.


Solution 1:

That setting is available in nm-connection-editor (just run this cmd in terminal).

Solution 2:

I was able to work around this by using the command line to add a new connection profile with ipv4.method set to shared. For example:

$ nmcli connection add ifname enp0s25 con-name StewNAT type ethernet ipv4.method shared ipv6.method shared