Acl Internals (Localhost Localnets )
Acl Internals (Localhost Localnets )
Acl Internals (Localhost Localnets )
04 LTS”
Domain info
search-domain abc.lan
127.0.0.1 localhost
10.0.2.99 ns.abc.lan ns
auto eth0
address 10.1.200.3
gateway 10.1.200.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8
sudo reboot
Configuring DNS
acl internals {
localhost;
localnets;
};
options {
directory "/var/cache/bind";
// to talk to, you may need to fix the firewall to allow multiple
forwarders {
// DNS to the internet you could also add the DNS servers from your ISP
8.8.8.8;
};
allow-query {
internals;
};
// restrict recursion
allow-recursion {
internals;
};
allow-transfer {
internals;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
//========================================================================
// turn off zone encryption. The auto flag still generates warnings in the log file
dnssec-enable no;
// dnssec-validation auto;
listen-on-v6 { any; };
};
The installation process creates the crypto file needed when the new DHCP server communicates
with the DNS server. The command below creates a file /etc/bind/rndc.key which replaces the file
generated by the install process.
nano /etc/bind/rndc.key
key "rndc-key" {
algorithm hmac-md5;
secret "wrhfunsh45k/wodkqtfhsnv==";
};
sudo /usr/sbin/rndc-confgen -a
//
//
include "/etc/bind/rndc.key";
zone "abc.lan" {
type master;
file "/var/lib/bind/abc.lan.zone";
zone "2.0.10.in-addr.arpa" {
type master;
file "/var/lib/bind/abc.lan.rev.zone";
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
$ORIGIN .
2014071403 ; serial
NS ns.abc.lan.
$ORIGIN abc.lan.
router01 A 10.0.2.1
ns A 10.0.2.99
dnsserver CNAME ns
mydc CNAME ns
$ORIGIN .
$TTL 907200 ; 1 week 3 days 12 hours
2014071402 ; serial
NS ns.abc.lan.
$ORIGIN 2.0.10.in-addr.arpa.
1 PTR router01.abc.lan.
3 PTR mydc.abc.lan
3 PTR dnsserver.abc.lan
PTR abc.lan
Change the permissions on the two new zone files that were created.
DHCP Configuration
ddns-updates on;
ddns-update-style interim;
update-static-leases on;
authoritative;
include "/etc/dhcp/ddns-keys/rndc.key";
allow unknown-clients;
use-host-decl-names on;
log-facility local7;
zone abc.lan. {
primary 127.0.0.1; # This server is the primary DNS server for the zone
key rndc-key; # Use the key we defined earlier for dynamic updates
zone 2.0.10.in-addr.arpa. {
primary 127.0.0.1; # This server is the primary reverse DNS server for the zone
key rndc-key; # Use the key we defined earlier for dynamic updates
ddns-domainname "abc.lan.";
ddns-rev-domainname "2.0.10.in-addr.arpa.";
sudo ls -l /etc/dhcp/ddns-keys/rndc.key
restart services
This post will outline how to install an Active Directory(AD) Domain Controller on Ubuntu
Server 18.04. Yes, that’s right…Active Directory on a linux host. Not a backup domain
controller but a functional AD that you can create users with, join computers to, and set up
group policy.
Network configurationPermalink
Hostname Domain IP Address
dc1 ad.ricosharp.com 192.168.122.70
Configure networkingPermalink
Configure system hostname
Note that Ubuntu 18.04 is now using netplan to configure IP addresses on systems. I will
outline a basic configuration in a future post
Install relevant samba, winbind, and kerberos packages. The installation will prompt for
kerberos settings and will give an error at the end of installation. Ignore this for now and
accept the defaults. This will be configured properly later as part of the AD installation.
Rename samba and kerberos files. You need to start from a clean environment when starting
the samba AD setup.
~]$ sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
~]$ sudo mv /etc/krb5.conf /etc/krb5.conf.orig
Copy the provisioned kerberos configuration file to the kerberos configuration file location
Test DNS
This is not good as without DNS, AD will fail to run properly. If we run netstat to see what
processes are listening on port 53, we can see that systemd-resolve is running in addition to
samba.
A quick and dirty way to make sure that samba is the only process listening to DNS queries is
to disable the systemd-resolved service.
Let’s also go ahead and test kerberos authentication. Everything here looks in order.
Mask the smbd, nmbd, winbind services and unmask the samba-ad-dc service
An alternative way, and the way that I’m most used to is this: