"Forward" subdomain to client on the network?

  • Hello everyone

    I have bought a domain from Infomaniak for a long time.

    At home I set up an Ngnix proxy in my network.

    My goal would be to be able to access a client in my network via a subdomain.

    So e.g.: pihole.meindomain.ch -> 198.168.1.XX:XXXX

    I have already tried the following:

    Switch on Swisscom DynDNS on Internetbox 3 (example: abc.internet-box.ch). This DynDNS is then forwarded to the DynDNS in the Infomaniak manager via web forwarding.

    Activate port forwarding for ports 80 and 443 on the Ngnix proxy on the Internet box. And connect a redirection host to my client in the ngnix proxy.

    Unfortunately this didn’t work.

    How can I access my internal client from the subdomain?

    Do I have the right approach to solve this via Ngnix Proxy (I don’t actually want to open a separate port on Internetbox 3 for each service/client)?

    It wouldn’t be a problem to migrate the domain to another provider.

    If you want me to share any other information, just comment 🙂

    Thank you!

    PS: my network knowledge has become a bit “rusty” in recent years, so I would be very grateful for any ideas/explanations as to why my approach didn’t work!

    Show original language (German)
    • Hi again @Friveupa20 😉

      (I deleted my first post because Nils had already mentioned the relevant point)

      You write:

      I have already tried the following:

      Switch on Swisscom DynDNS on Internetbox 3 (example: abc.internet-box.ch). This DynDNS is then forwarded to the DynDNS in the Infomaniak manager via web forwarding.

      Activate port forwarding for ports 80 and 443 on the Ngnix proxy on the Internet box. And connect a redirection host to my client in the ngnix proxy.

      Unfortunately this didn’t work.

      and later:

      But if I go to my subdomain via browser, I am automatically redirected to my abc.internet-box.ch domain

      That’s exactly what a web redirection does 😉. Web redirection = your browser connects to the Infomaniak web server, which says “the page you are looking for is at [http://xyz.internet-box.ch”](http://xyz.internet-box.ch “)reachable” and your browser will then connect there.

      So that your browser does not literally visit xyz.internet-box.ch, but instead accepts its IP as the IP for pihole.meinedomain.ch, you do not need a web redirect from Infomaniak but a [CNAME](https://www.infomaniak.com /en/support/faq/2033/cname-dname-record) Create record.

      Then the request arrives correctly at NGINX.

      LG

      r00t

    Wow, thank you very much for the ultra fast response!

    No, I have not yet created an A Record entry at Infomaniak.

    Do I have to enter my public IP there with my subdomain?

    Will my public IP no longer be changed by the A Record entry and will remain static?

    Which certificate from ngnix do I need to get and where should I enter it?

    Show original language (German)

    @Friveupa20 So you only want to use the domain internally in the network? In this case you would have to use a different DNS server than the IB and make a static DNS entry with an A record on the IP on this DNS server

    In my network with a Mikrotik router I have DNS records for all my internal devices under IP -> DNS -> Static, e.g. proxmox.local.meinedomain.ch or truenas.local.meinedomain.ch

    Unfortunately, this is not possible with the IB’s DNS server

    If you want to use the domain externally: port forwarding to the device, activate the Swisscom DynDNS in my Swisscom and a CNAME record on the Swisscom DynDNS in Infomanik (example.internet-box.ch)

    From experience, integrating Infomanika directly as DynDNS always causes problems

    Show original language (German)

    Thank you also for the ultra fast response!

    I assume by “Pentecost” you mean “pinging” 🙂

    When I ping my subdomain I get a different IP than when I ping my abc.internet-box.ch (the internet-box one understandably matches my public IP)

    But if I go to my subdomain via browser, I am automatically redirected to my abc.internet-box.ch domain

    Show original language (German)

    Hi again @Friveupa20 😉

    (I deleted my first post because Nils had already mentioned the relevant point)

    You write:

    I have already tried the following:

    Switch on Swisscom DynDNS on Internetbox 3 (example: abc.internet-box.ch). This DynDNS is then forwarded to the DynDNS in the Infomaniak manager via web forwarding.

    Activate port forwarding for ports 80 and 443 on the Ngnix proxy on the Internet box. And connect a redirection host to my client in the ngnix proxy.

    Unfortunately this didn’t work.

    and later:

    But if I go to my subdomain via browser, I am automatically redirected to my abc.internet-box.ch domain

    That’s exactly what a web redirection does 😉. Web redirection = your browser connects to the Infomaniak web server, which says “the page you are looking for is at [http://xyz.internet-box.ch”](http://xyz.internet-box.ch “)reachable” and your browser will then connect there.

    So that your browser does not literally visit xyz.internet-box.ch, but instead accepts its IP as the IP for pihole.meinedomain.ch, you do not need a web redirect from Infomaniak but a [CNAME](https://www.infomaniak.com /en/support/faq/2033/cname-dname-record) Create record.

    Then the request arrives correctly at NGINX.

    LG

    r00t

    Show original language (German)

    4b 65 69 6e 65 20 4d 61 63 68 74 20 64 65 72 20 6c 65 67 61 63 79 20 49 50 21