Sites are accessible externally, but not on the internal network

1. Caddy version: 2.6.2

2. How I installed, and run Caddy: Installed using the the Stable Release instructions found on the Caddy website for Ubuntu.

a. System environment: Virtual machine running Ubuntu.

d. My complete Caddy config:

app.centeroflifechurch.com {
	header -X-Frame-Options
	header X-Frame-Options "SAMESITE"
	reverse_proxy 192.168.1.174:10000
}

storage.centeroflifechurch.com {
	reverse_proxy 192.168.1.159:9001
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile

https://network.centeroflifechurch.com {
	reverse_proxy https://192.168.1.81:8443 {
		# the unifi controller runs on the different machine than caddy
		transport http {
			tls_insecure_skip_verify # we don't verify the controller https cert
		}
		header_up - Authorization # sets header to be passed to the controller
	}
}

3. The problem I’m having:

The issues we are seeing is that the websites are accessible on any external network; however, as soon as we try to access the pages internally, we cannot get the pages to load, and always get a timeout error.

5. What I already tried:

We’ve tried changing our DNS server to public ones to see if this would resolve the issue, but that attempt was unsuccessful. We’ve also tried various fixes online but it seems like most people have the opposite issue from us - accessible locally, but not externally. As soon as we switch off the network, the issue is not there.

This is typically because your router at the edge of your network doesn’t support NAT hairpinning:

The usual solution is to run a DNS server inside of your LAN which resolves your domains to the LAN IP of your server for machines inside your network, and still resolves via public DNS to your WAN IP.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.