LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-10-2013, 11:26 AM   #46
LeoPap
Member
 
Registered: Jan 2013
Distribution: Centos
Posts: 93

Original Poster
Rep: Reputation: 5

Ok i add this line at the bottom of the dnsmasq.conf file and i set as dns server on my pc ( Windows pc ) the ip of the caching server.

Here are the results of the log file.


[root@localhost ~]# cat /var/log/dnsmasq.log
Jan 3 09:10:09 dnsmasq[1601]: started, version 2.48 cachesize 1000
Jan 3 09:10:09 dnsmasq[1601]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP
Jan 3 09:10:09 dnsmasq[1601]: cleared cache
Jan 3 09:10:09 dnsmasq[1601]: failed to read /etc/resolv.dnsmasq: No such file or directory
Jan 3 09:21:47 dnsmasq[1601]: exiting on receipt of SIGTERM
Jan 3 09:21:53 dnsmasq[1627]: started, version 2.48 cachesize 1000
Jan 3 09:21:53 dnsmasq[1627]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP
Jan 3 09:21:53 dnsmasq[1627]: cleared cache
Jan 3 09:21:53 dnsmasq[1627]: failed to read /etc/resolv.dnsmasq: No such file or directory
Jan 3 09:22:09 dnsmasq[1627]: exiting on receipt of SIGTERM
Jan 3 09:22:09 dnsmasq[1653]: started, version 2.48 cachesize 1000
Jan 3 09:22:09 dnsmasq[1653]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP
Jan 3 09:22:09 dnsmasq[1653]: cleared cache
Jan 3 09:22:09 dnsmasq[1653]: failed to read /etc/resolv.dnsmasq: No such file or directory
Jan 4 12:34:21 dnsmasq[1653]: exiting on receipt of SIGTERM
Jan 4 12:35:06 dnsmasq[1041]: started, version 2.48 cachesize 1000
Jan 4 12:35:06 dnsmasq[1041]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP
Jan 4 12:35:06 dnsmasq[1041]: cleared cache
Jan 4 12:35:06 dnsmasq[1041]: failed to read /etc/resolv.dnsmasq: No such file or directory
Jan 7 08:33:25 dnsmasq[1041]: exiting on receipt of SIGTERM
Jan 10 16:24:24 dnsmasq[1401]: started, version 2.48 cachesize 10000
Jan 10 16:24:24 dnsmasq[1401]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP
Jan 10 16:24:24 dnsmasq[1401]: read /etc/hosts - 2 addresses
Jan 10 16:24:24 dnsmasq[1401]: using nameserver 208.67.222.222#53
Jan 10 16:24:24 dnsmasq[1401]: using nameserver 8.8.8.8#53
Jan 10 16:24:28 dnsmasq[1401]: exiting on receipt of SIGTERM
Jan 10 16:24:28 dnsmasq[1427]: started, version 2.48 cachesize 10000
Jan 10 16:24:28 dnsmasq[1427]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP
Jan 10 16:24:28 dnsmasq[1427]: read /etc/hosts - 2 addresses
Jan 10 16:24:28 dnsmasq[1427]: using nameserver 208.67.222.222#53
Jan 10 16:24:28 dnsmasq[1427]: using nameserver 8.8.8.8#53


It seems that it is working fine now. Right?

Last edited by LeoPap; 01-10-2013 at 11:30 AM.
 
Old 01-10-2013, 02:46 PM   #47
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,623
Blog Entries: 2

Rep: Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078
Did you restart it manually at 16:24:28? Other than that it seems to work correctly.
 
Old 01-10-2013, 04:49 PM   #48
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
With regard to the cache, you can get dnsmasq stats by sending the daemon the USR1 signal. dnsmasq then dumps some stats to the log file. Here's a little script that I made/use to make it easy:

Code:
#!/bin/bash
kill -s USR1 `cat /var/run/dnsmasq/dnsmasq.pid`
sleep 1
tail -n 5 /var/log/dnsmasq.log
exit 0
Copy and save it as a file, e.g., dns-stats.sh. Make it executable. Then run it (as root) and you'll get something like this:

Code:
[root@serv:~/scripts] ./dns-stats.sh
Jan 10 18:06:33 dnsmasq[680]: time 1357853793
Jan 10 18:06:33 dnsmasq[680]: cache size 2000, 146/89333 cache insertions re-used unexpired cache entries.
Jan 10 18:06:33 dnsmasq[680]: queries forwarded 141965, queries answered locally 99887
Jan 10 18:06:33 dnsmasq[680]: server xxx.79.218.2#53: queries sent 108122, retried or failed 896
Jan 10 18:06:33 dnsmasq[680]: server xxx.79.219.2#53: queries sent 57594, retried or failed 430
The line with 'cache-size' is a bit cryptic. My cache size is 2000. If I'm understanding correctly, the '146/89333' is telling me the size could be increased a bit. Ideally I think it would be '0/89333'.

The other lines are pretty much self-explanatory.
 
Old 01-10-2013, 06:55 PM   #49
LeoPap
Member
 
Registered: Jan 2013
Distribution: Centos
Posts: 93

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by TobiSGD View Post
Did you restart it manually at 16:24:28? Other than that it seems to work correctly.
Yes I restart manual the server. It seems that it is working fine! Also I see a bit difference on my browsing speed, although on my imagination it was a bit different!


Sleddog: thank you mate, I will have it in mind!
 
Old 01-10-2013, 07:41 PM   #50
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,623
Blog Entries: 2

Rep: Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078Reputation: 4078
Good to hear. Now you may consider a caching proxy server to further speed up your surfing experience.
Jokes aside, a caching proxy can be more difficult to handle and I would consider it only if you have more than one machine used by you for surfing (and if you also have times with a low-bandwidth access to the net).
 
Old 01-11-2013, 03:10 AM   #51
LeoPap
Member
 
Registered: Jan 2013
Distribution: Centos
Posts: 93

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by TobiSGD View Post
Good to hear. Now you may consider a caching proxy server to further speed up your surfing experience.
Jokes aside, a caching proxy can be more difficult to handle and I would consider it only if you have more than one machine used by you for surfing (and if you also have times with a low-bandwidth access to the net).
We have 3 machines, which have internet conenction, but only i use the caching server as dns!

So let's just leave the caching proxy for now..!

Thank you for your help mate!! Really appreciate it!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
new samba server create problem centos 5.5 64bits salimshahzad Linux - Newbie 2 02-07-2011 03:45 PM
i have server which has Linux version centos i want to create the image of the server dhirendrs Linux - Newbie 6 07-22-2010 09:20 PM
i have one server which install the Centos OS and i want to create the image dhirendrs Linux - Enterprise 3 07-22-2010 04:11 PM
LXer: Create Your Own Web Server With BIND And Apache On CentOS 5 LXer Syndicated Linux News 0 07-02-2008 04:11 PM


All times are GMT -5. The time now is 08:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration