微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

domain-name-system – 带DHCP服务器的Samba4内部DNS

在FreeBSD上,我们运行Samba4作为DC,直到最近我们的IP地址由路由器DHCP服务器发出.我们切换到在FreeBSD机器上运行DHCP服务器,配置如下: –
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd 
#

# option deFinitions common to all supported networks...
option domain-name "hlb.net";
option domain-name-servers 192.168.1.4;

default-lease-time 600;
max-lease-time 7200;

# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network,the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;


# This is a very basic subnet declaration.

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.5 192.168.1.253;
  option routers 192.168.1.254;
}

我们现在无法将机器添加到域中.输入凭据后,Windows 8.1客户端会抱怨“找不到路径”,无论是否正确.

Samba4配置非常简单: –

#Global parameters
[global]
    workgroup = HLB
    realm = HLB.NET
    netbios name = SERVER1
    server role = active directory domain controller
    dns forwarder = 192.168.1.254
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    allow dns updates = nonsecure

[netlogon]
    path = /var/db/samba4/sysvol/hlb.net/scripts
    read only = No

[sysvol]
    path = /var/db/samba4/sysvol
    read only = No

[home]
    path = /srvdata/homes
    read only = No

[profiles]
    path = /srvdata/profiles
    read only = No

[packages]
    path = /srvdata/packages
    read only = No

DNS测试似乎符合预期: –
host -t SRV _ldap._tcp.hlb.net
产量: –

_ldap._tcp.hlb.net has SRV record 0 100 389 server1.hlb.net.

和:-

host -t SRV _kerberos._udp.hlb.net

产量: –

_kerberos._udp.hlb.net has SRV record 0 100 88 server1.hlb.net.

最后,通过以下方式测试DNS A记录: –

host -t A SERVER1.hlb.net

返回以下内容: –

SERVER1.hlb.net has address 192.168.1.4

在设置DHCP服务器时似乎我们可能错过了一些配置选项,但是我们现在很难过.任何见解都是极好的,因为我们确信还有其他人对我们有类似的设置.

解决方法

尝试将DNS服务器定义到您的子网中:
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.5 192.168.1.253;
  option routers 192.168.1.254;
  option domain-name "hlb.net";
  option domain-name-servers 192.168.1.4;
}

原文地址:https://www.jb51.cc/html/228270.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐