5G modem tunnel to broadband wifi internet

So me and my buddy are trying to get this straight about something. I understand a little about networking and was told that OpenWRT could do the job. I plan on buying a GL.iNet GL-AR750S travel router to use with my 5G modem.

The question is: is there a way to bridge my 5G modem with my buddies wifi network in OpenWRT? Were trying to see if one can remote in through the 5G modem and go out with my buddies wifi internet connection. All with a travel router.

I understand that 5G has cgNAT and wont allow a direct connection to the travel router with 5g modem. But I was told that I can reverse shell off the 5G modem and then pipe all traffic through my buddies wifi internet. Is this possible?

In general, this is not how the internet works -- you cannot go "in" with one connection and have "out" with another. There are probably some ways to do this, but it is complicated and far from normal... it will probably also not be reliable.

What is the actual end goal? Why ae you trying to setup this strange topology?

The end goal is too see if we can route packets any way we please.

It's not really that simple to do... especially if you don't have two public IP addresses. IP really isn't made to do asymmetric routing with respect to actual source/destination addresses. Specifically, if you request a resource, your IP packets have a source address of your system. The host on the other end will use that source address to send the responses... in other words, the remote system sends data with the destination address = your original source address (data and ack packets). You'd have to find a way to tell the server to send reply packets to a different address, and that is not a normal operating mode for IP.

I've thought about ways to create mostly uni-directional connections on a local network with VLANs (as a purely intellectual exercise), but ultimately they would terminate at the same gateway so the internet connectivity would function normally.

1 Like

I think you're thinking of a VPN-- where everything you do at your location is tunneled to your friend's house so you can:

  • access services such as fileshares and printers on his LAN.
  • make all of your Internet usage appear to originate from his IP address.

In that case he would be running the "server" side of the VPN, and if his Internet service allows incoming connections, it is straightforward for you to originate a "client" connection from any network including 5G which uses CGNAT.

If there is CGNAT on both ends it is still possible, but you have to involve a third party such as Zerotier or Tailscale, or run your own middleman server on a location that has a public IP address such as a VPS machine.

Oh Ok. So essentially I need to run a VPN server on my friends network? Does he need to open ports on his router as well?

Yes he needs to have one port open to the Internet for the incoming encrypted data from you.

I actually figured out how to do this with tailscale. No need for VPNing. Now im wondering if it's possible to have two WAN ports on a travel router with OpenWRT?

You can, the hard part is to make them work simultaneously.

1 Like