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

  • dblsaiko@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    8 months ago

    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

  • randombullet@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    8 months ago

    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.

    • lemonuri@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      I did something very similar via netcup tiny vps, nginx and wireguard. I could post my setup notes tomorrow if someone needs them.

    • cmnybo@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 months ago

      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.

  • thelittleblackbird@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    8 months ago

    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

    • Keelhaul@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      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.

  • TFO Winder@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 months ago

    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.

  • csm10495@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 months ago

    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.

  • Brkdncr@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    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.