[Samba] name resolves to public address - should resolve to private... - Samba

This is a discussion on [Samba] name resolves to public address - should resolve to private... - Samba ; On my network I have one Samba PDC (Version 3.0.28 running on FreeBSD 6.3-PRERELEASE), one mail server (FreeBSD + Dovecot + Postfix) and a dozen or so WinXP/Win2K machines. The WinXP/Win2K machines all have static IP addresses. The Windows clients ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: [Samba] name resolves to public address - should resolve to private...

  1. [Samba] name resolves to public address - should resolve to private...


    On my network I have one Samba PDC (Version 3.0.28 running on FreeBSD
    6.3-PRERELEASE), one mail server (FreeBSD + Dovecot + Postfix) and a
    dozen or so WinXP/Win2K machines. The WinXP/Win2K machines all have
    static IP addresses.

    The Windows clients are configured to look up the Samba PDC machine for
    both DNS and WINS. The Windows clients seem to be able to find other
    machines as well as the PDC:

    Z:\>ping pilot-ws

    Pinging pilot-ws [10.10.10.34] with 32 bytes of data:

    Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    Reply from 10.10.10.34: bytes=32 time<1ms TTL=128

    The Windows clients can also find the mail server:

    Z:\>ping mail

    Pinging mail [10.10.10.253] with 32 bytes of data:

    Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    Reply from 10.10.10.253: bytes=32 time<1ms TTL=64

    But, the Windows clients resolve the FQDN of the mail server to the
    public IP address:

    Z:\>ping mail.mycustomer.com

    Pinging mail.mycustomer.com [aaa.bbb.ccc.ddd] with 32 bytes of data:

    Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64

    What I want is that the Windows machines resolve both mail and
    mail.mycustomer.com to 10.10.10.253.

    On the Samba PDC machine in /etc/hosts I have:

    10.10.10.253 mail.mycustomer.com mail

    and the Samba PDC machine resolves mail.mycustomer.com to 10.10.10.253.

    In smb.conf I have:

    wins support = Yes
    dns proxy = No
    name resolve order = wins host lmhosts broadcast

    I would very much appreciate your insight...
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  2. Re: [Samba] name resolves to public address - should resolve to private...

    run a separate BIND9 installation on 10.10.10.34 and have it resolve DNS
    for .34 and .253, and in your dhcpd.conf specify 10.10.10.34 as the DNS
    server.

    Joe Demeny wrote:
    > On my network I have one Samba PDC (Version 3.0.28 running on FreeBSD
    > 6.3-PRERELEASE), one mail server (FreeBSD + Dovecot + Postfix) and a
    > dozen or so WinXP/Win2K machines. The WinXP/Win2K machines all have
    > static IP addresses.
    >
    > The Windows clients are configured to look up the Samba PDC machine for
    > both DNS and WINS. The Windows clients seem to be able to find other
    > machines as well as the PDC:
    >
    > Z:\>ping pilot-ws
    >
    > Pinging pilot-ws [10.10.10.34] with 32 bytes of data:
    >
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    >
    > The Windows clients can also find the mail server:
    >
    > Z:\>ping mail
    >
    > Pinging mail [10.10.10.253] with 32 bytes of data:
    >
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    >
    > But, the Windows clients resolve the FQDN of the mail server to the
    > public IP address:
    >
    > Z:\>ping mail.mycustomer.com
    >
    > Pinging mail.mycustomer.com [aaa.bbb.ccc.ddd] with 32 bytes of data:
    >
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    >
    > What I want is that the Windows machines resolve both mail and
    > mail.mycustomer.com to 10.10.10.253.
    >
    > On the Samba PDC machine in /etc/hosts I have:
    >
    > 10.10.10.253 mail.mycustomer.com mail
    >
    > and the Samba PDC machine resolves mail.mycustomer.com to 10.10.10.253.
    >
    > In smb.conf I have:
    >
    > wins support = Yes
    > dns proxy = No
    > name resolve order = wins host lmhosts broadcast
    >
    > I would very much appreciate your insight...
    >


    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  3. Re: [Samba] name resolves to public address - should resolve toprivate...

    Joe Demeny wrote:
    > On my network I have one Samba PDC (Version 3.0.28 running on FreeBSD
    > 6.3-PRERELEASE), one mail server (FreeBSD + Dovecot + Postfix) and a
    > dozen or so WinXP/Win2K machines. The WinXP/Win2K machines all have
    > static IP addresses.
    >
    > The Windows clients are configured to look up the Samba PDC machine for
    > both DNS and WINS. The Windows clients seem to be able to find other
    > machines as well as the PDC:
    >
    > Z:\>ping pilot-ws
    >
    > Pinging pilot-ws [10.10.10.34] with 32 bytes of data:
    >
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128
    >
    > The Windows clients can also find the mail server:
    >
    > Z:\>ping mail
    >
    > Pinging mail [10.10.10.253] with 32 bytes of data:
    >
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64
    >
    > But, the Windows clients resolve the FQDN of the mail server to the
    > public IP address:
    >
    > Z:\>ping mail.mycustomer.com
    >
    > Pinging mail.mycustomer.com [aaa.bbb.ccc.ddd] with 32 bytes of data:
    >
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64
    >
    > What I want is that the Windows machines resolve both mail and
    > mail.mycustomer.com to 10.10.10.253.
    >
    > On the Samba PDC machine in /etc/hosts I have:
    >
    > 10.10.10.253 mail.mycustomer.com mail
    >
    > and the Samba PDC machine resolves mail.mycustomer.com to 10.10.10.253.
    >
    > In smb.conf I have:
    >
    > wins support = Yes
    > dns proxy = No
    > name resolve order = wins host lmhosts broadcast
    >
    > I would very much appreciate your insight...

    Use lmhosts.

    http://www.onlamp.com/pub/a/onlamp/e...ap7/index.html

    You will have to know where your lmhosts should be by default. I used
    the 'strings' command to see where my install expects it to be.

    strings `which smbd` | grep lmhosts
    ....bunch of stuff omitted....
    /etc/samba/lmhosts

  4. Re: [Samba] name resolves to public address - should resolve to private...

    On Wednesday 07 May 2008 05:08:24 pm you wrote:
    > run a separate BIND9 installation on 10.10.10.34 and have it resolve DNS
    > for .34 and .253, and in your dhcpd.conf specify 10.10.10.34 as the DNS
    > server.
    >
    > Joe Demeny wrote:
    > > [...]


    Well, the Windows workstations all have static addresses and 10.10.10.34 is a
    Windows workstation.

    It seems that Samba is ignoring the name resolve order = wins host lmhosts
    broadcast directive - I must be missing something trivial...

    --
    Joe Demeny
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  5. RE: [Samba] name resolves to public address - should resolveto private...



    > -----Original Message-----
    > From: samba-bounces+dmcleod=foranyauto.com@lists.samba.org
    > [mailto:samba-bounces+dmcleod=foranyauto.com@lists.samba.org]
    > On Behalf Of Joe Demeny
    > Sent: Thursday, May 08, 2008 8:07 AM
    > To: Adam Williams
    > Cc: samba@lists.samba.org
    > Subject: Re: [Samba] name resolves to public address - should
    > resolveto private...
    >
    > On Wednesday 07 May 2008 05:08:24 pm you wrote:
    > > run a separate BIND9 installation on 10.10.10.34 and have

    > it resolve
    > > DNS for .34 and .253, and in your dhcpd.conf specify 10.10.10.34 as
    > > the DNS server.
    > >
    > > Joe Demeny wrote:
    > > > [...]

    >
    > Well, the Windows workstations all have static addresses and
    > 10.10.10.34 is a Windows workstation.
    >
    > It seems that Samba is ignoring the name resolve order = wins
    > host lmhosts broadcast directive - I must be missing
    > something trivial...
    >
    > --
    > Joe Demeny
    > --
    > To unsubscribe from this list go to the following URL and read the
    > instructions: https://lists.samba.org/mailman/listinfo/samba




    Put the information in the hosts file on the windows machines.
    C:\WINDOWS\system32\drivers\etc\hosts
    Add:
    10.10.10.253 mail.mycustomer.com





    Or, if you are running your own DNS server, use bind views...


    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  6. Re: [Samba] name resolves to public address - should resolve to private...

    On Wednesday 07 May 2008, Joe Demeny wrote:
    > The Windows clients are configured to look up the Samba PDC machine
    > for both DNS and WINS. The Windows clients seem to be able to find
    > other machines as well as the PDC:
    >
    > Z:\>ping pilot-ws
    >
    > Pinging pilot-ws [10.10.10.34] with 32 bytes of data:
    >
    > Reply from 10.10.10.34: bytes=32 time<1ms TTL=128

    ...
    > Z:\>ping mail
    >
    > Pinging mail [10.10.10.253] with 32 bytes of data:
    >
    > Reply from 10.10.10.253: bytes=32 time<1ms TTL=64

    ...
    > Z:\>ping mail.mycustomer.com
    >
    > Pinging mail.mycustomer.com [aaa.bbb.ccc.ddd] with 32 bytes of data:
    >
    > Reply from aaa.bbb.ccc.ddd: bytes=32 time<1ms TTL=64


    This is because "mail" is most likely the systems netbios name and
    therefore the registered netbios name in the WINS database, a dotted
    domain name name is unusual as a netbios name but "mail.mycustomer.com"
    wouldn't be a proper one as it is too long. So "mail.mycustomer.com"
    will always be a domain (hosts/DNS) type lookup - the systems are not
    asking Samba for such resolution.

    > What I want is that the Windows machines resolve both mail and
    > mail.mycustomer.com to 10.10.10.253.
    >
    > On the Samba PDC machine in /etc/hosts I have:
    >
    > 10.10.10.253 * *mail.mycustomer.com *mail


    As Dennis mentioned you can use the "hosts" file in Windows as well - it
    will, in most cases be searched first for such name resolution (as it
    is in 'nix).

    > In smb.conf I have:
    >
    > * * wins support = Yes
    > * * dns proxy = No
    > * * name resolve order = wins host lmhosts broadcast

    That's only a directive for the running Samba's own lookups - it doesn't
    propagate to to clients.

    Best solution, if your DNS handles outside requests as well, is to use
    split horizon DNS (BIND views, as Dennis mentioned, if using that
    product).

    --
    Chris
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  7. Re: [Samba] name resolves to public address - should resolve to private...

    On Thursday 08 May 2008 12:00:56 pm Chris Smith wrote:
    > [...]
    >
    > ...
    >
    > > [...]

    >
    > > What I want is that the Windows machines resolve both mail and
    > > mail.mycustomer.com to 10.10.10.253.
    > >
    > > On the Samba PDC machine in /etc/hosts I have:
    > >
    > > 10.10.10.253 * *mail.mycustomer.com *mail

    >
    > As Dennis mentioned you can use the "hosts" file in Windows as well - it
    > will, in most cases be searched first for such name resolution (as it
    > is in 'nix).


    Thank you both...

    > > In smb.conf I have:
    > >
    > > * * wins support = Yes
    > > * * dns proxy = No
    > > * * name resolve order = wins host lmhosts broadcast

    >
    > That's only a directive for the running Samba's own lookups - it doesn't
    > propagate to to clients.


    I guess this is they key piece I missed; I was under the impression that "name
    resolve order" applies to workstations...

    > Best solution, if your DNS handles outside requests as well, is to use
    > split horizon DNS (BIND views, as Dennis mentioned, if using that
    > product).


    I see... let me ask, just to make it clear for myself: Is there any knob in
    Samba which could tell the Windows workstations "look at WINS first, look at
    my /etc/hosts second, then ask the DNS resolver"?

    --
    Joe Demeny
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  8. Re: [Samba] name resolves to public address - should resolve to private...

    On Friday 09 May 2008, Joe Demeny wrote:
    > I see... let me ask, just to make it clear for myself: Is there any
    > knob in Samba which could tell the Windows workstations "look at WINS
    > first, look at my /etc/hosts second, then ask the DNS resolver"?


    Not really outside of changes you may make with a logon script. And even
    though Samba can provide WINS it doesn't tell the client to use it -
    that's a client side configuration issue. Normally DHCP is used to set
    all of this up. Generally "hosts" (think of this as a local static DNS)
    and "lmhosts" (think of this as a local static WINS) will be looked at
    before DNS and WINS (some differences depending upon Windows version).
    With the lmhosts file you can use the #PRE directive to preload the
    data so the file itself doesn't have to be referenced after boot. And
    besides the normal configuration options one may be able to effect the
    order with registry changes although generally there should be no need
    to.

    --
    Chris
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

+ Reply to Thread