I'm trying to use telnet to check if the port of an application is open.
But i'm receiving the following error:
Connecting To 192.168.1.10...Could not open connection to the host, on port 3001: Connect failed
I assume the port is closed, but is it also possible the port is being in use by another program? Hence why i'm not able to test using telnet?
Now if this is the case, how come some ports allow simultaneous connections from clients and some don't?
All ports allow simultaneous connections from clients when some program is listing on that port. Connect failed means that the port is not listening or a firewall interfered.
You can find out if that port is open by using netstat or on Windows tcpview.
Related
I have a java program that uses SQL queries. The goal is to send them from my home PC to a workstation on a different network elsewhere.
The SQL server is on Windows Server and I opened port 1433 for inbound connections. From that computer, I can successfully ping the port. However, I can't ping the port from the public ip address, only the local (192.168...), so it doesn't work if I were to try to ping it from my home computer.
Is there a way that I can ping it from my home computer? If so, how would I specify the address for JDBC?
Thanks!
It sounds like your Windows Server is behind an internet gateway/router. You need to configure the gateway to allow and forward inbound connections to TCP port 1433 to the IP of the computer that has SQL Server installed.
Here are some guides that explain how to enable port forwarding on different devices:
How to Forward Ports on Your Router (lifewire.com)
How to Port Forward (No-IP.com)
Also, note that we can ping IP addresses, not ports.
One way to quickly test the first-order functionality of a web server is to use the application layer tool Telnet, e.g. How to send an HTTP request using Telnet.
This is the usage I am most familiar with, but today I learned there is such a thing as a Telnet server: https://askubuntu.com/questions/668725/how-can-the-telnet-service-on-ubuntu-server-14-04-lts-be-enabled, which listens on the well-known port 23 and can be used (though not usually, due to its lack of security) as a remote shell.
I am trying to understand if a Telnet server is necessary if I use it to connect to an HTTP server on port 80, e.g.,
telnet 192.168.0.5 80
Does the Telnet client first connect to the telnet server on port 23, then somehow the server's Telnet process then establish a connection to port 80 on localhost? Or does the client directly connect to the HTTP server (or some other TCP/IP server, for that matter) on 80, without need the Telnet server to be present at all?
I could not immediately find a piece of Telnet documentation that explains how Telnet works in this regard; their scarcity might be attributed to Telnet's lack of security...
I have a Windows 2008 R2 server that will need to listen on a particular port (e.g. 1234) in order for an application upgrade to work, but currently the application doesn't have a listener service configured for port 1234.
Our firewall is managed by a third party, but I would like to check in advance that the port 1234 has been opened before I install the update. Is this possible?
I know I can telnet to the server on other listening ports, but as this server has no application listening to 1234 I can't be certain that it is in fact, open. Telnet results are inconsistent when connecting to ports that are apparently listening in netstat.
Is there anything I can do in Powershell or VB for instance, to set up a listener for port 1234 in advance of the upgrade to ensure it will go smoothly?
Many thanks in advance.
Anything that accepts traffic would work.
Run some other service on port 1234 and see if you can connect to that.
Use a network sniffer like WireShark on the server and see if you're getting connection attempts to port 1234.
Install netcat on the server and tell it to listen to port 1234 then connect to that port on the firewall. If it connects, the port is open. (This is really the same as #1 but without an actual service.)
I am running out of Ideas. I did look for others similar subject but almost all suggest firewall or checking if program is really listening on this port.
Because my internet provider su__, their equipment can not forward port 80, I am running my Apache on port 10080, later also try 10081. Because the page never opened I started to investigate with Wireshark. I get some record on this port so I continue testing with writing own TCPServer and TCPClient. I am using the same code except for host and port. In console I get error:
SocketException: System.Net.Sockets.SocketException (0x80004005): No
connection could be made because the target machine actively refused
it 193.77..:10080 at System.Net.Sockets.TcpClient..ctor(String
hostname, Int32 port) at Client.Program.Connect(String server,
String message) in d:\Projekti\ASP.N
ET\Tests\Client\Client\Program.cs:line 33
At this point I can say, that Apache and demo program worked when using for host localhost, but not when I use home.mydomain.si. Of course subdomain is routed to my static ip (because remote desktop is working). Both ports are routed to 192.168.1.27. I use static IP not DHCP.
I add exception for inbound and outbound rules for port 10080 and 10081. Then I even disable firewall. No antivirus is installed. Using Windows 7. Netstat shows that someone is listening on port 10080. Wireshark shows some activity on port 10080. Screenshot Wireshark is for TCPListener program not Apache.
Please share some ideas. I am desperate.
On Linux, when I connect from telnet from one server (client telnet) to another (there isn't telnet server) I can connect on port, which I specify (not default for telnet 23 port). I get:
Connected to myserver (ip adress).
Escape character is '^]'.
Why, despite I haven't telnet server, I can connect with telnet client?
You can telnet to any opening TCP port, because that only means a normal TCP connection initiation work has done.
And your input will be treated as raw data, what happens to the data depends on the program which opened that TCP port, normally as soon as it determined the client side is not sending correct data it will disconnect.