Adding Custom Domain Names on Your Internal Network Using Nginx Proxy Manager and Pi-Hole

Joe KarlssonBlog

Adding Custom Domain Names on Your Internal Network Using Nginx Proxy Manager and Pi-Hole

Creating custom domain names within your internal network can streamline access to locally hosted services without the need for public domain registration. This guide explains how to set up custom domain names using Pi-Hole for DNS management and Nginx Proxy Manager for web traffic control and SSL encryption.

Step 1: Configuring Pi Hole for Custom Domain

Pi-Hole, primarily known for ad-blocking, also serves as a local DNS server. To set a custom domain:

  1. Access Pi-Hole: Log into the Pi-Hole administrative interface.
  2. Navigate to Local DNS: Select ‘Local DNS’ from the menu, then ‘DNS Records’.
  3. Add Custom Domain: Enter your desired custom domain name (e.g., magic.mirror) and the IP address of your NGINX Proxy Manager server. Remember, this domain doesn’t need to be a registered one or have a valid top-level domain (TLD).

Step 2: Configuring NGINX Proxy Manager

Next, configure the NGINX Proxy Manager to recognize and forward requests for your custom domain:

  1. Access NGINX Proxy Manager: Open the NGINX Proxy Manager interface.
  2. Add New Host: Click on ‘Add New Host’ and enter the custom domain you set in Pi Hole (e.g., magic.mirror).
  3. Set Forward Hostname: Under ‘Forward Hostname / IP’, enter the IP address of the server hosting the service (e.g., your Magic Mirror server).
  4. Enable Options (Optional): You may enable ‘Cache Assets’ for improved performance and ‘Block Common Exploits’ for added security.

Step 3: SSL Encryption with Let’s Encrypt

Securing your internal traffic with SSL:

  1. Select SSL: In the NGINX Proxy Manager, while setting up the host, choose to add an SSL certificate.
  2. Use Let’s Encrypt: Opt for a free certificate from Let’s Encrypt.
  3. Avoid Server Reachability Test: Do not click ‘Test Server Reachability’ since the service isn’t accessible externally. This doesn’t impede the SSL setup for internal use.

Conclusion

By following these steps, you can create a streamlined, secure internal network with custom domain names, enhancing the accessibility and security of local services like the Magic Mirror.


Reference Links: