Estou tentando criar um servidor da Web usando o CentOS7 e o Bind DNS no mesmo servidor.
Se eu entendi o processo corretamente, as entradas abaixo devem permitir que eu faça um nslookup
de uma máquina diferente e localize dns1.example.com
.
Isso não acontece e eu suspeito que isso tenha a ver com DNS1=127.0.0.1
.
Então, eu preciso mudá-lo para o endereço IP estático ou endereço IP do servidor, talvez, mas quando eu faço isso eu recebo um erro ao fazer nslookup (a partir de um PC Windows diferente):
[hub can't find dns1.example.com: Non existant domain]
Grato se você puder ajudar com isso.
[root@server ~]# hostname --fqdn
server.example.com
Abaixo está minha /etc/sysconfig/network-scripts/ifcfg-eno1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eno1
UUID=777777-77777-7777-7777-7777777
DEVICE=eno1
ONBOOT=yes
IPADDR=122.168.1.20
PREFIX=24
GATEWAY=122.168.1.24
DOMAIN="example.com"
DNS1=127.0.0.1
NETMASK=255.255.255.0
Abaixo está minha resolv.conf
# Generated by NetworkManager
search example.com home
nameserver 127.0.0.1
Zona de encaminhamento
$ORIGIN example.com.
$TTL 86400
@ IN SOA dns1.example.com. hostmaster.example.com. (
0 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL 1 day
IN NS dns1.example.com.
IN MX 10 mail.example.com.
IN A 122.168.1.20
dns1 IN A 122.168.1.20
ftp IN A 122.168.1.20
mail IN CNAME server
www IN CNAME server
Zona reversa
$ORIGIN 1.168.122.in-addr.arpa.
$TTL 86400
@ IN SOA dns1.example.com. hostmaster.example.com. (
0 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL 1 day
@ IN NS server.example.com.
1 IN PTR server.example.com.
2 IN PTR server.example.com.
3 IN PTR server.example.com.
4 IN PTR server.example.com.
'_
options {
listen-on port 53 { 127.0.0.1; 122.168.1.20; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost;any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "example.com" IN {
type master;
file "forward.example.com";
allow-update { none; };
};
zone "1.168.122.in-addr.arpa" IN {
type master;
file "reverse.example.com";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";_
'