[Samba] DNS Help Request
Thomas Cameron
thomas.cameron at camerontech.com
Sat Sep 10 19:34:31 UTC 2022
On 9/10/22 14:08, Luke Barone via samba wrote:
> dc01 looks to be using 10.0.0.1 for its DNS resolver
Exactly. So when you are registering hostnames to your Samba server, are
you registering with the short name, or with the FQDN?
I set up my BIND DNS server so that every IP address resolves with the
FQDN. I have hostnames for my "real" servers and also for the range
which uses DHCP, so:
[root at wintermute ~]# head /var/named/tc.camerontech.com
$TTL 3H
@ IN SOA @ thomas.cameron.camerontech.com. (
2022031222 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS wintermute.tc.camerontech.com.
MX 10 mail-east.camerontech.com.
[root at wintermute ~]# less /var/named/tc.camerontech.com
[root at wintermute ~]# head -30 /var/named/tc.camerontech.com
$TTL 3H
@ IN SOA @ thomas.cameron.camerontech.com. (
2022031222 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS wintermute.tc.camerontech.com.
MX 10 mail-east.camerontech.com.
MX 20 mail-west.camerontech.com.
$ORIGIN tc.camerontech.com.
wintermute IN 1H A 172.31.100.1
molly IN 1H A 172.31.100.2
neuromancer IN 1H A 172.31.100.3
case IN 1H A 172.31.100.4
printer IN 1H A 172.31.100.5
east-wing IN 1H A 172.31.100.6
neuromancer-ilo IN 1H A 172.31.100.7
molly-ilo IN 1H A 172.31.100.8
brynna IN 1H A 172.31.100.9
brynna-pixel IN 1H A 172.31.100.10
filer IN 1H A 172.31.100.11
host12 IN 1H A 172.31.100.12
host13 IN 1H A 172.31.100.13
host14 IN 1H A 172.31.100.14
host15 IN 1H A 172.31.100.15
host16 IN 1H A 172.31.100.16
I also have reverse set up:
[root at wintermute ~]# head -30 /var/named/100.31.172.in-addr.arpa
$TTL 86400
@ IN SOA wintermute.tc.camerontech.com.
thomas.cameron.camerontech.com. (
2022031222 ; serial number YYMMDDNN
28800 ; Refresh
7200 ; Retry
864000 ; Expire
86400 ; Min TTL
)
NS wintermute.tc.camerontech.com.
$ORIGIN 100.31.172.in-addr.arpa.
1 PTR wintermute.tc.camerontech.com.
2 PTR molly.tc.camerontech.com.
3 PTR neuromancer.tc.camerontech.com.
4 PTR case.tc.camerontech.com.
5 PTR printer.tc.camerontech.com.
6 PTR east-wing.tc.camerontech.com.
7 PTR neuromancer-ilo.tc.camerontech.com.
8 PTR molly-ilo.tc.camerontech.com.
9 PTR brynna.tc.camerontech.com.
10 PTR brynna-pixel.tc.camerontech.com.
11 PTR filer.tc.camerontech.com.
12 PTR host12.tc.camerontech.com.
13 PTR host13.tc.camerontech.com.
14 PTR host14.tc.camerontech.com.
15 PTR host15.tc.camerontech.com.
16 PTR host16.tc.camerontech.com.
The nice thing about setting this up is that I don't have to interject
Samba into my setup. I just use existing DNS. If I add a new "real"
server, I just edit my zone files and restart BIND. Then when I add a
new server, the IP address and hostname both resolve flawlessly.
I hate to say it, but it might be worth setting up DNS in your
environment instead of trying to get Samba to do it. I have multiple
services running in my home lab which *can* run DNS. I have Red Hat
Satellite server, I have Samba, I have Cobbler, etc. All of them *can*
run my DNS service, but I determined some time ago that that way lies
madness. I set up my DNS once, and every once in a *great* while I have
to add host names, but it Just Works(TM). Trying to let something that
is not a DNS server run DNS always seems problematic to me.
Just my two bits. It may be something as simple as needing to register
your hosts with Samba using the FQDN and that might solve it. I have
never messed with Samba's DNS management, so I am not sure.
I wish I had a more helpful answer, bud, sorry.
Thomas
More information about the samba
mailing list