A Linux Playground

My doodles and what I get up to.

DHCP and Local Network Dynamic DNS

Setting up a local dns and dhcp server can have some good benefits. It caches dns reducing external requests. Entries from DHCP can be used to updated the local dns. It can also create a local dns zone such as “work.lan”.

yum install bind bind-utils -y 4 vi /etc/named.conf 5 vi /var/named/home.lan.zone 6 vi /var/named/named.loopback 7 vi /etc/named.conf 8 cat /var/named/named.ca 9 cat /var/named/named.loopback 10 cat /var/named/named.localhost 11 cat /etc/named.conf 12 vi /etc/named.conf 13 vi /var/named/rev.0.168.192.in-addr.arpa 14 vi /var/named/home.lan.zone 15 mv /var/named/home.lan.zone /var/named/rev.0.168.192.in-addr.arpa 16 vi /var/named/home.lan.zone 17 vi /var/named/rev.0.168.192.in-addr.arpa 18 vi /var/named/home.lan.zone 19 service –list-all 20 service named start 21 fsdfds 22 vi /var/named/home.lan.zone 23 service named start 35 iptables -L 40 vi /etc/named.conf 41 service named restart 49 service iptables stop 50 vi /etc/resolv.conf 81 /sudo 82 vi /etc/sudoers 83 vi /etc/named.conf 84 cd /var/named/ 85 ls 86 ll 87 chown named:named home.lan.zone rev.0.168.192.in-addr.arpa 88 ls 89 ll 90 yum install dhcp 91 vi /etc/dhcp/dhcpd.conf 92 vi /etc/dhcp/dhclient.d/ntp.sh 93 vi /etc/dhcp/dhcpd.conf 94 cp /usr/share/doc/dhcp/dhcpd.conf.sample 95 cp /usr/share/doc/dhcp/dhcpd.conf.sample . 96 ls 97 mv dhcpd.conf.sample /etc/dhcp/ 98 vi /etc/dhcp/dhcpd.conf.sample 99 rndc status 100 rndc home.lan 101 rndc statushome.lan 102 rndc status home.lan 103 vi /etc/dhcp/dhcpd.conf 104 vi /etc/dhcp/dhcpd.conf.sample 105 vi /etc/named.conf 106 vi /etc/dhcp/dhcpd.conf.sample 107 service dhcpd start 108 tail /var/log/messages 109 tail -30 /var/log/messages 110 vi /etc/sysconfig/dhcpd 111 service dhcpd start 112 tail -30 /var/log/messages 113 ip a 114 vi /etc/sysconfig/dhcpd 115 vi /etc/dhcp/dhcpd.conf.sample 116 rm /etc/dhcp/dhcpd.conf 117 mv /etc/dhcp/dhcpd.conf.sample /etc/dhcp/dhcpd.conf 118 service dhcpd start 119 tail -30 /var/log/messages 120 vi /etc/sysconfig/dhcpd 121 service dhcpd start 122 tail -30 /var/log/messages 123 ll /etc/dhcp/ 124 cd .. 125 ll 126 cd etc/ 127 ll 128 group | grep dh 129 groups | grep dh 130 groups | grep 131 groups 132 cat /etc/group | grep dh 133 chown dhcpd:dhcpd /etc/dhcp 134 chown -r dhcpd:dhcpd /etc/dhcp 135 chown -R dhcpd:dhcpd /etc/dhcp 136 service dhcpd start 137 tail -30 /var/log/messages 138 su dhcpd 139 ll /etc/dhcp/ 140 chmod 755 /etc/dhcp/ 141 service dhcpd start 142 tail -30 /var/log/messages 143 cat /etc/dhcp/dhcpd.conf 144 ls 145 ls | grep dh 146 ll | grep dh 147 ll / 148 service dhcpd stop 149 service dhcpd start 150 tail -30 /var/log/messages 151 vi /etc/sysconfig/selinux 152 service dhcpd start 153 /sbin/restorecon -v /etc/dhcp/dhcpd.conf 154 service dhcpd start 155 ls 156 hostname 157 host -l home.lan 158 tail -30 /var/log/messages 159 service named restart 160 chkconfig named on 161 chkconfig dhcpd on 162 rndc status 163 tail -30 /var/log/messages 164 vi /etc/named.conf 165 ls /var/named/ 166 ll /var/named/ 167 cd /var/named/ 168 ls 169 mv home.lan.zone rev.0.168.192.in-addr.arpa dynamic/ 170 ls 171 cd dynamic/ 172 ls 173 ls -al 174 vi /etc/named.conf 175 ls 176 mv rev.0.168.192.in-addr.arpa rev.0.168.192.in-addr.arpa.zone