Cách giải quyết :
Done !!!sudo apt-get install libnss3-1d:i386
sudo apt-get install libxss1:i386
Done !!!sudo apt-get install libnss3-1d:i386
sudo apt-get install libxss1:i386
# Start of rndc.conf3, Chỉnh sửa file named.conf trong /var/named/chroot/etc/ : chú ý các dòng in đậm phải thêm vào
key "rndckey" {
algorithm hmac-md5;
secret "4zxdQwfZxHkp4puLMnkWCg==";
};
#options {
# default-key "rndckey";
# default-server 127.0.0.1;
# default-port 953;
#};
# End of rndc.conf
# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndckey" {
# algorithm hmac-md5;
# secret "4zxdQwfZxHkp4puLMnkWCg==";
# };
#
# controls {
# inet 127.0.0.1 port 953
include "/etc/rndc.key";4, Chỉnh sửa file dhcpd.conf trong /etc/ : lưu ý sửa cho đúng theo những đoạn đã in đậm
options {
directory "/etc";
forwarders {208.67.222.222;};
};
zone "." {
type hint;
file "/etc/root.db";
};
zone "example.com" {
type master;
file "/var/named/example.com.db";
allow-update { key rndckey; };
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/var/named/1.168.192.db";
allow-update { key rndckey; };
};
include "/etc/rndc.key";5, Trong thư mục /var/named/chroot/var/named , tạo sẵn 2 file có dạng sau và chmod cho chúng để có thể ghi vào các file :
authoritative;
server-identifier srv2.example.com;
ddns-domainname "example.com";
ddns-rev-domainname "in-addr.arpa";
ddns-updates on;
allow client-updates;
ddns-update-style interim;
DHCPARGS=eth1;
zone example.com. {
primary 192.168.1.2;
key rndckey;
}
zone 1.168.192.in-addr.arpa. {
primary 192.168.1.2;
key rndckey;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.2;
option subnet-mask 255.255.255.0;
option domain-name "example.com";
option domain-name-servers 192.168.1.2;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.20 192.168.1.100;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
hardware ethernet 00:0C:29:FA:41:88;
fixed-address 192.168.1.50;
}
}
100.1.168.192 PTR client.example.com.làm cho máy client không thể phân giải được địa chỉ. Nếu đúng thì phải là
100 PTR client.example.com.- File 1.168.192.db sẽ trở thành có dạng như sau, file example.com.db cũng tương tự :
$ORIGIN .
$TTL 86400 ; 1 day
1.168.192.in-addr.arpa IN SOA example.com. root.example.com. (
2007121802 ; serial
14400 ; refresh (4 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS srv2.example.com.
$ORIGIN 1.168.192.in-addr.arpa.
1 PTR srv1.example.com.
$TTL 10800 ; 3 hours
100 PTR client.example.com.
$TTL 86400 ; 1 day
2 PTR srv2.example.com.
3 PTR srv3.example.com.
ddns-update-style interim;
ignore client-updates;
DHCPARGS=eth1; # cấu hình dịch vụ DHCP lắng nghe trên card mạng eth1
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.2; # cấu hình gateway cho các máy client
option subnet-mask 255.255.255.0;
option domain-name "example.com";
option domain-name-servers 192.168.1.2;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.20 192.168.1.100;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
# Cấu hình đặt chỗ địa chỉ IP cho 1 số client cụ thể , DHCP reservation
host ns {3, Khởi động dịch vụ :
hardware ethernet 00:0C:29:FA:41:88; #địa chỉ MAC của client đó
fixed-address 192.168.1.50; #địa chỉ IP đặt trước
}
}