0
I am right now fighting and reading documentations and articles about using the ufw
firewall to allow multiple ports to be accessible via https
.
I have tried enabling the desired ports using this command ufw allow port
, but still not allowing any requests over https
.
Deactivating ufw firewall does the job, but I am concerned about it, as I am not strong when it comes to servers and security, but believes the defaults are sufficient.
My nginx configuration looks like this:
server {
listen 900 default_server ssl http2;
listen [::]:900 default_server ssl http2;
...
location / {
proxy_pass http://application:9000;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect $scheme://$host:9000 $scheme://$host:80;
}
}
And ufw status shows this:
To Action From
-- ------ ----
Nginx HTTP ALLOW Anywhere
OpenSSH ALLOW Anywhere
Nginx HTTPS ALLOW Anywhere
443/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
Nginx HTTP (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx HTTPS (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)