Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

telnet between 2 servers

Status
Not open for further replies.

dupas

Technical User
Aug 19, 2006
79
US
I have a brain fart here...

Im trying to communicate (telnet) between 2 servers using port 25... How do I make this work?
 
tried it, didnt work... how do I open the port for the 2 to work?
 
I thought you could only telnet thru certain ports, like 23, 443, 21, unless it was an Exchange server. Why do you want to connect via poprt 25 and not 23?
 
Are there routers or firewalls between the servers (it seems obvious that there must be)? So to get this to work, you will need to configure them (the routers and firewalls) to forward the port (in the case of the routers) and accept the port (in the case of the firewalls). Probably you have a firewall blocking this port unless you are behind a commercial router or IP that doesn’t forward that port.

Finally, you will have to configure the telnet servers on both machines for the port you want to use(well at least the machine you are trying to connect to).

So for a proper answer it seems like there must be a lot more information provided (like the connection between the servers and probably the OS/firewall on the machines itself).

As for the possible ports to use for telnet . . . telnet is merely a protocol and a port is merely an address. There is no reason telnet wouldn't/couldn't be supported on any port.

The reason the port is/was standardized is/was to make configuration and use widely "easy".

I would say though it is folly to use telnet at all - unless maybe you are not connected to any public network at all (or at least the ports in question should be blocked from any public network). Rather, consider using SSH.
 
As for the possible ports to use for telnet . . . telnet is merely a protocol and a port is merely an address. There is no reason telnet wouldn't/couldn't be supported on any port.

The reason the port is/was standardized is/was to make configuration and use widely "easy".

Telnet is an application layer protocol, the port is defined at layer 4. The reason it is defined is so that Applications written to use telnet know which port to accept data streams on. If you change the port, you will have to have an application that supports that port, and allows for communications.

UnaBomber
ccnp mcse2k
 
fartingfrog :
It is the exchange server Im trying to telnet into from another server which of course isnt exchange server. I have a web server with a program on it trying to email out of, which is looking for the SMTP server to do so. Cant find it... If I cant telnet into the SMTP server, the email wont work properly.

rcp032:
There is no router between the 2 servers... They are on the same subnet... There is a router before all of the servers though which shouldnt really affect the internal handshake?
The OS firewall is turned off due to the router upfront. I just want to see if they can talk to eachother through port 25. If so then this program that I have trying to email forms out should work properly due to it being able to see/talk to the SMTP server.

Thanks!
 
UnaBomber:
Telnet is an application layer protocol, the port is defined at layer 4. The reason it is defined is so that Applications written to use telnet know which port to accept data streams on. If you change the port, you will have to have an application that supports that port, and allows for communications.

Yeah, like every application written for either Windows or Linux. Do you know of one which is uselessly fixed to a single port? With Putty, for example you can Telnet on any port whose address is not too wide to be represented in Putty or more probably the width limited by TCP itself (layer 4), whatever that may truly be.

Thats why I specifically mentioned the server would have to be configured for the proper port.

dupas
I just want to see if they can talk to eachother through port 25. If so then this program that I have trying to email forms out should work properly due to it being able to see/talk to the SMTP server.

Oh, sorry dupas, but I have to say what you're trying to do is much more difficult than it is worth doing. The Port number is simply an sub-address on the machines themselves, there is no need to test the “port”.

Think of it like this. There is a college with an address 123 main street, anytown USA and you want to send a professor at that college a telegram. You don’t know the professors name, but you do know he teaches SNMP in room 25.

So you send him a message with an SNMP question to room 25 and hope that he sends a response. OK, in this case, you don’t hear back from him. What you are trying to do now is send a Telnet question to room 25 instead. Well, the problem is, the professor that teaches Telnet is usually in room 23 – so why would you send him a telegram in room 25? You wouldn’t.

That is to say, obviously you are trying to test your method of communication (or more specifically the address for the college) but you have to test a known proper configuration. You have two choices really – call the college and ask the telnet professor to go to room 25 and wait for a telegram, or send a telnet telegram to room 23 and see if you hear back from him.

In this case though, the telnet professor has probably been fired for chasing the female students, so don’t expect a response from him. Rather you should try the SSH professor in room 22 (he is more politically correct and should still be working there). If you don’t know if any professors are really there or even if the school is in session, but you still want to test the address, you can’t send your telegram to administrator PING – he is always there making sure things run smoothly.

So here is the point, if you can ping one machine from another, there is no point trying to Telnet or SSH or SMTP to test the connection. The one thing they have in common is TCP/IP and if it works for PING it will work for the other protocols (that is after all specifically what ping is for). If PING is working and SMTP is not, then either your SMTP server or client is not configured properly. Using Telnet will tell you nothing new and might not be installed and definitely is not configured properly to use port 25.

Haha – did I make that too long?

OK - the short version. Trying pinging one machine from the other. If that works and neither are using a fire wall (make sure there really is no firewall) then your next step is checking the configuration for both the SMTP server and the SMTP client.

 
Yeah, like every application written for either Windows or Linux. Do you know of one which is uselessly fixed to a single port?

Application Yes
Protocol No

UnaBomber
ccnp mcse2k
 
So here is the point, if you can ping one machine from another, there is no point trying to Telnet or SSH or SMTP to test the connection. The one thing they have in common is TCP/IP and if it works for PING it will work for the other protocols (that is after all specifically what ping is for). If PING is working and SMTP is not, then either your SMTP server or client is not configured properly. Using Telnet will tell you nothing new and might not be installed and definitely is not configured properly to use port 25."

Ping is not TCP. It uses ICMP which is *completely* different. Whether or not you can ping a remote computer is unrelated to whether you can connect to the same computer in another way. Ping and traceroute, *if* the required ICMP functons are permitted end-to-end, will tell you if the remote system is up or, if not, where the connection failure lies. These are definitely the first-line tools to troubleshoot network issues, but I have many systems that I cannot ping but which are normally. This is by design.

I commonly use telnet to check remote ports. It's more informative, and faster, than sending an email and waiting to see if it went through.

"telnet ipaddress 25" (no configuration needed) should return with a banner. If it doesn't, then it might do a couple of things:
1. Telnet will hang and give up after a while, which means that port 25 is not available on the target. Maybe the mail server isn't running, or it's not listening on the network address that you used.

2. Telnet might immediately close the connection. This indicates that something is actively blocking your connection, such as an access list or firewall rule.

Telnet is an invaluable for quickly testing and troubleshooting TCP services, not simply for opening a remote console session.
 
I just want to make server1 (expedition program) able to connect to server2 (SMTP server) so server1 can email forms to other clients outside the company. I set the program up on server1 with the IP address of server2 but when I try to email forms out I get an error message: Cant find SMTP server.

I contacted tech support for this program (expedition) and they told me that if I cant telnet into server2 from server1 with using port 25, emailing with not work for server1.

How can I open port 25 up between the 2 servers. I believe windows firewall isnt running on either server.

Thanks!
 
If there's a Cisco router between the servers, *and* it's blocking SMTP traffic, then you need to add an access-list entry to permit that traffic.

"access-list 101 permit tcp server1 server2 eq 25", for example. This should appear before any ACL entries which block SMTP.

Then, you should be able to telnet to the remote server on port 25.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top