Wi-Fi Tethering¶
It may be beneficial to use the gateway as a router for tethering and sharing a cellular or wired internet connection over Wi-Fi. Setting up the gateway to act as a hotspot can be done in a few simple steps.
Prerequisites¶
The gateway must already be configured with a working cellular or wired internet connection. Additionally, ensure that your gateway’s system configuration supports Wi-Fi. Some variants of the gateway do not come pre-installed with a Wi-Fi chipset. In devices with more than one Wi-Fi interface, the desired one should be chosen for sharing; in this example, this interface shall be wlan0
.
Steps¶
Delete any existing connections defined in
NetworkManager
that relate to the Wi-Fi (wlan0
) interface. In some cases, NetworkManager may ship with an automatic connection named Wireless Connection 1 or similar. To check existing connections related towlan0
, usenmcli con show | grep wlan0
. Then, delete any existing connections usingnmcli con delete "Wireless Connection 1"
. Note that if the name contains a space, it must be enclosed in double-quotes.Set up a new connection for tethering (replace my_hotspot with the desired name (SSID) for your wireless hotspot and wifitether with any desired connection name):
$ nmcli con add type wifi ifname wlan0 con-name wifitether ssid my_hotspot
Set the wireless mode correctly for your connection:
$ nmcli con modify wifitether 802-11-wireless.mode ap ipv4.method shared
Set the desired authentication mode:
$ nmcli con modify wifitether wifi-sec.key-mgmt wpa-psk
Set a password for the new hotspot (replace my_secure_password with the desired password for your wireless hotspot):
$ nmcli con modify wifitether wifi-sec.psk my_secure_password
Bring up the connection:
$ nmcli con up wifitether
Connect to the newly created Wi-Fi network from a compatible device. The gateway will automatically set up the required firewall, IP routing, DHCP, etc., for tethering to work seamlessly.