I'm setting up a server to share files with some friends and familly. Everything works just fine with HTTP, but since I setup HTTPS this morning, I can't reach the server through the public ip/domain name I setup, I'm getting timeout. It works fine outside of my local network, I can reach it from my phone on LTE, and my friends can reach it too.
Here's my nginx config file, I set up a redirection from HTTP to HTTPS
server {
listen 80;
listen [::]:80;
server_name DOMAIN;
location / {
return 302 https://$server_name$request_uri;
}
location /.well-known/acme-challenge/ {
alias /var/www/.well-known/acme-challenge/;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name DOMAIN;
ssl_certificate /etc/ssl/uacme/DOMAIN/cert.pem;
ssl_certificate_key /etc/ssl/uacme/private/DOMAIN/key.pem;
root /pool/media;
autoindex on;
charset utf-8;
location / {
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
}
location /.well-known/acme-challenge/ {
alias /var/www/.well-known/acme-challenge/;
}
}
From localhost, I can reach the domain through HTTP and get a correct 302, but reaching HTTPS will timeout.
$ curl -I http://DOMAIN
HTTP/1.1 302 Moved Temporarily
$ curl -I --resolve 'DOMAIN:443:LOCALIP' https://DOMAIN
HTTP/2 200
$ curl -I https://DOMAIN
curl: (28) Failed to connect to DOMAIN port 443 after 128882 ms: Couldn't connect to server
I have setup ufw
on the server, with the correct configuration to allow traffic on the port 80 and 443. Could this be a problem on the router itself? I have tried several tool online that all points to a healthy server, only my local network is affected.