0

My goal is to have wired internet on different devices using the tethering from a smartphone. My idea is that a raspberry pi receives internet over USB tethering of a smartphone, and acts than as a router for the Intranet, providing internet over a switch to different devices. Is this achievable, and if yes, how?

1 Answers1

1

When using USB tethering with your smartphone you should get a network interface when connected. Check with ip -br addr. I don't know what its name is on your installation but with the Raspberry Pi OS it is mostly named usb0. Now you have two interfaces: eth0 connected to your switch and usb0 (or however it is named) as uplink to your smartphone.

You can just enable ip forwarding between interfaces and set a NAT (network address translation) to have a simple working router. Use a Raspberry Pi as router for a tethered internet connection. In that example just replace the modem and its interface with your smartphone. From the networking view it is just the same.

Ingo
  • 42,961
  • 20
  • 87
  • 207