Symptoms
-
Cron tasks fail with the following error messages:
curl error 7 failed to connect to example.com port 443 connection refused
-
Attempt to connect to the website fails. For instance, with the following command:
# wget http://www.example/
–2020-07-07 07:17:07– http://www.example/
Resolving www.example.com (www.example.com)… 127.0.0.1
Connecting to www.example.com (www.example.com)|127.0.0.1|:443… failed: Connection refused. -
On the network interface, the internal 192.0.2.2 IP address is used and the domain
example.com
resolves to external 203.0.113.2 IP address
Cause
Incorrect NAT configuration.
Resolution
Contact the hosting provider responsible for network/NAT configuration and report the issue to them to make it possible to connect to websites’ own public IP from the server itself.