How to check port used for SSL?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to check port used for SSL?
# 1  
Old 04-10-2013
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
Code:
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
# 2  
Old 04-10-2013
Try a different grep

Code:
# 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.
# 3  
Old 04-10-2013
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
# 4  
Old 04-10-2013
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
# 5  
Old 04-10-2013
Quote:
Originally Posted by RHCE
So the grep has to be on 'httpd' and not 'https', is my observation correct?
Right. Not because of the service httpd instead of https, but to find the ports open by the program httpd!
This User Gave Thanks to hergp For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to check ssl certificate expiry date using openssl command?

hi how to check ssl certificate expiry date using openssl command try below code it is not working, any help echo q | openssl s_client -connect akamai.com:443 | openssl x509 -noout -enddate socket: Bad file descriptor connect:errno=9 unable to load certificate... (0 Replies)
Discussion started by: raghur77
0 Replies

2. Shell Programming and Scripting

How to check the IP:PORT firewall uses?

I have my firewall process running # ps -ef | grep firewall root 21169 1 0 08:50 ? 00:00:00 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid I wish to know what ip : port number it is using. Can you please tell me how can i find out ? I tried the below command... (4 Replies)
Discussion started by: mohtashims
4 Replies

3. Linux

Apache wildcard ssl on subdomain serves same page for non ssl virtualhosts

Issue observed: I have configured ng.my-site.com using widlcard ssl cert. When I hit https://www.my-site.com it loads ng.my-site.com website! please advise if I missed any concept / configs... Thank you! httpd.conf <VirtualHost *:80> ServerName www.my-site.com ServerAdmin... (0 Replies)
Discussion started by: ashokvpp
0 Replies

4. Shell Programming and Scripting

How to check UDP port example = 31011?

We have open port UDP port 31011, how to verify if port were working or traffic were receive. (2 Replies)
Discussion started by: avtalan
2 Replies

5. Shell Programming and Scripting

Perl- check the port used

hi everybody; my code is cheking if a port is an actif or not with the cmd netstat -ln,I want first to enter the number of the port which I want to check it but I think that the value of $con in the second "if" is always "0" so the code give me always that the port is not used!!! ... (5 Replies)
Discussion started by: bassma
5 Replies

6. Web Development

Apache, cgi script run twice when ssl, once when not ssl

I have interesting problem. https:/host/some/x.cgi - this script has run twice when I call this url But http:/host/some/x.cgi work fine, only once. Output is text/plain. If I change output format to the Content-type text/html, then both urls works fine - executed only once. (2 Replies)
Discussion started by: kshji
2 Replies

7. Shell Programming and Scripting

How to check if a Port is accepting connections.

Hi, I need to create a script which checks the availability of a particular service on a particular Port on HP-Unix. Is there any command in unix wherein we can check if any port is accepting the connections now. Thanks, Vihang. (5 Replies)
Discussion started by: vikings.svnit
5 Replies

8. UNIX for Dummies Questions & Answers

How do you check whether a port currently being used?

Hi, Please help me out, how to check whether a port currently being used or not. is there any command which give the result? Thanks Rajesh (6 Replies)
Discussion started by: rajesh08
6 Replies

9. UNIX for Dummies Questions & Answers

to enable POP3(ssl) and SMTP(ssl) in Squid

i have configured Squid proxy server in Fedora 8 with two network interfaces. HTTP, HTTPS, FTP are working fine but we are unable to download mails using mail clients from mail server with POP3(ssl) and SMTP(ssl). so please someone help us how to enable pop and smtp in Squid. (1 Reply)
Discussion started by: praneel2k
1 Replies

10. IP Networking

how can i check if port is busy or if someone is using it ?

Hello i have application that using ports , how can i check if the port im using is not captured by any applications? (1 Reply)
Discussion started by: umen
1 Replies
Login or Register to Ask a Question