Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 .
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.
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.
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.
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
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 ?
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).
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".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.