2025-01-12, 09:34 PM
(This post was last modified: 2025-01-12, 09:36 PM by TheDreadPirate. Edited 1 time in total.)
The issue is that your router is not keeping the traffic local. The traffic is going out to the Internet only for it to come back.
There are a couple ways to prevent that. Some routers have a setting you can enable called "NAT loopback" or "NAT hairpin". When that is enabled when the router sees that the DNS request resolves to itself it will keep the traffic local instead of sending it to the Internet.
Your other option, if your router doesn't have NAT loopback/hairpin, is to setup local DNS entries for your domain. You'd set the IP address for your domain to be 192.168.1.42. You'd also need to ensure that your server always gets this IP assignment from your router.
There are a couple ways to prevent that. Some routers have a setting you can enable called "NAT loopback" or "NAT hairpin". When that is enabled when the router sees that the DNS request resolves to itself it will keep the traffic local instead of sending it to the Internet.
Your other option, if your router doesn't have NAT loopback/hairpin, is to setup local DNS entries for your domain. You'd set the IP address for your domain to be 192.168.1.42. You'd also need to ensure that your server always gets this IP assignment from your router.