Tech Support: Not Reaching Domain via HTTPS Server Behind PfSense Firewall
In this article, we will discuss a common issue faced by administrators when hosting a platform with multiple domain names on a Spring Boot backend server, specifically when the server is placed behind a PfSense firewall and communication is done via HTTPS.
Understanding the Environment
The environment consists of a hosting platform with multiple domain names, such as example.com and anotherexample.com, running a Spring Boot backend server. The server is placed behind a PfSense firewall and all communication is done via HTTPS.
Issue: Not Reaching the Domain
When trying to access the domain via HTTPS, users may encounter issues such as being unable to reach the domain or experiencing connection timeouts. This issue can be caused by misconfigurations in the PfSense firewall or the SSL certificate used for HTTPS communication.
Resolving the Issue
To resolve this issue, follow these steps:
- Check the SSL certificate used for HTTPS communication. Ensure that it is valid and covers all domain names hosted on the platform.
- Configure the PfSense firewall to allow traffic to the hosting platform via HTTPS. This can be done by creating a firewall rule that allows incoming traffic on port 443 (HTTPS) to the hosting platform's IP address.
- Check the PfSense firewall's NAT settings. Ensure that the hosting platform's IP address is correctly mapped to the domain names hosted on the platform.
- Check the Spring Boot server's configuration. Ensure that it is correctly configured to listen on the HTTPS port and that the SSL certificate is correctly installed.
Code Example: Spring Boot Server Configuration
Here is an example of how to configure a Spring Boot server to listen on the HTTPS port and install the SSL certificate:
server.port = 443
server.ssl.key-store = classpath:keystore.p12
server.ssl.key-store-password = changeit
server.ssl.keyStoreType = PKCS12
References
- Spring Boot HTTPS Configuration
- PfSense Documentation
- Check Network Settings or Firewall Configuration
This article covered the issue of not being able to reach a domain via HTTPS server behind a PfSense firewall, discussed the possible causes, and provided solutions and code examples to resolve the issue. References to further reading materials were also provided.