Day 15: DHCP & DNS
Write out what the code specifically does line-by-line
For example:
Line 1: Define a function isPalindrome() that takes in a parameter named string
Line 2: blah blah blah
1 def isPalindrome(string):
2 left_pos = 0
3 right_pos = len(string) - 1
4
5 while right_pos >= left_pos:
6 if string[left_pos] != string[right_pos]:
7 return False
8 left_pos += 1
9 right_pos -= 1
10 return Truesudo apt-get updatesudo apt-get install dnsmasqcd /etc
sudo mv dnsmasq.conf dnsmasq.default
sudo nano dnsmasq.confinterface=eth0
dhcp-range=10.4.4.100,10.4.4.254,255.255.255.0,12hsudo service dnsmasq restartsudo service networking restart
ifconfigdhcp-option=6,IP_ADDRESS
no-hosts
addn-hosts=/etc/hosts.dnsmasqsudo nano /etc/hosts.dnsmasqsudo nano /etc/resolv.confThe file should have the following one line only:
nameserver 127.0.0.1
sudo service networking restart