Network probs

pxl8

Suspended / Banned
Messages
5,288
Name
Andy Jones
Edit My Images
Yes
Hi,

This one has got me stumped.

I run one machine as a general server including MDaemon to handle email for a couple of domains. I've got a dynamic IP and have added an entry in the zone file for updating the IP. That way email comes directly to my server so I can better deal with spam, etc.

So far so good.

Now I wanted to use my laptop to read email via IMAP. If I enter the lan ip for the server is works no problem but if I use the host name or even my current IP it fails with an unable to connect error.

I've opened port 143 in the router and confirmed it is open so I'm a bit stumped as to why I can connect using the lan IP but not the WAN IP.

Any thoughts, ideas, suggestions?
 
DNS my man ! :)

Put the host name and IP address in the Hosts file in c:\windows\system32\drivers\etc\hosts

It has no extension and MUST NOT BE SAVED WITH ONE !

so

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
192.168.1.x domainname (put this line in with your details)
 
If you are running VPN or similar then when you are connected it "overlays" the VPN domain over your local (home) domain. This means that IMAP doesnt see a local host controller, but the VPN DNS server and doesnt connect.
 
Hosts file isn't the problem, it's a dynamic IP anyway.

No VPN or similar.

I can reach the router config page by going to dsl.mydomain.tld but I can't access the mail server that way. I've configured the router to map port 143 to the lan IP of the server and that works fine for external connections.

A simpler test was to telnet to the server so:

telnet 10.0.0.16 143

works fine but

telnet dsl.mydomain.tld 143

gives a connect failed error.

I can ping both with no problems and the name resolves correctly.

I suspect it's a router setting somewhere as I can reach port 80 on dsl.mydomain.tld which is handled by the router but it seems to be preventing me getting any further.
 
So, is the mail server within your network ? ie behind the router? or outside on another site ?

If you can connect to the mailserver by ip address and not by hostname its a DNS issue, which can be resolved by the Hosts file on the laptop

entry would be

10.0.0.16 dsl.mydomain.ltd

have you tried this and confirmed it doesnt work ?

Just trying to understand exactly how this is setup, you have a router, connected to a mail server and your laptop? or is the server somewhere else ? and only your router and laptop are with you ? the laptop can connect to the mail server by ip address but not by name ?
 
The mail server is running behind the router on one of my machines. Using hosts won't help as I want to be able to connect via the laptop from anywhere.

I suspect it would work if I was testing from another connection but I was hoping to have a single config that works from anywhere.

DNS is working - if I go to dsl.mydomain.tld I end up at the router config page.
 
DNS is working - if I go to dsl.mydomain.tld I end up at the router config page.

Maybe thats the problem ? is the router set to IP forward all traffic from the mail ports (ie 143 etc) to the mail server ?

25 Default port for SMTP server
110 Default port for POP3 mail server
119 Default port for NNTP (conference server)
143 Default port for IMAP mail server
389 Default port for LDAP server
563 Default port for NNTP conference server over ssl connection
636 Default port for LDAP server over ssl connection
993 Default port for IMAP mail server over ssl connection
995 Default port for POP3 mail server over ssl connection

Sorry if this is teaching you to suck eggs ! lol just trying to help ! :)

Have you got the external DNS server address in the network properties on the laptop as well ? It may be that its not getting the external DNS resolution ! Clutching at straws now im tired ! lol
 
OK

Have the same setup on my network

What you need is an internal DNS server for your network. this will point all internal IP addresses to their correct domain name. My domain is jensanet.co.uk so I have a dns server that says server.jensanet.co.uk is 10.0.0.1 but if you ping it from there you get a different address as you get the external dns server.

so it will manage the domain internaly only and point all machines that use it to 10.0.0.16 for your smtp. Now set your router (or dhcp server) to use that as the primary dns server for all leases and set your router ip address as the secondry DNS server. Now, when you go out and about you get a different dns servers that will point to the external IP address of your network. That way all works OK.

PM me if you need more details

My DNS is set to Forward

dns table for example. All ammended with jensanet.co.uk when read)

Server 10.0.0.1
printer 10.0.0.7
router 10.0.0.138
mail 216.x.x.x (external mail gateway)
etc (and there is a lot of them)

DHCP config is

10.0.0.50 - 10.0.0.100
lease time - 8 hours
default gateway - 10.0.0.138
Primary DNS 10.0.0.1
secondary DNS - 10.0.0.138 (router)
router - 10.0.0.138


Steve
 
Steve, thanks for that - makes perfect sense :thumbs:
 
Sorry

Just read my own post. I REALLY need to get a life....
 
If an internal DNS server is too much hard work, a Draytek router will re-route requests to it's external (WAN) IP back inside your network.
 
Well in the end I took the simple route and set up two profiles for Thunderbird. One for home that reads my existing profile over a network share and a 2nd that logs on to the IMAP server remotely.
 
At least you got it figured out. Well done :thumbs: :)
 
make sure you are connecting to your own WiFi network and not your neighbours. :)
 
Back
Top