Internet Connection Sharing: Difference between revisions

No edit summary
Raboof (talk | contribs)
Share via ethernet: sharing with NetworkManager: very easy, as long as you update the firewall accordingly
 
Line 32: Line 32:
== Share via ethernet ==
== Share via ethernet ==


=== Usage ===
=== Method 1: NetworkManager ===
In NetworkManager, you can share an existing internet connection of a wireless interface <code>wlan0</code> to clients connected on a ethernet device <code>eth0</code> by setting the connection type of the <code>eth0</code> interface to 'Shared'. This will start a dnsmasq DHCP server. You'll have to expose ports 53 and 67 in <code>networking.firewall.allowedUDPPorts</code>, and then you can connect using regular DHCP from the device connected via the cable in <code>eth0</code>.
 
=== Method 2: manual setup ===


Share an existing internet connection of a wireless interface <code>wlan0</code> to clients connected on a ethernet device <code>eth0</code>. Make sure you've got TCP and UDP port <code>53</code> for the dnsmasq DHCP server opened in your [[Firewall]].
Share an existing internet connection of a wireless interface <code>wlan0</code> to clients connected on a ethernet device <code>eth0</code>. Make sure you've got TCP and UDP port <code>53</code> for the dnsmasq DHCP server opened in your [[Firewall]].
Line 61: Line 64:
</syntaxhighlight>
</syntaxhighlight>


=== Configuration ===
=== Method 3: declarative setup ===


Persistently share an existing internet connection on interface <code>wlan0</code> to clients connected on an ethernet interface <code>eth0</code>. Tested where <code>wlan0</code> is a wireless interface, but it should work with a different ethernet interface as well. You do not need to manually open port 53.
Persistently share an existing internet connection on interface <code>wlan0</code> to clients connected on an ethernet interface <code>eth0</code>. Tested where <code>wlan0</code> is a wireless interface, but it should work with a different ethernet interface as well. You do not need to manually open port 53.