Hi,

I wanted to forward the port to my Traefik install on my TrueNAS server. Unfortunately I have now learned that my ISP restricts the range of ports that I can open externally to 12396-12415, so internally I can open port 443 to port 12400 externally. So far so good, but how do I point my Cloudflare DNS record to this port?

My router is a Fritzbox 7530 if that’s relevant.

  • SpaceCadet@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    2 years ago

    DNS doesn’t deal with ports, it resolves hostnames to IP addresses and that’s it.

    What you probably need is some kind of reverse proxy that sits outside of your network, listens on port 443 and then directs it to your home IP address on port 12400.

      • SpaceCadet@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 years ago

        If you really want to get anal about it, yes I know there things like CNAME, PTR and MX records too but that’s outside of the scope of this discussion.

        DNS doesn’t deal with ports, there’s no way to say: homelab.example.com should point to IP address 1.2.3.4 and port 12400.

  • chiisana@lemmy.chiisana.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 years ago

    You’d need more than their DNS, as DNS cannot forward ports for you (and before anyone mention SRV records, no, it just tells supported applications which port to use; it does not and cannot externally reassign the port used).

    I believe the tool for the job here is the Zero Trust Tunnel; in the Dashboard, on the left, look for Zero Trust, and then on the new dashboard, go Access > Tunnels to setup the tunnel. Documentations are here: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/

  • Noah@lemmy.federated.club
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    2 years ago

    You can create a transform rule (iirc, might be one of the other rules, can’t check right now) that changes the destination port as long as you’re using Cloudflare’s proxy, no need for stuff like srv records.

    edit; alternatively you can use cloudflare’s tunnels feature if forwarding doesn’t work

  • fraydabson@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    I just went through a lot of confusion setting up caddy. In the end it was user error and I got it all working. It’s still fresh in my memory if you still need help after this.