1

I have self-hosted web-server in internal network which i can access from external network with FQDN. I would like to access same server from internal network with same FQDN also.

I have configured my router to use my own DNS-server which is located in my internal network. I can access that and other machines with FQDN via SSH in my internal network, which has A-records in my DNS-server. But i cannot access that web-server (and actually one other "not internet facing" web-server) with FQDN via browser. I can access those with internal IP via browser.

I guess this is DNS related problem. I know something about basic networking and servers, but when it comes to DNS, i'm out of luck.

Related equipment:

  • Ubiquiti Edgerouter acting router+firewall. Configured to use internal DNS-server. FW port forward ports 80 and 443 to my Reverse Proxy.

  • Nginx reverse-proxy server handling LetsEncrypt certs and forwarding traffic to my web-server. <-- seems to work fine(can access that web-server from external network with FQDN. SSL work also).

  • Web-server using Apache2. Browser can access with local IP, not FQDN.

EDIT:

  • Nameserver - Records created with Webmin GUI

Any ideas?

unix_ike
  • 13
  • 3

1 Answers1

0

I don't know much about ubiquiti gear, but could be a hairpin nat missing.

The docs says it's enabled by default when you forward a port, but worth checking it.

Mrwut
  • 56
  • 1
  • 1
  • 5
  • Looks like it was that Hairpin NAT. Thanks for advice! However Certificates does not work. That's because my Reverse-Proxy handles those, not server itself. Maybe i'm gonna just change Certification handling to server itself. If you don't have advice for that? – unix_ike Jan 06 '22 at 10:45
  • Actually i got certificates working by pointing my internal A-records to my reverse-proxy. I lose ability to ssh in exposed server with DNS record but that's not a big problem – unix_ike Jan 07 '22 at 08:16