# Unable to connect to nt server

## activ

I have a server Running nt 4 server, it handles my mail for the time being.

Windows clients have no trouble getting mail from that server (using imap).

Now I try to use kmail and evoltution to get the mail and it can't connect.

Also I've tried to logon to it using samba and it's unable to connect, I am able to ping the server.

----------

## ckdake

Are firewalls set up on any of your machines?  Are they all on the same subnet?  Post some more information and more specific error messages and someone may be able to help.

----------

## activ

The specific error message from kmail is "could not connect to host 10.0.0.103".

No firewall is set up on the mail server and I  am able to get mail from another server with kmail.

Also I have no firewall on my workstation.

----------

## uzik

does your nt 4 mail server want to validate the user?

Did you try connecting to the mail server using telnet and simulating

an IMAP session and see if you can get a clue what's going on?

I've done this with pop to debug user validation problems before

----------

## activ

hmmm, I cant even telnet to the server.

----------

## devon

Can you console on to the NT server? You should be able to open a DOS window and "netstat -an | more" and make sure IMAP (143/tcp) is running.

----------

## uzik

To test smtp connectivity I went to my linux box and entered

telnet smtp-machine-ip-address 25

since it uses port 25 for that protocol. I don't know the protocol port for imap,

but it should connect and print something. If it refuses connection or does not connect then you know either the firewall on one or more machine is blocking access or the imap server is not running on the machine. if you do get something you might have a user validation issue. If you know how imap works you can type in the appropriate commands and see if it asks for, and or refuses you based on what user name you enter. With SMTP it's fairly easy to do this. Sorry I can't tell you exactly what to do with imap.

----------

## rogue

from your gentoo box telnet to port 143 on the nt machine.  if it connects, then something odd is happening with kmail and evolution.  

if it doesn't connect, try telnetting to 993 which is the imap over ssl port (if you are using ssl)

if neither of those work, can you telnet from windows clients to these ports?  it seems strange that if there is no explicit firewall blocking the gentoo box that this would happen

----------

## activ

Sorry for the late reply. I've been away for a few days.

I've tried telnetting to mentioned ports with no success. Also I've tried to telnet to them from another pc , that does work.

I've also tried to use samba to move files from my laptop to this pc , that worked fine.

So It appears all networking works on both machines but when they get together it doesn't work.

----------

## devon

Are there any access rules on the NT server? Like permitted IPs? Does the Event Log say anything?

----------

## activ

If there are access rules I don't know where to find them.

I checked te event log and there's nothing really important, netwerk card drive reports some downtime but it's not often and not related to my connection attempts.

I now tried to ssh out of the nt server to my pc, that also doens't work (while ssh'ing elsewhere does work)

----------

## devon

 *activ wrote:*   

> I now tried to ssh out of the nt server to my pc, that also doens't work (while ssh'ing elsewhere does work)

 

So you can ssh from your NT server to anywhere but your Gentoo box? Is sshd running on your Gentoo box.  :Smile: 

What does "/sbin/iptables -L" show?

----------

## ben

Maybe something is wrong with the IP level. (if connection is hazardous from AND to the gentoo box)

what gives ifconfig -a on the gentoo box, and ipconfig /all on a dos window on the nt box. It may be a wrong mask .

Ben

----------

## activ

ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:0C:6E:4E:75:05

          inet addr:10.0.0.150  Bcast:10.0.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:26041 errors:3 dropped:0 overruns:0 frame:3

          TX packets:31692 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100

          RX bytes:11009577 (10.4 Mb)  TX bytes:11714285 (11.1 Mb)

          Interrupt:22

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:22 errors:0 dropped:0 overruns:0 frame:0

          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1261 (1.2 Kb)  TX bytes:1261 (1.2 Kb)

ipconfig /all

Hostname .......mail

dnsservers......194.109.6.66

                        194.109.9.99

Node type......hybrid

netbios scope id 

iprouting enabled..no

wins proxy enabled...no

netbios resolution uses dns..no

Ethernet adapter CpqNF31:

Description...Compaq Netflex-3 driver, version 4.31

Physical adress..... (mac adress here)

DHCP enabled...no

ip adress....10.0.0.103

subnet mask...255.255.255.0

default gateway....10.0.0.138

primary wins server...172.192.2.27

secondary wins server...172.192.2.22

----------

## ben

Please allow me to summarize what I understand from your problem:

you have a gentoo box

one or more windows bos (client)

one nt server (email server)

you can ping form everywhere to everywhere

you can telnet imap and imapssl ports to the nt server from windows box but not from gentoo

you can ssh from you nt server to evert host excpet the gentoo one

your ipconfig looks good

your nt box does not ip routing and does not do netbios over dns

So I think the problem may come from the fact that windows relies quite a bit on netbios, but linux does not. So maybe, the server imap wont serve un unkown name (the gentoo box). So you may have to check the server parameter to disable checking the netbios name, or give a netbios name to the gentoo box. I cant help further because I just know enough of netbios to hate it.

HTH

Ben

----------

## devon

 *ben wrote:*   

> So I think the problem may come from the fact that windows relies quite a bit on netbios, but linux does not. So maybe, the server imap wont serve un unkown name (the gentoo box). So you may have to check the server parameter to disable checking the netbios name, or give a netbios name to the gentoo box. I cant help further because I just know enough of netbios to hate it.

 

I was thinking something similar when I saw the WINS servers in his "ipconfig /all". Perhaps the NT box does a lookup for the Gentoo box against the WINS server and then fails when it doesn't find it??

activ, would it be possible to remove those WINS servers to test out that theory?

----------

## rogue

i thought netbios / winns was only for the "network neighborhood" in windows so i'm not sure that's directly relevant.  all the mail stuff should be done over tcp/ip and not through netbios shouldn't it?  it might be worth doing what devon said and removing the WINS servers though.

although if you have samba installed on the gentoo box it might be worth seeing if it can connect to the windows server. or you could just telnet to port 139 and see if it connects.

what does "route" show on the gentoo box and "route print" show on the nt box?  maybe something is screwed up with regards to that

----------

## devon

 *rogue wrote:*   

> i thought netbios / winns was only for the "network neighborhood" in windows so i'm not sure that's directly relevant. all the mail stuff should be done over tcp/ip and not through netbios shouldn't it?

 

One would think, but this is Windows after all.  :Wink: 

It is just a hunch and may not be the problem, but I think it is worth checking out if possible.

----------

## activ

@ben: yes that's a correct summup.

@devon: Yes, I'll try and post the results.

----------

## activ

Weird very weird. I removed the wins'es and rebooted.

I don't know if it's related but I was then able to telnet to the box one time (I tried port 25).

----------

## devon

 *activ wrote:*   

> Weird very weird. I removed the wins'es and rebooted.
> 
> I don't know if it's related but I was then able to telnet to the box one time (I tried port 25).

 

One time and then never again? Or did you only try it once?

Can you put the WINS servers back and then try again? See if it works.  :Smile: 

----------

## activ

I could put the wins adresses back but I don't have any anyway.

I telnettted to port 25 of the mailserver and then did a netstat on it.

That tells me:

Proto    local_adress    foreign_source   state

TCP       mail:smtp         tm3.local           SYN_RECEIVED

Another netstat a few seconds later that message was gone.

----------

## devon

Did you telnet to port 25 from your Gentoo box to the mail server and then do "netstat" on your mail server?

 *Quote:*   

> Proto local_adress foreign_source state
> 
> TCP mail:smtp tm3.local SYN_RECEIVED
> 
> Another netstat a few seconds later that message was gone.

 

Did the connection ever get ESTABLISHED?

----------

## karl420

Did you ever to an

```
iptables -L && iptables -t nat -l
```

On the gentoo box?

Karl

----------

