Archive for the ‘Debian’ Category:
dnsmasq
I like playing around with and running services on servers because I think that it’s fun, it’s the reason that this blog runs on its own server at home, that does mean that there are problems with conectivity sometimes and I am forced to fix my own problems, which has lead me to think about moving the blog to a hosted service.
I have been playing around with DNS services for a while and during reading noticed that most people believed that BIND wasn’t up to standard anymore and a more acceptable service to go for would be djbdns, the documentation on the site is great and with other sites like life with djbdns and djbdns rocks and there wasn’t with the help of the above three sites I was able to setup a suitable caching name server for my home network. The only problem that I had was because of the way dnscache and tinydns is setup it cannot run on the same network IP so as a result tinydns will normally run on 127.0.0.1 and dnscache will run on the private or public IP. This worked great for me, except for one reason or another I wasn’t able to get dns lookups for my local machine to work.
After some searching I decided that it would be best to head towards dnsmasq
Network Time Protocol
Since the Commonwealth Games had changed the day that we switched from daylight savings it brought my attention to something that I have been wanting to do for a little while but never got the chance to do it.
So I thought that I should finally spend some time looking into setting up a ntp client and server for the rest of my network.
I will be doing this on a Debian box that I am currently using as a squid http proxy sever.
> apt-get install ntp ntp-server ntp-simple ntpdate
After this has been installed you need to go out and find the nearest time servers to you, geographically that is.
So in my case I used the list from the NTP Pool Servers which is basically a project to provide widely accessible ntp servers around the world.
You take that list of time servers, which in my case was this:
server 0.au.pool.ntp.org
server 1.au.pool.ntp.org
server 2.au.pool.ntp.org
and edit /etc/ntp.conf and between about line 15 and 30 edit as appropriately
# You do need to talk to an NTP server or two (or three).
16 #server ntp.your-provider.example
17
18 # pool.ntp.org maps to more than 100 low-stratum NTP servers.
19 # Your server will pick a different set every time it starts up.
20 # *** Please consider joining the pool! ***
21 # ***
22 #server pool.ntp.org
23 #server pool.ntp.org
24 ## uncomment for extra reliability
25 server 0.au.pool.ntp.org
26 server 1.au.pool.ntp.org
27 server 2.au.pool.ntp.org
After this give the ntp server a start or restart.
:/etc# /etc/init.d/ntp-server start
I didn’t know if it was working so incidentally i made sure that the service was running
l
:/etc# ps aux |grep ntp
root 13212 0.0 3.1 3944 3944 ? SLs 15:32 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid
root 13338 0.0 0.4 1820 568 pts/0 S+ 15:54 0:00 grep ntp
And then to make sure that the ntp service was updating to your listed servers type in # ntpq -p
Which should give you an output of this
:/etc# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*puma.afoyi.com 128.250.36.3 2 u 32 64 377 50.619 4.085 1.253
-adsl-129-61.swi 130.102.128.23 3 u 38 64 377 23.763 -6.072 0.496
+ns.creativecont 128.250.36.2 2 u 35 64 377 41.189 -2.372 0.424
When i first tryed that command I didn’t get the * or + so i wasn’t certain that it was working, but after a little while I came back to it and it seemed to be be fine.
I believe that the “*” means the primay server and “+” mean backup servers.
That is pretty much it, now all you have to do and point your other computers to your server and you should be right.
