Hi everyone!

I’m looking into self-hosting, and I currently have dynamic DNS set up to point to my home IP.

My question: is it worth getting a dedicated IP through a VPN?

I’m pretty technically savvy, but when it comes to networking I lack practical experience. My thought is that pointing my domain to a dedicated IP and routing that traffic to my home IP would be safer - especially if I only allow traffic on certain ports from that IP. Just curious if that idea holds up in practice, or if it’s not worth the effort.

  • youmaynotknow@lemmy.ml
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    5 months ago

    A fixed IP does make things easier at first, but I fail to see the value on that for personal use. Nothing a reverse proxy and DDNS can’t replace.

    I purchased a domain, use dynamic DNS for it, and point my sub domains to an NGINX proxy server that handles where each points to.

    Nothing has access to anything in my network from the internet (all ports are closed on my PFSense), other than Wireguard, and I just VPN into my network when I’m not home.

    It was scary when I started, but figured it out in a couple of days. Take into consideration that I’m not even mildly smart, so it should be fairly easy for anyone.

    Get into forums, ask around, watch tutorials, you’ll be up and running in no time.

    Good luck.

    • kakes@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      Thanks for the reply!

      So the NGINX server hosted outside your network, then? And then reverse-proxy that into your home server?

      Honestly, I feel like NGINX is a bit overkill for my situation, since I’m not expecting to have a lot of traffic. I could be wrong, though.

        • kakes@sh.itjust.worksOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 months ago

          Ahh okay, thanks for the clarification. Honestly I should use NGINX just for the sake of learning it, if nothing else.

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        5 months ago

        Nginx isn’t for security it’s to allow hostname-based proxying so that your single IP address can serve multiple backend services.

        • kakes@sh.itjust.worksOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 months ago

          Thanks, I’m only very vaguely familiar with NGINX, so I appreciate the clarification.

          • atzanteol@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            5 months ago

            To provide a bit more detail then - you would setup your proxy with DNS entries “foo.example.com” as well as “bar.example.com” and whatever other sub-domains you want pointing to it. So your single IP address has multiple domain names.

            Then your web browser connects to the proxy and makes a request to that server that looks like this:

            GET / HTTP/1.1
            Host: foo.example.com
            

            nginx (or apache, or other reverse proxies) will then know that the request is specifically for “foo.example.com” even though they all point to the same computer. It then forwards the request to whatever you want on your own network and acts as a go-between between the browser and your service. This is often called something like host-based routing or virtual-hosts.

            In this scenario the proxy is also the SSL endpoint and would be configured with HTTPS and a certificate that verifies that it is the source for foo.example.com, bar.example.com, etc.

      • youmaynotknow@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        5 months ago

        No, it’s inside the network. Once I’m inside my network via the VPN, the proxy server routes to the service I want based on the subdomain instead of using the IP and port as the address.

        This can also be useful if, instead of going the VPN route, and you choose to go the CDN tunnel (for example, Cloudflare) way. I actually started with a tunnel via Cloudflare, but after some digging, I don’t trust them anymore. Having a tunnel allows you to close all ports coming into your network, but at the expense of having to trust the tunnel provider, and I don’t trust many companies out there.