How to check port used for SSL?

I have RHEL 5.8 in our production environment. We are using SSL, my query is how to find the port used for SSL. In /etc/services, it shows 443 but when I give

netstat -tulpn | grep 443

Or

netstat -tulp | grep https

I do not get any output.

I hope, my question is clear of how to find the port used for SSL.

Please revert with the reply to my query.

Regards

Try a different grep

# netstat -tulpn | grep httpd
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      3530/httpd
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      3530/httpd

This only works when executed as root.

SSL port is specified in apache ssl config:

# grep ^Listen /etc/httpd/conf.d/ssl.conf
Listen 443

then you can test if is listened:

# netstat -ntpl | grep 443
tcp 0 0 :::443 :::* LISTEN 7699/httpd

Thanks versd for the answer. So the grep has to be on 'httpd' and not 'https', is my observation correct?

Request you to please reply.

---------- Post updated at 02:41 AM ---------- Previous update was at 02:37 AM ----------

Hi,

versd, as given in the answer by you that 443 is the port listed by the 'Listen' directive. If we change the port in this file, does the same change have to done in /etc/services or how is that done, I am not aware off.

Request you to please reply to my query.

Regards

Right. Not because of the service httpd instead of https, but to find the ports open by the program httpd!

1 Like