You want to configure networking on a host and have these requirements:
A cache only nameserver is to be used.
DHCP is used to obtain an IP address.
DHCP must not overwrite nameserver details contained in the /etc/resolv.conf file.
The nameserver must be activated automatically at system startup.
There are two network adaptors, ethO and eth1
The bind package has already been installed and the network service stopped.
Which four actions must be performed to implement this requirement?
A.
Add lines withPEERDNS=noandBOOTPROTO=dhcpto the /etc/sysconfig/network-scripts/ifcfg-ethOfile.
B.
Add a line withPEERDNS=noto the/etc/resolv.conffile.
C.
Add a line withnameserver 127.0.0.1to the/etc/resolv.conffile.
D.
Thenetworkandbindservices must be started automatically by usingchkconfigfor those services at the appropriate run levels.
E.
Add lines withPEERDNS=noandBOOTPROTO=dhcpto the /etc/sysconfig/network-scripts/ifcfg-eth1file.
F.
Start thenetworkservice only automatically by usingchkconfigfor those services at the appropriate run levels.
G.
start thebindservice only automatically by usingchkconfigfor those services at the appropriate run levels.
I’am not 100% sure but:
A,C,E,F should be correct
A,C,D,E are correct
If NetworkManager is enabled on the system, edit the /etc/sysconfig/network-scripts/ifcfg-interface file, and add the following entry:
DNS1=127.0.0.1
This line causes NetworkManager to add the following entry to /etc/resolv.conf when the network service starts:
nameserver 127.0.0.1
This entry points the resolver at the local name server.
If you have disabled NetworkManager, edit /etc/resolv.conf to include the nameserver 127.0.0.1 entry.
If required, modify the named configuration and zone files.
Allow incoming TCP connections to port 53 and incoming UDP datagrams on port 53 from the local network:
# iptables -I INPUT -s subnet_addr/prefix_length -p tcp \
-m state –state NEW -m tcp –dport 53 -j ACCEPT
# iptables -I INPUT -s subnet_addr/prefix_length -p udp \
-m udp –dport 53 -j ACCEPT
# service iptables save
where subnet_addr/prefix_length specifies the network address, for example 192.168.1.0/24.
Restart the network service, restart the named service, and configure named to start following system reboots:
# service network restart
# service named start
# chkconfig named on
A C D E
A,C,C,E is correct