New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How do I check if a port is open
I am installing ssl certificates on a few of my vps. I've already installed two and everything works great. those vps are on debian. I have a vps on centos but when I install the ssl and test it, I get a 102 connection error in chrome.
I think my configuration is correct, but I want to see if the ssl port is open. the tool I found on Google says port 80 was closed so I figured I couldn't trust it.
anyone know how I can check if a port is open?
Comments
netstat is your best friend
When can't test them directly from any of my other machines (telnet, hping3, nc, etc.) I use the online check of Gibson Research, ShieldsUP!
There you can test directly common ports or custom groups of ports also. It's quite handy.
Edit: Oh! If you get a 102 error then I think that should be open since a 1xx error is informational, but jarland is right that
netstat -ln
is your command. But don't forget the firewall.Try my simple port check tool, SSL or in this case HTTPS I think would be port 443
http://www.risharde.com/portcheckutility.html
You'll have to visit the website while on the VPS you want to check btw.
Good luck
netstat -ln
. If it shows up in the list, something is accepting connections for it.You can grep for your :portnumber too, if you have a lot of connections open.
Netstat -ln | grep portno
the good old way, telnet
telnet [ip of host] [port]
in cmd
But if you want to see from the vps/server itself, then ye netstat is your friend.
regards,
R. Alkhaili
telnet targetipadddress 443 .. (443 is the default port for SSL) from ur source machine
If u get something like escape character .. it means your SSL port is open.. however if it says connecting .. for long time . it means SSL port is closed
lsof -i:port number
nmap -p xx hostname
great thanks. nmap worked.
It shows the port as closed. I don't know how to open it. My firewall (iptables has been stopped) I'm wondering how to open a port that I didn't close. I'm using centos with lnmp installation script.
Does anyone know how to open the port?
To open port via iptables you can use the command as :-
iptables -I INPUT -p tcp --dport 25 -j ACCEPT
iptables -I OUTPUT -p tcp --dport 25 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart