Hey there,

I am using a Xiaomi 5G Router with an unlimited data plan of my local carrier as my local network router, because 5G is simply faster and cheaper than a cable connection in my flat. The Problem is: When using the mobile network of my carrier, you don’t get an own public IP-Address (wether IPv4, nor IPv4), because the carrier uses CGNAT. That means I cannot open ports to the wide web locally on my router, because it would not be accessible from the outside.

Now to my case, which I need help on. I am running a Plex Media Server on my Homeserver (running Ubuntu Server) and I want to open this server to the wide web to make it accessable to my friends and family (which uncomfortably do not live in the same building as me). There is my idea: I also have a VPS, which runs Debian Bookwork, which has a public IPv4. I want to make a WireGuard VPN connection to that VPS from my local machine. The VPS just makes the port forwarding to my local server through the wireguard tunnel. (Similiar to how Mullvad’s Port Forwarding worked like).

However, I always tried to avoid the topic of networks, so I need help. And I am very thankful for any help :)

Addition: Tailscale is not an option. I already tried everything that I can use it for, but it does not work for my case.

Addition 2: I am not posting this on r/plex, because I already tried searching for help there, but I have not succeded from the suggestions there.

EDIT: My general problem is: I do not want to use a reverse proxy, becase in my testings, Plex does not detect it and when using TV Apps it is reeeally slow. So rather I want to use a VPN connection, so that Plex already knows its own IP-Address (which is the IP of the VPS, in cause of the VPN) and plex.tv can route the traffic directly through this tunnel over the VPS.

  • astutesnoot@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Since you mentioned Mullvad, you should know that AirVpn still supports port forwarding and they’re running their Halloween sale right now. However, if all you’re looking to do is make your selfhosted web services available on the Internet with SSL, then Cloudflare Tunnels can do this for free.

    • damaddi@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      But cloudflare tunnels are somehow restricted, I heard. People got banned, when using something like plex with it.

  • tgp1994@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I had a similar setup; Wireguard connecting a VPS to my home network. I use Jellyfin, but I setup an nginx proxy manager on the VPS to handle external requests and forward them to my private server. All that matters is you open the appropriate ports on your VPS to the NPM instance.

  • sv-giampa@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Quick aswer: install Nginx Proxy Manager (NPM) and open tcp/udp streams to wherever you want.

    Note that with this configuration you are not reverse proxying it, you are just forwarding stream ports, in a similar way in which your home router operates for portforwarding.

    I had the same problem. Firstly, I gone with iptables configuration, that are useful, but they need much command-line, have not a web UI, need to be statically configured in wireguard with a MASQUERADE option, and need to be persistend with some tool (iptables-persistent). So to open new tunnels/streams you need shutdown wireguard, reconfigure and restart it each time. Someone can say that iptables could be more performant than NPM, but there is no proof of that. I see same performances, but much more usability and manageability with NPM.

  • Adam_Meshnet@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Unless I don’t understand something, reverse proxies only handle the routing and address connections coming in based on used domains, no? Why, in that case, would they be slow?

    Prior to using Meshnet, I set up a couple of self-hosted services with dynamic DNSes and reverse proxies.

    General idea is, that:

    1. You set up a dynamic DNS (I used duckdns), by setting up a cron job that pings the dynamic DNS every now and then, so that it knows what’s your current IP.
    2. You set up port forwarding (ports 80 and 443) for your home lab
    3. You set up a Nginx in a docker container with ports 80 and 443
    4. You set up your dynamic DNS domains to be forwarded to specific ports on your homelab server.

    I can easily download files from my server at the upload speeds my ISP rates my network at (20 MB/s).