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.
  • 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).

    shimitar@downonthestreet.euS This user is from outside of this forum
    shimitar@downonthestreet.euS This user is from outside of this forum
    [email protected]
    wrote last edited by
    #3

    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.

    A D 2 Replies Last reply
    19
    • 2xsaiko@discuss.tchncs.de2 [email protected]

      Yes, you can just use a reverse proxy for IPv4 only and point it to the IPv6 upstream. That is what I do, with a separate DNS record which then combines the two. See the DNS records for id.knifepoint.net (CNAME), http.vineta.knifepoint.net (AAAA, A) and vineta.knifepoint.net (AAAA).

      The reverse proxy config and certificate management is set up with NixOS, if it helps: https://git.dblsaiko.net/systems/tree/nixos/defaults/v4proxy.nix https://git.dblsaiko.net/systems/tree/nixos/modules/sys2x/v4proxy.nix

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

      But having a reverse proxy would enable someone getting access to it to read traffic, while having a VPN Tunnel won't.

      2xsaiko@discuss.tchncs.de2 gray@pawb.socialG 2 Replies 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).

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

        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 1 Reply Last reply
        24
        • R [email protected]

          But having a reverse proxy would enable someone getting access to it to read traffic, while having a VPN Tunnel won't.

          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
          #6

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

          R 1 Reply Last reply
          11
          • 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).

            death916@lemmy.death916.xyzD This user is from outside of this forum
            death916@lemmy.death916.xyzD This user is from outside of this forum
            [email protected]
            wrote last edited by
            #7

            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 1 Reply Last reply
            3
            • R [email protected]

              But having a reverse proxy would enable someone getting access to it to read traffic, while having a VPN Tunnel won't.

              gray@pawb.socialG This user is from outside of this forum
              gray@pawb.socialG This user is from outside of this forum
              [email protected]
              wrote last edited by
              #8

              Your reverse proxy should have a cert with HTTPS.

              2xsaiko@discuss.tchncs.de2 1 Reply Last reply
              2
              • 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
                #9

                Curious question, why would IPv6 introduce additional latency?

                C 1 Reply Last reply
                6
                • gray@pawb.socialG [email protected]

                  Your reverse proxy should have a cert with HTTPS.

                  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
                  #10

                  Tbf, technically data is still decrypted at the reverse proxy and then re-encrypted. So if someone manages to reconfigure the proxy or read its memory somehow they could read traffic in plain text.

                  However then since they have to control the VPS, they could also get a new cert for that domain (at least the way I’ve configured it) even if it was passed as is to the real host via a tunnel and read the plaintext data that way, so I don’t think a tunnel protects against anything.

                  A H 2 Replies Last reply
                  1
                  • 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).

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

                    vpn to your vps for ipv4.

                    Dynamic dns to whatever your local hosted services use in case your local ipv6 changes. I’d just use the vps vpn for everything though unless the speeds are really bad.

                    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.

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

                      This. Using simple ssh tunneling with port forwarding in a similar scenario. Working flawlessly with zero maintenance for 5 years and counting. Very reliable

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

                        This. Using simple ssh tunneling with port forwarding in a similar scenario. Working flawlessly with zero maintenance for 5 years and counting. Very reliable

                        shimitar@downonthestreet.euS This user is from outside of this forum
                        shimitar@downonthestreet.euS This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #13

                        Not really reliable, much less than wire guard. If your connection is unstable ssh not the best option. Autossh make it better, but still after a forced disconnection ssh will take a while to drop and reconnect. Wire guard is much better. I moved from ssh+autossh to wireguard and wished I did that sooner.

                        A 1 Reply Last reply
                        4
                        • 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).

                          csm10495@sh.itjust.worksC This user is from outside of this forum
                          csm10495@sh.itjust.worksC This user is from outside of this forum
                          [email protected]
                          wrote last edited by [email protected]
                          #14

                          Another option if you need public access without something like tailscale would be to use ddns and a AAAA record. Something like https://github.com/ddclient/ddclient would help do that.

                          That way if the IP changes, you'd pick up on the change for your vanity url within a few minutes.. and can get https certs for that url as well.

                          Edit: I reread the OP. This doesn't help if clients need direct ipv4. Sorry about that.

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

                            Tbf, technically data is still decrypted at the reverse proxy and then re-encrypted. So if someone manages to reconfigure the proxy or read its memory somehow they could read traffic in plain text.

                            However then since they have to control the VPS, they could also get a new cert for that domain (at least the way I’ve configured it) even if it was passed as is to the real host via a tunnel and read the plaintext data that way, so I don’t think a tunnel protects against anything.

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

                            I use this setup and don’t terminate SSL at the VPS and solely tunnel the encrypted traffic over a wire guard tunnel to the home lab where SSL is terminated.

                            The VPS solely serves to move the traffic from an external IP to an internal one.

                            It’s possible that someone could log into my server, change the nginx config to terminate SSL and then siphon data but it would take a few steps and can be somewhat mitigated by stapling the SSL certs that should be seen from the homelab.

                            1 Reply Last reply
                            1
                            • 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).

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

                              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 1 Reply Last reply
                              4
                              • 2xsaiko@discuss.tchncs.de2 [email protected]

                                Tbf, technically data is still decrypted at the reverse proxy and then re-encrypted. So if someone manages to reconfigure the proxy or read its memory somehow they could read traffic in plain text.

                                However then since they have to control the VPS, they could also get a new cert for that domain (at least the way I’ve configured it) even if it was passed as is to the real host via a tunnel and read the plaintext data that way, so I don’t think a tunnel protects against anything.

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

                                Or just use Nginx stream proxy, and all the encryption happens on the endpoints. No need for certs on the proxy at all.

                                This is how I make https and mqtts available on ipv4.

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

                                  Curious question, why would IPv6 introduce additional latency?

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

                                  It doesn't, but running everything through a tunnel to get IPv4 access would. OP wants only the IPv4 traffic to go over a tunnel.

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

                                    Not really reliable, much less than wire guard. If your connection is unstable ssh not the best option. Autossh make it better, but still after a forced disconnection ssh will take a while to drop and reconnect. Wire guard is much better. I moved from ssh+autossh to wireguard and wished I did that sooner.

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

                                    Fair comment, I should qualified my answer: I use an ssh tunnel with auto-reconnect option, wrapped inside a systemd service. In all this years, I still have to run into a problem that wasn't external (server down, no internet at home etc)
                                    I agree that wireguard is the proper solution however it requires a lot of extra configuration and support in both ends, which now is prevalent but not so much 5+ years ago. Also for a single port solution, ssh is so much simpler, practical and reliable, you only need an ssh user at the other end.

                                    ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -R localhost:YOUR_PORT:localhost:YOUR_PORT SOME_USER@YOUR_SERVER

                                    1 Reply Last reply
                                    2
                                    • H [email protected]

                                      Or just use Nginx stream proxy, and all the encryption happens on the endpoints. No need for certs on the proxy at all.

                                      This is how I make https and mqtts available on ipv4.

                                      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
                                      #20

                                      Oh interesting, I’ll have to look into that. Is this with that “proxy protocol” I’ve seen mentioned? If not, does this preserve it pass through the client socket address?

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

                                        Oh interesting, I’ll have to look into that. Is this with that “proxy protocol” I’ve seen mentioned? If not, does this preserve it pass through the client socket address?

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

                                        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 1 Reply Last reply
                                        0
                                        • 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
                                          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