WordPress sites not available externally

A couple of days ago, I noticed images were not loading on my WordPress sites. I blogged about this in the post Images not loading on websites. This was actually symptomatic of a much bigger issue. The behaviour I was observing was from inside my network. Outside my network, my WordPress sites were not accessible. This is the error message I saw on my phone when browsing to a site:

Scrolling down for more info…

Server hogging resources?? Not very helpful, so I clicked for additional troubleshooting information…

Nothing really jumped out at me. It turned out that the last of these points was true i.e. Packets were being dropped. However, the point is so generic, it’s not particularly helpful in isolating the issue. I worked my way down the list, trying different things, but all led to dead ends. To solve the problem, I had to consider how my infrastructure handled external requests.

I have a split DNS arrangement with DNSMasq set up to resolve my WordPress site URLs internally to private server addresses and Cloudflare set up to resolve those URLs externally to the (dynamic) address of the external interface of my router. A Caddy reverse proxy analyses each incoming request (whether the request originates internally or externally) and delivers it to the right server. To handle external requests, ports 80 and 443 on the router must be forwarded to Caddy.

I checked my local DNS resolver and Caddy RP. Both seemed to be okay. I was able to access the internet so my router was fine. On closer examination though, the port forwarding I had set up for Caddy had disappeared.

Once I reinstated this, my WordPress sites burst into life when accessed externally.

How had I lost the port forwarding? I had no idea. It’s never happened before. If my sites are not available externally and my internet is working, I know next time where to look first.

Keep Reading



Leave a Reply