[Dnsmasq-discuss] A question about host names behind NAT

Chris G cl at isbd.net
Thu Nov 18 10:25:51 GMT 2010


I run a small SoHo network behind a NAT router, all pretty conventional,
nearly all the machines run either Ubuntu Server 10.04 or Xubuntu 10.04.

I run dnsmasq on one of the server machines (called dps - for DNS and
Print Server) to provide DNS and DHCP for the network.

I recently had a problem with Postfix on one of the machines being
unable to send E-Mail to the outside world (an old problem only recently
noticed, it had always been like that) which I have now fixed but, in
the opinion of the Postfix list, the fix is a bodge and contravenes some
rules on zone files etc.  OK, it's on my local network and doesn't
affect anyone else but I'd like to do things right if I can - and it
will probably minimise future problems.

So, I have the following significant computers on the network:- 

    Router - vigor 2820n - 192.168.1.1
    DNS and Print server - dps - 192.168.1.2
    Printer - hp7310 - 192.168.1.3
    Mail and Web server - mws - 192.168.1.4
    Remaining machines get their IP from dps when they start up


/etc/host on dps is as follows:-

    127.0.0.1       localhost

    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    #
    #
    # Systems with static addresses, dnsmasq distributes these to the others
    #
    192.168.1.1 vigor 2820n
    192.168.1.2 dps dps.zbmc.eu
    192.168.1.3 hp7310 HPEDDBB7 HP000D9D068F7D
    192.168.1.4 mws mws.zbmc.eu zbmc.eu dte dte-test dte-mine dte-live dte-orig
    192.168.13.254 2wire BT2700HGV gateway.2wire.net


The problem I had with postfix was that E-Mail sent from dps (which uses
mws as its relayhost) was rejected because zbmc.eu was (at that time) an
'outside' address.  So I added the zbmc.eu entry to 192.168.1.4 in
/etc/hosts and then all was well.

The domain zbmc.eu is mine and the domain is hosted at gandi.net (i.e.
there's a zone file there), I can edit the zone file as needed. At
present it is:-

    dte 10800 IN CNAME zbmc.eu. 
    @ 10800 IN MX 10 zbmc.eu. 
    mws 10800 IN CNAME zbmc.eu. 
    imap 10800 IN CNAME access.mail.gandi.net. 
    www 10800 IN CNAME zbmc.eu. 
    smtp 10800 IN CNAME relay.mail.gandi.net. 
    pop 10800 IN CNAME access.mail.gandi.net. 
    blog 10800 IN CNAME blogs.vip.gandi.net. 
    webmail 10800 IN CNAME agent.mail.gandi.net. 
    @ 10800 IN A 84.45.228.40 
    dte-live 10800 IN CNAME zbmc.eu. 
    dte-mine 10800 IN CNAME zbmc.eu. 
    dte-orig 10800 IN CNAME zbmc.eu. 
    dte-test 10800 IN CNAME zbmc.eu. 

All the dte-xxxx entries are for virtual hosted web servers.

The real issue is around the mws entries.  There isn't a virtual web
server using 'mws' so it's not necessary from that point of view, in
fact I'm not at all sure that I need it at all now - should I delete it?

When I do a 'host mws' on one of my home machines I see:-

    chris$ host mws
    mws.zbmc.eu has address 192.168.1.4
    mws.zbmc.eu is an alias for zbmc.eu.
    mws.zbmc.eu is an alias for zbmc.eu.
    zbmc.eu mail is handled by 10 zbmc.eu.

I guess if I remove mws from the 'outside' zone file all those aliases
and mail records will disappear (and they're what caused my original
Postfix problem).

Is that how things should be - no CNAME record in the outside zone file
should be the same as the name of an actual machine on my LAN behind the
NAT router?

Sorry for such a long E-Mail but there's lots of information bears on
the problem.

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list