LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2018, 05:56 AM   #1
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Rep: Reputation: Disabled
How to make sure 443 port is open


I will install SSL cert to my web server .

Before I install SSL cert , I would like to confirm our firewall is opened 443 port , to make sure internet can pass through our firewall with 443 port , the reason to do such test is if it is not opened , then ask the network admin to open it .

Would suggest how to do such test ?
 
Old 10-24-2018, 06:06 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
https://is.gd/LGXhHH

what did you try already?
 
Old 10-24-2018, 06:13 AM   #3
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
Are you talking about the port being open on the server itself, or the port being opened on an external firewall, for example? The simplest way to try is from an external host, telnet to your target host on port 443. If you connect, then it is opened.
 
Old 10-24-2018, 07:38 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by catiewong View Post
...the reason to do such test is if it is not opened , then ask the network admin to open it .
Ask the network admin if it is open...?
 
Old 10-24-2018, 08:02 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by catiewong View Post

Would suggest how to do such test ?
Try to access the port. If there is not answer at all, it’s probably closed. If you get “connection refused”, the port is open, but no process is listening.

Or use netcat to listen:
Code:
nc -l 443
then connect from outside and see if the connection goes through.

Best to ask the network admin though. Who knows, perhaps the port is open today and closed tomorrow.
 
Old 10-24-2018, 09:42 AM   #6
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
Catiewong, if you are talking about an external firewall, you can certainly ask the firewall admins if that port is open. However, if you don't have anything listening on your server on port 443, then testing is meaningless. The port might be open on the firewall, but your test will fail if nothing is listening.
 
Old 10-24-2018, 05:11 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://portchecker.co

443 may not be opened until after the cert is installed.
 
Old 10-24-2018, 05:34 PM   #8
average_user
Member
 
Registered: Dec 2010
Location: Warsaw, Poland
Distribution: Slackware
Posts: 560

Rep: Reputation: 220Reputation: 220Reputation: 220
You can also use nmap to check if a port is open on a given host, for example:
Code:
$ nmap www.linuxquestions.org -p 443

Starting Nmap 7.12 ( https://nmap.org ) at 2018-10-25 00:34 CEST
Nmap scan report for www.linuxquestions.org (75.126.162.205)
Host is up (0.15s latency).
PORT    STATE SERVICE
443/tcp open  https

Nmap done: 1 IP address (1 host up) scanned in 0.51 seconds
 
1 members found this post helpful.
Old 10-25-2018, 01:22 AM   #9
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by average_user View Post
You can also use nmap to check if a port is open on a given host, for example:
Code:
$ nmap www.linuxquestions.org -p 443

Starting Nmap 7.12 ( https://nmap.org ) at 2018-10-25 00:34 CEST
Nmap scan report for www.linuxquestions.org (75.126.162.205)
Host is up (0.15s latency).
PORT    STATE SERVICE
443/tcp open  https

Nmap done: 1 IP address (1 host up) scanned in 0.51 seconds
if I would like to test the 443 pass through the firewall instead of localhost test , how to do it ?
 
Old 10-25-2018, 08:19 PM   #10
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Exclamation

Quote:
Originally Posted by catiewong View Post
if I would like to test the 443 pass through the firewall instead of localhost test , how to do it ?
you want to know whether the port is open to the Internet?

If yes, try this site: https://www.portchecktool.com/

It will check whether the port is open on the firewall.

Of course, the port will only be open if proper configuration has been done on the firewall or router.
 
Old 10-25-2018, 10:50 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As above, from the outside try the telnet client cmd or nmap - amongst others.

From on the machine, as root, "netstat -tanp|grep 443 " to see if anything is listening.

To look at the host firewall, it may depend on the distro & version, but (as root) "iptables -nvL " definitely works on RHEL derived systems.
 
Old 10-25-2018, 11:29 PM   #12
ibaydan
Member
 
Registered: Jan 2008
Distribution: Debian6 , Centos 6,Ubuntu 11.04
Posts: 57

Rep: Reputation: 2
Use following command.

$ nmap 192.168.1.1 -p 443

For more information check following tutorial.

https://www.poftut.com/how-to-check-...stat-in-linux/
 
Old 10-26-2018, 01:11 AM   #13
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Get carried away with the port forwarding, but I think since you are browsing Linuxquestions.org.

Most probably port 443 is open, since LQ uses https.

HTTP = port 80

HTTPS = port 443

If you are browsing with sites with https, then it's confirmed 443 is open.
 
Old 10-26-2018, 03:38 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Quote:
Originally Posted by catiewong View Post
if I would like to test the 443 pass through the firewall instead of localhost test , how to do it ?
you cannot check pass through in general.
What you can do is to start an app which listens on the specified port and uses a tool from another host to check if someone gives a response from that given host/port.

If there was no app running and listening - you will get no answer.
If there was a firewall in the middle, which blocks the traffic - you will get no answer.
if there was an authentication issue anywhere - you will get no answer.
if there was a DNS related error - [probably] you will get no answer.

How to know if everything is ok? Actually it is simple, you will get a correct answer.
How to know if firewall was configured properly? Actually simple again, if you really know there is a firewall in between (the client and server) and you will get a correct answer (otherwise firewall can be totally transparent, so probably you cannot decide if there was a firewall [or more] put somewhere at all).
 
Old 10-26-2018, 04:07 AM   #15
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by pan64 View Post
If there was no app running and listening - you will get no answer.
That is not quite correct. If there is no firewall blocking 443, the server will reply with an ICMP message, actively rejecting the connection request. The error message is usually something like "connection refused". This is different from the case where port 443 is blocked; in this case, the server appears not to exist, and you get "no route to host".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Port 443 Cent OS recommendation for multiple network interfaces asteroid4u Linux - Server 2 09-12-2017 08:10 AM
Check port open status for port 443 asteroid4u Linux - Server 8 07-06-2017 09:56 PM
Open port 443, ufw, via ssh knottulf Linux - Server 7 11-15-2016 05:55 AM
[SOLVED] Port 443 - HTTPS is Open cwizardone Slackware 2 07-13-2013 02:13 PM
How To Open Port 443 On RedHat 7.1 sc300t Linux - General 4 02-07-2002 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration