Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB

  1. Home
  2. Selfhosted
  3. Best way to get IPv4 connectivity to my self-hosted services

Best way to get IPv4 connectivity to my self-hosted services

Scheduled Pinned Locked Moved Selfhosted
selfhosted
34 Posts 23 Posters 1 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • death916@lemmy.death916.xyzD [email protected]

    Tailscale is amazing. When i first started self hosting i tried a bunch of things to avoid a companies solution but tailscale just works perfectly and form what they say in interviews they dont intend to change the free tiers. Its also open source and there's headscale so eventually you could not rely on the company at all.

    J This user is from outside of this forum
    J This user is from outside of this forum
    [email protected]
    wrote last edited by
    #22

    I switched from Tailscale to headscale, and I still would suggest Tailscale to anyone. It’s just really done well and they seem to actually love that self-hosters and hobbyists use their stuff.

    1 Reply Last reply
    5
    • Q [email protected]

      Hi, I live in Germany and only have public IPv6. My address changes only very, very rarely and has never changed in the time I've been self-hosting.

      I also have a very small, pretty cheap VPS with static IPv4/IPv6 – which would seem like a great fit for some sort of tunneling/proxy setup. Now comes the question: What/how should I use it?
      I would like to not have the additional latency for IPv6 enabled hosts, can I just setup a reverse proxy for IPv4? Would Tailscale work for my usecase, what are some resources you found useful when using it?

      Currently, I'm just hosting everything IPv6-only and hoping my address never changes, but that does not work for everyone, as especially many new buildings with fiber optic connections still only have IPv4 (strangely).

      tfowinder@lemmy.mlT This user is from outside of this forum
      tfowinder@lemmy.mlT This user is from outside of this forum
      [email protected]
      wrote last edited by
      #23

      I have a VPS hosted on Digital ocean with Nginx running as proxy, I use openvpn to connect to the VPS and access all my services over the VPS ip address.

      I own a domain and forward all the requests from my domain to the Home server IP from my VPS, very useful because I can use different subdomains for different services all on port 80 or 443 even though the service is running on random port.

      1 Reply Last reply
      1
      • H [email protected]

        It's merely a tcp proxy. It doesn't even have to be http since it has no idea. The trick with tls is that it can extract the requested host name via SNI.

        2xsaiko@discuss.tchncs.de2 This user is from outside of this forum
        2xsaiko@discuss.tchncs.de2 This user is from outside of this forum
        [email protected]
        wrote last edited by
        #24

        Hm, okay, that does sound like the real client IP will get lost and every connection will appear to come from the proxy then. It would be good if that were passed somehow. My current setup adds the X-Forwarded-For header for example.

        H 1 Reply Last reply
        0
        • 2xsaiko@discuss.tchncs.de2 [email protected]

          Hm, okay, that does sound like the real client IP will get lost and every connection will appear to come from the proxy then. It would be good if that were passed somehow. My current setup adds the X-Forwarded-For header for example.

          H This user is from outside of this forum
          H This user is from outside of this forum
          [email protected]
          wrote last edited by [email protected]
          #25

          That is correct. There is a trick where you can set the source ip to the ipv6 mapped ipv4 ip it originally came from. I have implemented that in a transparent tcp proxy I worked on some years ago, but I am not sure if nginx supports that.

          I should look into that actually. It would be useful to me as well.

          Edit: actually that only works if you are in the routing path. However a nat64 solution would work as well, where you map a /64 back to the proxy.

          1 Reply Last reply
          0
          • shimitar@downonthestreet.euS [email protected]

            Wire guard to the vps with nftables port forwarding.

            Check my wiki here https://wiki.gardiol.org/doku.php?id=networking%3Awireguard_redirects

            Or setup ssh with port forwarding as well. Less reliable but nothing to install on a basic Linux.

            D This user is from outside of this forum
            D This user is from outside of this forum
            [email protected]
            wrote last edited by
            #26

            I do this already, but I'm going compare my nftables rules when i get home. You're ip table looks more elegant.

            1 Reply Last reply
            0
            • Q [email protected]

              Hi, I live in Germany and only have public IPv6. My address changes only very, very rarely and has never changed in the time I've been self-hosting.

              I also have a very small, pretty cheap VPS with static IPv4/IPv6 – which would seem like a great fit for some sort of tunneling/proxy setup. Now comes the question: What/how should I use it?
              I would like to not have the additional latency for IPv6 enabled hosts, can I just setup a reverse proxy for IPv4? Would Tailscale work for my usecase, what are some resources you found useful when using it?

              Currently, I'm just hosting everything IPv6-only and hoping my address never changes, but that does not work for everyone, as especially many new buildings with fiber optic connections still only have IPv4 (strangely).

              Y This user is from outside of this forum
              Y This user is from outside of this forum
              [email protected]
              wrote last edited by
              #27

              simplest that comes to mind is a reverse ssh tunnel and a reverse proxy on the vps maybe

              1 Reply Last reply
              0
              • Q [email protected]

                Hi, I live in Germany and only have public IPv6. My address changes only very, very rarely and has never changed in the time I've been self-hosting.

                I also have a very small, pretty cheap VPS with static IPv4/IPv6 – which would seem like a great fit for some sort of tunneling/proxy setup. Now comes the question: What/how should I use it?
                I would like to not have the additional latency for IPv6 enabled hosts, can I just setup a reverse proxy for IPv4? Would Tailscale work for my usecase, what are some resources you found useful when using it?

                Currently, I'm just hosting everything IPv6-only and hoping my address never changes, but that does not work for everyone, as especially many new buildings with fiber optic connections still only have IPv4 (strangely).

                R This user is from outside of this forum
                R This user is from outside of this forum
                [email protected]
                wrote last edited by
                #28

                Ionos.de has a €1 a month VPS

                I think 1 core, 1gb ram, and 10gb.

                Use either caddy or Nginx proxy manager. Both are easy to setup. Also both are dockerized.

                I use Tailscale as my tunnel.

                Total latency is about 70-90ms for me.

                1 Reply Last reply
                5
                • T [email protected]

                  Small and stupid question.

                  Why don't use a ddns client to update your ipv6 evytime it changes? With a ttl of a minute your shouldn't be able to see any downtime...

                  I (genuinely) thinks you are trying to solve a small problem in the complicated and hard way.. M

                  K This user is from outside of this forum
                  K This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #29

                  Plenty of IPv4 only networks still exist from which you would not be able to access the services. I am in a similar situation as OP with my offsite address being IPv6 + CGNAT IPv4 and my own address being IPv4 only.

                  T 1 Reply Last reply
                  0
                  • H [email protected]

                    I'd just set up the reverse proxy on the VPS and make it forward everything via IPv6. But you could also use a tunnel/VPN, everything from Tailscale to Wireguard or even an SSH tunnel would work. And there are dedicated services like Cloudflare, nohost, neutrinet, pagekite...

                    R This user is from outside of this forum
                    R This user is from outside of this forum
                    [email protected]
                    wrote last edited by [email protected]
                    #30

                    I'll add Pangolin to the list, it's a self-hosted Cloudflare tunnel alternative.

                    1 Reply Last reply
                    3
                    • 2xsaiko@discuss.tchncs.de2 [email protected]

                      If someone manages to get root (!) access on this VPS it's over either way.

                      R This user is from outside of this forum
                      R This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #31

                      NO, an attacker getting control over a vps used as a tunnel could not read Data captured in the past.
                      Also they could not do a MITM with decrypted SSL without breaking HSTS

                      1 Reply Last reply
                      0
                      • K [email protected]

                        Plenty of IPv4 only networks still exist from which you would not be able to access the services. I am in a similar situation as OP with my offsite address being IPv6 + CGNAT IPv4 and my own address being IPv4 only.

                        T This user is from outside of this forum
                        T This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #32

                        Plenty of ipv4 only in 2025?? Really?? Without a possibility to activate dual stack or just the dslite-crap?

                        I honestly didn't think this could be a real issue in those years.

                        K 1 Reply Last reply
                        0
                        • T [email protected]

                          Plenty of ipv4 only in 2025?? Really?? Without a possibility to activate dual stack or just the dslite-crap?

                          I honestly didn't think this could be a real issue in those years.

                          K This user is from outside of this forum
                          K This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #33

                          Yup, sorry to be the bearer of bad news🥲

                          1 Reply Last reply
                          0
                          • Q [email protected]

                            Hi, I live in Germany and only have public IPv6. My address changes only very, very rarely and has never changed in the time I've been self-hosting.

                            I also have a very small, pretty cheap VPS with static IPv4/IPv6 – which would seem like a great fit for some sort of tunneling/proxy setup. Now comes the question: What/how should I use it?
                            I would like to not have the additional latency for IPv6 enabled hosts, can I just setup a reverse proxy for IPv4? Would Tailscale work for my usecase, what are some resources you found useful when using it?

                            Currently, I'm just hosting everything IPv6-only and hoping my address never changes, but that does not work for everyone, as especially many new buildings with fiber optic connections still only have IPv4 (strangely).

                            S This user is from outside of this forum
                            S This user is from outside of this forum
                            [email protected]
                            wrote last edited by
                            #34

                            I have a similar situation, where I only get a public IPv6 prefix. I ended up renting small vps at netcup and installed OpenVPN and ha-proxy. My home router connects to the VPS's public IP and I do port forwarding for the services I need, or use the proxy.

                            Initially I setup SNAT for my web server (otherwise replies were going out the wrong interface) and that meant you don't see the public IP of the connecting client in your access logs.

                            Recently I switched to using ha-proxy which does tcp level proxying and works well with ports 80 and 443 and Traefik, which i use to expose my docker containers.

                            My connection chain looke like vps -> ha-proxy -> OpenVPN -> port forward to Traefik -> reverse proxy to the final service. It's not a fast server, and I didn't measure latency, but it's for sure not small.

                            As others have mentioned, ha-proxying to your IPv6 might be an interesting solution, and I think I will also try it out.

                            1 Reply Last reply
                            1
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Login or register to search.
                            Powered by NodeBB Contributors
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups