[SOLVED] [SOLVED] How to create a caching dns server in centos
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'd like to point out that AFAIK cached information won't survive a restart of Dnsmasq or the machine it runs on. Pdnsd OTOH does have persistent caching.
I believe that Pdnsd is too hard to configure! Dnsmasq is much easier and the most important TobiSGD has experience on it!
Heh, I won't argue with those that accept as true that which is not based on anything.
Quote:
Originally Posted by LeoPap
Any idea about my problem?
If you have problems on your non-Linux PC when changing DNS servers then it makes sense to check the log files and run diagnostics (CMD.EXE tools like ipconfig, netsh and nslookup instead of ping) on that machine.
I'd like to point out that AFAIK cached information won't survive a restart of Dnsmasq or the machine it runs on. Pdnsd OTOH does have persistent caching.
You are right, I didn't think about that, since I run the caching servers on a machine that runs 24/7 anyways.
I don't know much about Pdnsd, but after a short look at the documentation it seems to be not really difficult to setup and it may be much better for the OP's purpose than dnsmasq.
If you have the config file like mine (except of course the interface-name) it should work, if you have your Windows system configured correctly (I use manual configuration on Windows, no DHCP).
Ip 192.168.1.9
Subnet: 255.255.255.0
Gateway: 192.168.1.1
And when i use for dns the ip of the caching server ( 192.168.1.200 ) I don't have Internet connection on the windows pc.
Although the caching pc, is having Internet connection.
May I ask which Centos version you have? I have heard that 5.8 is more stable than the 6.3 I have.
I am using Debian for this, not CentOS. I somehow don't like RPM distros.
But this shouldn't change anything for the configuration.
May it be possible that you have an active firewall on the server that prevents your Windows machine from connecting to the server?
And what about dns on caching server? Right now I have 127.0.0.1. Should I change it?
You can check my configuration files on post #11 on the previous page of this thread ( my configuration is the same as tobi's)
And what about dns on caching server? Right now I have 127.0.0.1. Should I change it?
You can check my configuration files on post #11 on the previous page of this thread ( my configuration is the same as tobi's)
Yes. On the caching server edit /etc/resolv.conf to:
nameserver 192.168.1.200
Don't forget to restart dnsmasq after changing the config.
Maybe I didn't explain well the configuration of my network.
I have a caching Linux pc with ip 192.168.1.200, gateway 182.168.1.1 and dns 127.0.0.1
When I ping and use the dig command from the Linux pc, I get valid results.
Now I want all the windows pc's, to has as dns the caching server in order to increase the browsing speed.
The problem is that when I change the dns of the windows pc, and I enter the ip of the caching server (192.168.1.200) then I don't have Internet connection.
I will try to open the port 53 on iptables. Then I will try replacing 127.0.0.1 with 192.168.1.200 on the caching server.
Thank you guys for your help so far!! I will post the results tomorrow!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.