Hi all,

I would like to use a linux phone with Ubuntu Touch or PostmarketOS to make a sort of mobile modem which, when my laptop connects to the phone's hotspot, would have Pihole for DNS and a VPN. Is this possible, and which general steps would you recommend to go about it? I have installed PostmarketOS on a Poco F1 and connected to my VPN using openvpn in the terminal, but then when I open a browser on the same phone and check my ip address it shows the address of the wifi I'm connected to, not the VPN. So it seems I have no idea about the architecture of this endeavor.

I hope to have this working by Christmas when I go to visit my parents. The intended internet connection would be

home wifi ---> linux phone [some level of privacy]---> my laptop wifi

Thank you in advance!

all 12 comments

sorted by: hot top controversial new old
[–] 4 points 2 weeks ago

This is possible but complete overkill.

Travel router as recommended is the quicker solution.

You can also do this with Android (GrapheneOS for example) out of the box.

  • source
  • [–] 4 points 2 weeks ago (5 children)

    Sounds like a travel router with extra steps.

    https://a.co/d/0aSGVqpZ

    Here is one for $40. Save you all the headache. Just plug in your VPN info and gg.

  • source
  • hideshow 5 child comments
  • [–] 1 point 2 weeks ago (2 children)

    I'm not sure if this works for OP's usecase. This one doesn't seem come with the ability to connect to cellular networks.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 2 weeks ago (4 children)

    I think this project requires for your device's wifi card(s) to be simultaneously serving as a wifi hotspot (technical term is Access Point), and be connected to a wifi. Not every device supports this, and I doubt phones do, but you have to check.

  • source
  • hideshow 4 child comments
  • [–] 1 point 2 weeks ago (2 children)

    Using it in tethering mode over a USB cable might be a better option, I use it all the time instead of a wifi hotspot

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 2 points 1 week ago (1 child)

    This is a great idea, I'll give it a try. I have never tethered an internet connection via USB... is it easy? I'm using debian.

  • source
  • parent
  • hideshow 1 child comment
  • It's very easy, consuming USB tethering support is built into all Linux distros.

    You just enable it (on the Android phone), plug it in, and then your computer will detect it as an ethernet connection.

    https://wiki.archlinux.org/title/Android_tethering

    Android is easy and requires no config on Debian's side. Iphone's require some support, although I think many distros preinstall the needed tools: https://wiki.archlinux.org/title/IPhone_tethering

    USB tethering from Linux (or a Linux phone) should be possible as well, via NetworkManager: https://fedoramagazine.org/internet-connection-sharing-networkmanager/

  • source
  • parent