Today we are going to learn how to install a DNS server and client using CentOS. The DNS server is perhaps the most important part of the deal. However, there are plenty of support client OSs which can be either Windows, Linux, or Mac.
Server:
So first we go to the server and install iodine. Make sure you don’t have any other process that is using 53. If you do just change it so something else and use -b option in iodined server to relay any
yum search iodine
yum install iodine.x86_64
Then run the command
# iodined -P mypass 172.16.0.1 ns1.yourserver.com
Opened dns0
Setting IP of dns0 to 172.16.0.1
Setting MTU of dns0 to 1130
Opened UDP socket
Listening to dns for domain ns1.yourserver.com
Detaching from terminal…
To make iodined a service just write this to /etc/init/iodined.conf
start on runlevel [2345] stop on runlevel [S016] respawn respawn limit 150 25 expect daemon exec iodined -P mypass 172.16.0.1 ns1.yourserver.net 2>&1 >/tmp/iodine_boot.log
Client
Run the same command to install iodine. I’ll assume CentOS is the clients platform
yum install iodine.x86_64
Then start iodine
iodine -r -f -P mypass ns1.yourserver.com
To automaticly start it in the client side use this upstart job in file /etc/init/iodine.conf
start on runlevel [2345] stop on runlevel [S016] respawn respawn limit 150 25 exec iodine -r -f -P mypass 1.2.3.4 ns1.yourserver.net >/tmp/iodine_boot.lo
And that’s it. To run the client side just type start iodine. After you run your client you just need to ping 172.16.0.1, which is the server ip address.