I’m currently using UbuntuCore16 on a Dell Gateway 5000 (it would be works for 3000/3001 as well).
I want to share the Internet that I receive from a SIM card over the Ethernet port, in order to connect other device to the Internet (a laptop at least).
I’ve tried with the nmcli, but I couldn’t do it yet. I tried instructions from here, but it is a little different because is for Ubuntu Desktop.
Sharing a connection is a capability that has been added to the network-manager snap very recently and it is not yet in the stable channels. You will need NM 1.10 from the edge channel to test it. To install that version:
nmcli c add type gsm ifname '*' con-name <cellular_con_name> apn <operator_APN>
Finally, if you are sharing through your ethernet, you need to create a shared connection for it. NM takes care of starting a DHCP server for you and configure iptables appropriately:
nmcli c add con-name <shared_con_name> type ethernet ifname '*' ipv4.method shared ipv6.method ignore
nmcli c <shared_con_name> up