2

So i just integrated my certificate and my nginx conf verifies it when i restart. When i do a:

netstat -anp | grep 443

it returns:

tcp      0      0 0.0.0.0:443       0.0.0.0:*          LISTEN      22241/nginx

But when i try to reach it on the browser it just times out.

My nginx conf is:

http {
    server_names_hash_bucket_size 64;

    server {
        listen 80;
        listen 443 ssl;

        fastcgi_param HTTPS on;

        server_name www.example.com example.com;

        ssl on;
        ssl_certificate /root/ssl/example_com/example.com.chained.crt;
        ssl_certificate_key /root/ssl/example_com/example.com.key;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';

        #rewrite ^/(.*) https://example.com/$1 permanent;

        location / {
            # Works on port 80....
        }
    }
}
events { 
    worker_connections  1024; 
}

Besides that iv'd setup ufw on my server where i opened up port 22, 80 and 443.

TCP DUMP

14:43:33.951775 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 216993490 ecr 0,sackOK,eol], length 0
14:43:34.980760 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 216994490 ecr 0,sackOK,eol], length 0
14:43:36.052331 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 216995490 ecr 0,sackOK,eol], length 0
14:43:37.101006 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 216996490 ecr 0,sackOK,eol], length 0
14:43:38.140117 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 216997490 ecr 0,sackOK,eol], length 0
14:43:39.210849 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 216998491 ecr 0,sackOK,eol], length 0
14:43:40.688591 IP LOCALIP.54653 > HOSTIP.443: Flags [S], seq 743769181, win 65535, options [mss 1460,sackOK,eol], length 0
14:43:41.311110 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 217000492 ecr 0,sackOK,eol], length 0
14:43:43.368351 IP LOCALIP.54660 > HOSTIP.443: Flags [S], seq 797790670, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 217002440 ecr 0,sackOK,eol], length 0
14:43:43.419444 IP LOCALIP.54661 > HOSTIP.443: Flags [S], seq 2577678109, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 217002490 ecr 0,sackOK,eol], length 0
14:43:45.534502 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 217004492 ecr 0,sackOK,eol], length 0
14:43:53.981084 IP LOCALIP.54664 > HOSTIP.443: Flags [S], seq 3123601024, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 217012492 ecr 0,sackOK,eol], length 0

What could it be?

3
  • I know my nginx config could have way more in it, but its a initial setup Feb 11, 2016 at 11:37
  • Does the config return ok in nginx -t? Try with IP address in listen myip:443 ssl;
    – John Fox
    Feb 11, 2016 at 12:18
  • I does work on port 80, I think its blocked before because my access log dosn't return anything when i try to reach it on port 443 Feb 11, 2016 at 13:33

1 Answer 1

4

In ordert to find out whether packets are really reaching you server, run

tcpdump -ni <outer network interface> host <IP of remote client> and port 443

For example:

tcpdump -ni eth0 host 12.34.56.78 and port 443

If you see the packets, then something is wrong with your firewall.
If not, then you have connectivity issues between your client and webserver.
To solve this out you may run on client:
tracert <webserver's IP> (on Windows)
or
traceroute <webserver's IP> (on Unix)
save output to file and call your ISP/network administrator/someone else who cares. They will probably ask for trace - you have it saved in file.

8
  • Iv'd added a tcpdump Feb 11, 2016 at 13:45
  • 1
    So, there are only requests to your server and no single responce from it. I beleive there is a firewall issue. Could you turn firewall off and try again just to ensure? Feb 11, 2016 at 13:48
  • Yeah i can try, can you give a pointer how to turn it off? Feb 11, 2016 at 14:01
  • 1
    Depends from OS you are running. Alas you didn't specify it Feb 11, 2016 at 14:47
  • 1
    try sudo ufw disable Feb 11, 2016 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .