I am attempting to run my host machine as a DNS server, it will also function as the gateway.
My **/etc/named.conf** is as follows:
options {
directory "/var/named/";
allow-query {127.0.0.1; 192.168.64.0/24;};
forwarders { 192.168.48.2; };
};
zone "localhost" {
type master;
file "named.localhost";
};
zone "huh.dod" {
type master;
file "mydb-huh-dod";
};
My **/var/named/mydb-huh-dod**:
$TTL 3D
@ IN SOA host.huh.dod. hostmaster.huh.dod.(
2018042901 ; Serial
8H ; Refresh
2H ; Retry
1W ; Expire
1D ; Negative Cache TTL
);
@ IN NS host.huh.dod.
host IN A 192.168.64.1
I set my hostname as host and configured domain name through the **/etc/sysconfig/network-scripts/ifcfg-eth0** file SEARCH parameter:
DNS1="192.168.64.1"
IPADDR="192.168.48.10"
NETMASK="255.255.255.0"
GATEWAY="192.168.48.2"
SEARCH="huh.dod"
so the **/etc/resolv.conf** looks like:
# Generated by NetworkManager
search huh.dod
nameserver 192.168.64.1
Attempts at using the host command are refused:
host host
host.huh.dod has address 192.168.64.1
Host host.huh.dod not found: 5(REFUSED)
Host host.huh.dod not found: 5(REFUSED)
host host.huh.dod
host.huh.dod has address 192.168.64.1
Host host.huh.dod not found: 5(REFUSED)
Host host.huh.dod not found: 5(REFUSED)
I am not sure what the problem is.
Perhaps something to do with my iptables firewall?
Output of **netstat -anlp | grep 53 | grep LISTEN**
tcp 0 0 192.168.64.1:53 0.0.0.0:* LISTEN 942/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 942/named
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 942/named
tcp6 0 0 ::1:953 :::* LISTEN 942/named
named is running
Asked by J.Doe
(21 rep)
Jun 10, 2018, 07:18 PM
Last activity: Jan 23, 2024, 10:03 AM
Last activity: Jan 23, 2024, 10:03 AM