Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1774
  • Last Modified:

Connection from Linux Server by telnet connection closed by foreign host

We want to send e-mail from a Linux server through an Exchange server so we don't have to add also users at the Linux system and have 2 mailservers.

However if we want to start an telnet session from a linux we get the following error:
connection closed by foreign host
----------------------------------------------
If we do a telnet from an Windows 2000 server we get a good reply from the Mailserver and can create helo domain.nl etc

thanks

Casper Lammertink
0
clammertink
Asked:
clammertink
  • 15
  • 13
2 Solutions
 
robrandonCommented:
Make sure you are telnetting on port 25 from the linux box.
0
 
clammertinkAuthor Commented:
we did that we did:

telnet 192.9.101.3 25
0
 
robrandonCommented:
Can the mail server do a reverse lookup on the linux box's IP?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
clammertinkAuthor Commented:
? it replies on a ping... or unc path
0
 
robrandonCommented:
I think in some instances, it will try to resolve the IP back to the linux boxes name.  If you run the following command on the mail server, does it return the name of the Linux box:

NSLOOKUP <ip of linux box>

0
 
clammertinkAuthor Commented:
it gives an reply with the linux server name
0
 
robrandonCommented:
Check out the properties of the SMTP virtual server and see if the list is restricted to certain IP's.  If it is, confirm the IP of your linux box is in there.

0
 
clammertinkAuthor Commented:
Checked that on the relay button i added the linux box
0
 
clammertinkAuthor Commented:
sorry i meant did that aldready so that cant be the problem
0
 
robrandonCommented:
Is there any type of network security in place that can be doing it like an IDS?

I don't recall if you need to restart a service or not for that change to take effect.
0
 
clammertinkAuthor Commented:
IDS can't block it because both servers are running on the inside.

Services of smtp where already restarted
0
 
robrandonCommented:
Can your switches be doing something?

Something is dropping that connection.  If it's not the SMTP Virtual server, or something else on the server, then it has to be something on the network.

0
 
clammertinkAuthor Commented:
Its so strange, because from other (windows) stations which are not in the domain I can make a telnet to the server
0
 
robrandonCommented:
Is it possible to take the Linux box offline for a few minutes, set one of the windows boxes to the same IP as the Linux box, connect it to the network in the same fashion, and then try to telnet?  That would eliminate any type of networking issue.

0
 
clammertinkAuthor Commented:
that is difficult as it is an ecommerce server...
0
 
clammertinkAuthor Commented:
could we try something else?
According to me it can not be a ip that's been blocked...
0
 
robrandonCommented:
How soon after initiating the connection does it close?  Can you provide the exact output from the connection?

0
 
clammertinkAuthor Commented:
almost directly
connection closed by foreign host
0
 
robrandonCommented:
So you don't even get to enter anything at the prompt?  Do you get a hello message or anything?
0
 
robrandonCommented:
Go to the properties of the SMTP Virtual Server and click on the Access Tab.  Check the authentication settings there.
0
 
clammertinkAuthor Commented:
on the linux i dont receive the helo or name of exchange server message
The following  items are marked under that tab:

Anonymous access
Basic authentication
Integrated Windows Authentiacation
0
 
clammertinkAuthor Commented:
any ideas
0
 
robrandonCommented:
I don't think the connection is even opening, even though it says it was "closed" by foreign host.

I was wondering if it was a security setting that was stopping it, but with anonymous access enabled, it should be ok.  Anything else you can find in the access tab that would prevent/allow your linux computer to telnet in?

0
 
clammertinkAuthor Commented:
nope
can it also be a problem in the linux box?
At the customer side we are controlling the windows enviroment, gateway protection, firewall, but not the linux server
0
 
robrandonCommented:
I don't know much about linux, but I would imagine telnet is telnet.  Can the linux box telnet to other systems?
0
 
clammertinkAuthor Commented:
that i didn't ask. But like i told in an post earlier, we can telnet from another window box that is even outside the domain(of course in the same subnet)
0
 
clammertinkAuthor Commented:
the problem was the subnet mask on the linux server!
We dont control that server on the customerside... :-(
0
 
robrandonCommented:
Interesting.

Guess everything is working now.  You can probably request to get the question closed with points refunded.  No objection here.

0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 15
  • 13
Tackle projects and never again get stuck behind a technical roadblock.
Join Now