.. _gateway-m-cellular: Share Cellular Connection via Ethernet ======================================= This guide explains how to share a cellular connection via Ethernet on the **Edge IoT Gateway M**. Configure NetworkManager Firewall Backend ----------------------------------------- Configure NetworkManager to use ``iptables`` as the firewall backend: .. code-block:: bash sudo install -d /etc/NetworkManager/conf.d sudo tee /etc/NetworkManager/conf.d/99-firewall-backend.conf > /dev/null <<'EOF' [main] firewall-backend=iptables EOF Reboot the Gateway ------------------ Reboot the Gateway to apply the changes: .. code-block:: bash sudo reboot Identify the Ethernet Interface ------------------------------- Edge IoT Gateway M has two Ethernet interfaces. Check which interface is connected to the device that should receive the shared Internet connection: .. code-block:: bash nmcli device status The Ethernet interfaces are typically listed as ``eth0`` and ``eth1``. The examples below use ``eth0``. If you want to use ``eth1``, replace ``eth0`` with ``eth1`` in the commands below. Configure Cellular and Ethernet Connections ------------------------------------------- .. important:: If you are connected to the Gateway over Ethernet, run all four commands below together. Enabling the shared Ethernet connection may interrupt your current connection to the Gateway. Run the following commands: .. code-block:: bash sudo nmcli connection add type gsm ifname cdc-wdm0 con-name cellular apn internet sudo nmcli connection up cellular sudo nmcli connection add type ethernet ifname eth0 con-name shared ipv4.method shared ipv4.addresses 10.42.0.1/24 sudo nmcli connection up shared Verify the Configuration ------------------------ Check active NetworkManager connections: .. code-block:: bash nmcli connection show --active Both the cellular and shared Ethernet connections should be active. Check the IP address assigned to the Ethernet interface: .. code-block:: bash ip addr show eth0 The interface should use the following address: .. code-block:: text 10.42.0.1/24 Connect another device to the selected Ethernet port. The connected device should automatically receive an IP address from the ``10.42.0.0/24`` network and use the Gateway's cellular connection to access the Internet.