meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howto:networking [2021/03/26 20:21]
bubuz
howto:networking [2021/05/03 14:53] (current)
spaetz
Line 1: Line 1:
-~~ METATOC 2-5 ~~+~~NOTOC~~{{METATOC 2-5}}
 ====== Networking HowTos ====== ====== Networking HowTos ======
 +
 +===== Using Mobile Data =====
 +
 +If your correct provider settings do not show up in Settings >> Mobile >> Mobile Data >> Access Points, you can add a new one with the [+] button.
 +Add a network name and your APN, e.g. Name: //3 internet// ​ APN: //​three.co.uk//​. The correct settings depend on your provider. If mobile data does not work, make sure that the "​mobile data" toggle is turned on (this happens more often than you would think).
  
 ===== Connecting to the Mobian device ===== ===== Connecting to the Mobian device =====
 +
 +==== Connect to a running SSH server ====
  
 This section explains how to connect to your Mobian device using a ssh server that you have installed on it. You should [[howto:​security#​using-ssh-with-a-key-instead-of-password|protect]] your ssh server to not allow logins via the numeric password if you want to remain safe.  This section explains how to connect to your Mobian device using a ssh server that you have installed on it. You should [[howto:​security#​using-ssh-with-a-key-instead-of-password|protect]] your ssh server to not allow logins via the numeric password if you want to remain safe. 
  
-=== Connect ​via Wifi and SSH ===+=== via Wifi ====
  
-If you pinephone is connected to your local Wifi and you have an SSH server running, try to access it with `ssh mobian@mobian`. If that does not work out (e.g. because your network assigned the device a different hostname, you will need to find out the hostname/IP address to connect to.+If your pinephone is connected to your local Wifi and you have an SSH server running, try to access it with `ssh mobian@mobian`. If that does not work out (e.g. because your network assigned the device a different hostname, you will need to find out the hostname/IP address to connect to.
  
-=== Connect ​via USB-C and SSH ===+=== via USB-C cable connected to another computer ​===
  
 It's possible to connect to Mobian with a similar end result as using ''​adb shell''​ with an Android device, but using the USB-C connection and SSH instead. When connecting a Mobian device to a Linux computer via the USB-C connection, a network interface is made available to the computer, and utilizing udev and NetworkManager an IP address is assigned to both. This allows connecting to Mobian via a hardwired SSH session, instead of having to rely on wifi (which may not be 100% reliable). These instructions are written with the PinePhone as the sample device, and Linux Mint as the host computer OS, but should work for other devices/​OSes as well. It's possible to connect to Mobian with a similar end result as using ''​adb shell''​ with an Android device, but using the USB-C connection and SSH instead. When connecting a Mobian device to a Linux computer via the USB-C connection, a network interface is made available to the computer, and utilizing udev and NetworkManager an IP address is assigned to both. This allows connecting to Mobian via a hardwired SSH session, instead of having to rely on wifi (which may not be 100% reliable). These instructions are written with the PinePhone as the sample device, and Linux Mint as the host computer OS, but should work for other devices/​OSes as well.
Line 46: Line 53:
 192.168.0.0/​24 dev wlan0 proto kernel scope link src 192.168.0.101 metric 25</​code>​ 192.168.0.0/​24 dev wlan0 proto kernel scope link src 192.168.0.101 metric 25</​code>​
  
 +===== Connection sharing/​Tethering =====
  
-==== Configure Mobile Data ====+It is possible to share your phone'​s mobile data with another device. Either create a wifi hotspot that others connect to, or use a USB cable to forward data.
  
-If your correct provider settings do not show up in Settings >> Mobile >> Mobile Data >> Access Points, you can add a new one with the [+] button. +==== Sharing mobile data through wifi hotspot ====
-Add a network name and your APN, e.g. Name: //3 internet// ​ APN: //​three.co.uk//​. The correct settings depend on your provider.+
  
-===== Connection sharing/Tethering =====+Visit the settings -> Wifi. The "3 dot" menu will offer a "​Create WiFi Hotspot..."​ entry, which is all that you should need to create a hotspot. Unfortunately in gnome-control-center 3.36, there is still [[https://​gitlab.gnome.org/​GNOME/​gnome-control-center/​-/​issues/​965|a bug]] which requires you to go back to the bluetooth page (just enter it and leave it immediately again) and back to the Wifi section until it becomes enabled. 
 +   
 +Stop the hotspot from the Wifi page in the settings app. 
 +{{:​hotspot_screen.png?​direct&​300|}}
  
-=== Sharing mobile data through wifi hotspot === +== Hotspot: The geeky way == 
- +The geeky way to use the terminal to create ​new hotspot ​connection ​with SSID `Pinephone` and Password `HotspotPassword` ​is:
-Run and create new hotspot ​connections ​with SSID `Pinephone` and Password `HotspotPassword`:​+
   ​   ​
   sudo nmcli device wifi hotspot ifname wlan0 con-name Hotspot ssid Pinephone ​ password HotspotPassword   sudo nmcli device wifi hotspot ifname wlan0 con-name Hotspot ssid Pinephone ​ password HotspotPassword
-  ​ 
-Stop the hotspot from NetworkManager. To restart your hotspot you can use the 3 dots menu "​Connect to hidden network"​ 
- 
-{{:​hotspot2.png?​direct&​200|}} {{:​hotspot3.png?​direct&​200|}} {{:​hotspot4.png?​direct&​200|}} {{:​hotspot1.png?​direct&​200|}} 
  
  
-=== Sharing internet from your PC via USB ===+==== Sharing internet from your PC via USB ====
  
 Set up ip-forwarding on your PC and configure your USB ethernet device'​s IP: Set up ip-forwarding on your PC and configure your USB ethernet device'​s IP:
Line 125: Line 130:
 2/ using systemd, activate the interface using 2/ using systemd, activate the interface using
 <​code>​ <​code>​
-sudo systemctl enable ​wireguard@wg0+sudo systemctl enable ​wg-quick@wg0
 </​code>​ </​code>​