0

We are facing a communication problem between the public and our private network. We have a Linux based web server behind a firewall and an internet router. As part of some integration, our web portal team is trying to Telnet the public IP of an another web portal from these Linux web servers on port 80, but the connection is closed by remote host just in time it says connected.
But same is successful while we try it from a Windows based web server in our network. Everything seems fine, the firewall is passing the traffic.

Does it matter if one end server is running Linux and other end is a Windows server. Because the public IP application server is running Windows server. what are the key points to meet the requirement to make the communication succeed.

Refer the below error logs.

]$ telnet 220.226.190.180 80
Trying 220.226.190.180...
Connected to 220.226.190.180 (220.226.190.180).
Escape character is '^]'.
Connection closed by foreign host.
1
  • "what are the key points to meet the requirement to make the communication succeed." TCP and HTTP are platform-neutral protocols. Microsoft has vendor-specific headers, but the standard is there for everybody.
    – Bratchley
    May 27, 2014 at 19:30

2 Answers 2

3

I tried to connect to your server and there is a short timeout, try this:

user@host:~$ telnet 220.226.190.180 80

And then copy immediately this:

GET / HTTP/1.1
Host: 220.226.190.180
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

...with a blank line at the end. If I do this I get the following answer from your server:

HTTP/1.1 302 MOVED_TEMPORARILY
Server: Pramati Server/6.5SP1 [Servlet/2.5 JSP/2.1]
Date: Tue, 27 May 2014 11:59:17 GMT
Connection: Keep-Alive
Location: http://220.226.190.180/TinxsysInternetWeb/index.jsp
Content-Length: 0

That's ok, but telnet does not redirect by itself. If you do another request with that content (again, don't forget the blank line at the end):

GET /TinxsysInternetWeb/index.jsp HTTP/1.1
Host: 220.226.190.180
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

...you will recieve the HTML page correctly.

0

Connecting with a linux telnet client and windows xp telnet client gives exactly the same result: in both cases the server closes the connection after a timeout of about 3 seconds. The windows xp client does not indicate that the tcp connection has closed however (at least not for a while) and if you type something will start a new tcp connection automatically. Someone who knows more may be able to tell you how to reproduce this behaviour with the linux telnet client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.