I am hosting a platform on a server which has multiple domain names, let's say example.com and anotherexample.com. I am running a Spring Boot backend on that server, which uses the domain example.com and tries to communicate with anotherexample.com. My problem is that I can't seem to connect with the other domain over HTTPS, it simply does not even connect. I have tried the following tests which return different results:
- Using
curl
on a machine not behind the firewall to https://anotherexample.com, works perfect - Using
curl
on the server, but instead using http://anotherexample.com, works perfect - Using
curl
on the server to https://anotherexample.com, no response, eventually times out - Using
curl
on the firewall to https://anotherexample.com, no response, eventually times out - Using
openssl s_client -connect anotherexample.com:443 -servername anotherexample.com
on the server, no response, eventually times out - Changing
/etc/hosts
on the server to127.0.0.1 anotherexample.com
, when runningopenssl s_client -connect anotherexample.com:443 -servername anotherexample.com
, I get a response.
What could be the issue causing me to not be able to connect to any domain hosted on machines behind the firewall, is it something wrongly configured on the server (Ubuntu 22.04) or on the PfSense firewall (2.7.2).
My structure is the following:
- PfSense Firewall which uses NAT to make sure the public IP gets to the internal IP of the server
- Server running NGINX with port 80 and 443 open. Certificates are done via LetsEncrypt and work perfectly in the browser