Secure Local Domains Easily with Pi-hole & Nginx Proxy

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 63

  • @Techdox
    @Techdox  6 месяцев назад +3

    If you want to add Pihole to Nginx Proxy Manager, here's a guide - docs.techdox.nz/pihole-on-npm/

  • @JayB6
    @JayB6 5 месяцев назад +3

    This video is the first time I have been able to use nginx proxy manager. I have struggled for years to learn how it works. The best video out there right here. Thanks.

    • @Techdox
      @Techdox  5 месяцев назад

      You’re more than welcome

  • @Oschar157
    @Oschar157 3 месяца назад

    Mate, truly, thank you. You did a great job demonstrating the process and keeping it simple. I have tried following other tutorials, but they always end up brushing by the concepts, expecting you to already know everything. Great job, I'm integrating this asap

  • @wizzbangtg
    @wizzbangtg 6 месяцев назад +4

    Interesting way to accomplish this. The only issue I can see is if you have a wild card resolve from Cloudlfare DNS to your public IP and you don't want the app publicly accessible.
    I do something very similar without Pi-Hole. The way I accomplish this type of access is to have the wildcard DNS entry in Cloufflare point to my local IP of NPM. No need for the double entry for the app in both Pi-Hole and NPM. Nginx config is all that is needed since locally Cloudflare will point to the local Nginx Proxy Server. Outside access is handled, in my case is with another domain name. I also spin Authentik in there too for added security. But that is the beautiful thing about what we do. There's more than one way to do things and if it works, it's not wrong.
    Good videos, keep it up.

    • @Techdox
      @Techdox  6 месяцев назад +2

      Yeah, 100%! That’s why I added “How I fix this” as like you mentioned there’s so many different ways :)

    • @dreevy
      @dreevy 2 месяца назад

      Hey, I know this comment is old but would you be able to point to any good resources on how you did this? I’m very new to all of this.

    • @duleepalakmal1482
      @duleepalakmal1482 2 месяца назад

      you're truly a life saver!

    • @wizzbangtg
      @wizzbangtg 2 месяца назад

      @@dreevy A few days later but wanted to check. Have you recieved a response on this question?

  • @anthonyyu2722
    @anthonyyu2722 4 месяца назад +1

    This solved my problem with proxy hosts being unreachable after turning DNS Rebind Check and Browser HTTP_REFERER enforcement back on in pfSense. I had the DNS records in Pi-hole associated with the proxy host IPs when I should of had them pointed at the Nginx IP address instead. Of course I still had to add pfSense and Nginx to the Alternate Hostnames or else I'd get the block page from pfSense. Thanks a bunch.

    • @mariotorres8910
      @mariotorres8910 2 месяца назад

      Same issue here - this video helped me resolve it, key point is around 6:11

  • @mariotorres8910
    @mariotorres8910 2 месяца назад

    6:11 this key point solved my multi-day troubleshooting of the issue lol. I was having weird connectivity issues where only some services connected. turns out local dns > dns records should point to the NPM site for routing - and not the actual service IP. In hindsight, DUH
    Great helpful video bro

    • @Techdox
      @Techdox  2 месяца назад +1

      Glad you got it working! It’s always something simple

  • @benturner2973
    @benturner2973 Месяц назад

    Great video! Thank you. How long do you need to wait for DNS to catch up to the browser? I’ve refreshed a few times now and still not seeing my local domain

    • @Techdox
      @Techdox  Месяц назад

      Did you add it to your PiHole or what ever DNS server you are using as well as NPM?

  • @thefuzul
    @thefuzul 10 дней назад

    Great guide! Thank you so much!

  • @Holytepps
    @Holytepps 3 месяца назад

    Just what I searched for. Thank you!

    • @Techdox
      @Techdox  3 месяца назад

      Glad I could help!

  • @JamesBisseling
    @JamesBisseling 3 месяца назад

    Nice! Going to use this to set up my toys. I am wondering what that homepage is running on. Is that similar to CasaOS or something entirely different?

    • @Techdox
      @Techdox  3 месяца назад +1

      That would be Homepage - Here's me showcasing mine - ruclips.net/video/KQ_fYtkQZSM/видео.htmlsi=Ag9L5aBfqjQaZxsF&t=477
      Also here's a dedicated video - ruclips.net/video/a5-4u0qFKaE/видео.htmlsi=LbeUNFHlvI44uFfO

  • @diegofelipe2119
    @diegofelipe2119 5 месяцев назад

    Great video, thanks!
    But do I really need to enter each service/server on Pi Hole one by one?

    • @Techdox
      @Techdox  5 месяцев назад +1

      I can’t really see how else it would know what where to send the traffic. You need to tell it this name goes to this IP in some shape or form

    • @diegofelipe2119
      @diegofelipe2119 5 месяцев назад

      ​@@Techdox I found out that you can do it via CLI, creating a file on /etc/dnsmasq.d/, there you can use a wildcard for the domain, this way it works for all addresses from that domain.
      Example:
      adress=/*.DOMAIN/NGINX_IP
      then run pihole restartdns

  • @Redostrike
    @Redostrike 2 месяца назад

    Nice tutorial, can i ask why you are not using cname to forward services isn't that cleaner/easier when you would change the ip of a server?

    • @Techdox
      @Techdox  2 месяца назад +1

      Thanks for the question! CNAME records wouldn't work well for my setup because:
      Direct Mapping: I need direct IP-to-domain mapping for my local services, which CNAME can't provide as it just points one domain to another.
      Nginx Proxy Manager: My Nginx Proxy Manager setup works best with A records that point directly to IPs, making the process straightforward and reliable.
      Local Control: I manage my own DNS, so using A records is quicker and easier than dealing with the extra lookup that CNAMEs require.

  • @mariobrandt2984
    @mariobrandt2984 3 месяца назад

    Thanks for the great video. It works perfectly.
    I have a question: I would also like to access my PiHole and the Proxmox server with SSL via the NPM. However, both services do not only have IP:Port
    There is also the text and special characters at the end. How do you enter such things in the NPN?

    • @Techdox
      @Techdox  3 месяца назад +1

      Proxmox is port 8006 and PiHole is port 80 but needs some custom config for PiHole. Feel free to join the Discord and I can run you through it

    • @mariobrandt2984
      @mariobrandt2984 3 месяца назад

      @@Techdox 💯 work 😃

  • @chrisumali9841
    @chrisumali9841 6 месяцев назад

    Awesome demo, thanks for the info and config.

    • @Techdox
      @Techdox  6 месяцев назад

      You’re more than welcome

  • @mariuszzawierucha1310
    @mariuszzawierucha1310 5 месяцев назад

    So to accomplish that particular task you have to own a domain, right? What if I don't have any? How to add ssl cert to each of my containers then?

    • @Techdox
      @Techdox  5 месяцев назад

      To get let's encrypt SSL certificates, yeah you need to own a domain name

  • @fossdom5568
    @fossdom5568 6 месяцев назад

    Any preference doing via NPM as compared to Cloudflared tunnel ?

    • @Techdox
      @Techdox  6 месяцев назад +2

      I use cloudflare tunnels for services I want made public, and private I keep out of Cloudflare.

    • @-nepherim
      @-nepherim 6 месяцев назад

      @@Techdox So this method allows services to remain local. If you want them public, then configure them in CF? That right? (excellent video btw. finding a solution to this has been on my backlog for years!)

    • @Techdox
      @Techdox  6 месяцев назад

      @@-nepherim that’s correct :)

  • @mioszszyrner5990
    @mioszszyrner5990 Месяц назад

    I see that PiHole is under differnt IP addres than the Nginx Proxy Server. I was trying to set it up running both on docker but here is the trick: I need to make PiHole also a DHCP server. I only made it work by granting "host" network mode to it. Having that unfortunatelly blocks from starting Nginx Proxy server as it requires port 80 to be free. Do you have any idea or hints what can I try to make this work?

  • @POV-Fire-Response
    @POV-Fire-Response 6 месяцев назад

    Just wondering if you have a way to make nginx a forward proxy with a whitelist?

    • @FelipeBudinich
      @FelipeBudinich 5 месяцев назад

      Would wireguard be the thing you look for?

  • @pinsondetailing
    @pinsondetailing 3 месяца назад

    But all these are available from outside your network, correct? How would I do the same thing but for them all to be private? Eg.. only available from inside the lan.

    • @Techdox
      @Techdox  3 месяца назад

      @@pinsondetailing no these are local only unless I open them up publicly, default my proxy is not open to the internet and if I want a service to be public I use the Cloudflare tunnel.

  • @m12652
    @m12652 6 месяцев назад

    You're a star! Thanks 👍

    • @Techdox
      @Techdox  6 месяцев назад

      Glad I could help!

  • @diazrocks
    @diazrocks 6 месяцев назад

    Would NPM work if i have CG-NAT? NPM always give me an error during sll cert request. And yes 443 & 80 is open

  • @udhayakumarcp
    @udhayakumarcp 5 месяцев назад

    How you did the ssl?

    • @Techdox
      @Techdox  5 месяцев назад

      Using the Let’s encrypt feature within Nginx Proxy Manager

  • @ashoktvm
    @ashoktvm 3 месяца назад

    this is because U have port forwarded 80 and 443 and a static or dynamic IP with DDNS, and a domain name as well?

    • @Techdox
      @Techdox  3 месяца назад +1

      I have not exposed my Nginx to the web it’s all local and if I want to expose a service then I use Cloudflare tunnel to expose that one service otherwise it’s local

    • @ashoktvm
      @ashoktvm 3 месяца назад +1

      @@Techdox it says in when setting up ssl itself this" These domains must be already configured to point to this installation". How come without portfowarding can this be obtained?

    • @Techdox
      @Techdox  Месяц назад

      @@ashoktvm because it’s all local. Nothing is exposed like I mentioned

  • @kiloy1006
    @kiloy1006 3 месяца назад

    i'm not quiet clear on this...
    you made random subdomain and showed it's not reachable since it doesn't exist. As soon as you add the address to the nginx reverse proxy manager, of course it will and it means it is also publicly accessable?
    Can you add something that shows your new sub-domain isn't available from outside and only accessible from internal network only?

    • @Techdox
      @Techdox  3 месяца назад

      @@kiloy1006 it’s not reachable because Nginx proxy manager is not exposed to the web. So if I want a service exposed to the web I add a Cloudflare tunnel to expose the specific service.
      Local works as follows.
      I add the domain name to Pihole to resolve to NPM, I search that domain name, Pihole sends it to NPM I hit the service. All local.
      Public, I have a Cloudflare tunnel I point the domain name to my NPM address NPM gets the traffic from Cloudflare and sends it to the service.
      I was sure I mentioned this process in the video

    • @kiloy1006
      @kiloy1006 3 месяца назад

      @@Techdox as soon as you said nginx proxy manager was not exposed to the web, it clicked!
      One more question though, in that case, i would have to spin up another NPM for local use only. Would 'local-only' NPM be able to issue & renew the certificate every 90days?

    • @Techdox
      @Techdox  3 месяца назад

      @@kiloy1006 since I use local only and expose via cloudflare I need to open up my NPM via a port forward just while I renew my license then I lock it back down again, might be another way but that’s how I do it.
      Issuing is no problem at all

  • @creelfo
    @creelfo 3 месяца назад

    Anyone else getting an issue where asking for an ssl certificate doesn’t work due to an internal error

    • @Techdox
      @Techdox  3 месяца назад

      Jump into the Discord if you like. We can help you there :)

  • @joeshelby3352
    @joeshelby3352 5 месяцев назад

    how make that 3:29 homepage beautifull? any source?

    • @Techdox
      @Techdox  5 месяцев назад

      Jump into the discord and I can help you :)

    • @joeshelby3352
      @joeshelby3352 5 месяцев назад

      @@Techdox link please

    • @Techdox
      @Techdox  5 месяцев назад

      @@joeshelby3352 discord.com/invite/8mX2KRxDw8

  • @programmergoogle
    @programmergoogle 2 месяца назад

    how to make home monitoring like a minute 0:58 ?

    • @Techdox
      @Techdox  2 месяца назад

      That's Homepage, I have a video on it :)

  • @LiamKarlMitchell
    @LiamKarlMitchell 3 месяца назад

    Wehey nz