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've followed a few youtube videos and written tutorials on the subject but I must be doing something wrong in the configurations because after I activate both servers, renew ip on another computer on the same network, I cannot access webpages anymore. I get an error message that there is an error with DNS. Strangely enough, google domains work fine, just a bit slow.
Is there any way to troubleshoot and see exactly where the problem is? Both servers show as running normally.
I am using CentOS version 5.6, and activating both servers through webmin.
Admittedly I am rather new to setting up servers and linux in general, but would appreciate any help.
Thanks.
First I would check what in the client PC what DNS have been assigned by DHCP. If the server is correct, then obviously the problem is in the DNS server, otherwise check that you have the option domain-name-servers your.dns.ipin the correct subnect section of the /etc/dhcp/dhcpd.conf. You can also add a log-facility to get logs of your DHCP server. Do a man dhcpd.conf to learn about that configuration file.
If the problem is your DNS... well there could be a number of issues, first check if you have a logging section in your /etc/bind/dhcpd.conf and try to find the problem, I can try to answer more specific questions, but telling that your DNS is not working is too ambiguous.
First I would check what in the client PC what DNS have been assigned by DHCP. If the server is correct, then obviously the problem is in the DNS server, otherwise check that you have the option domain-name-servers your.dns.ipin the correct subnect section of the /etc/dhcp/dhcpd.conf. You can also add a log-facility to get logs of your DHCP server. Do a man dhcpd.conf to learn about that configuration file.
If the problem is your DNS... well there could be a number of issues, first check if you have a logging section in your /etc/bind/dhcpd.conf and try to find the problem, I can try to answer more specific questions, but telling that your DNS is not working is too ambiguous.
After reading your answer I tried to add a log-facility called local7. But it does not appear to be writing anything to /var/log/dhcpd.log like the log facility should. The log file does not exist, will it be created automatically if there is something to log?
I know my original post was ambiguous, let me post my conf files and let me know if something catches your eye.
For reference:
my router ip is 192.168.1.1
my hostname is linux
-- something else to note: my machine's original hostname was localhost.localdomain. To log in to webmin I would enter url
Code:
https://localhost.localdomain:10000
I have since changed my hostname to linux, but must still use this old hostname to log in to webmin. Also not sure why but I must use the secure https log in, not http.
named.conf:
Code:
zone "linux." IN {
type master;
file "slaves/linux.zone";
allow-update {
key rndckey;
};
};
zone "1.168.192.in-addr.arpa." IN {
type master;
file "slaves/1.168.192.in-addr.arpa.zone";
allow-update {
key rndckey;
};
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
forwarders {
192.168.1.1;
};
};
include "/etc/rndc.key";
dhcpd.conf:
Code:
log-facility local7;
option domain-name-servers 127.0.0.1;
option domain-name "linux";
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
ddns-updates on;
ddns-update-style interim;
ddns-domainname "linux";
ddns-rev-domainname "in-addr.arpa";
include "/etc/rndc.key";
ignore client-updates;
# Zones dhcpd will be updating.
zone linux {
primary 127.0.0.1;
key rndckey;
}
zone 2.0.10.in-addr.arpa {
primary 127.0.0.1;
key rndckey;
}
# linux
subnet 192.168.1.0 netmask 255.255.255.0 {
option domain-name-servers 127.0.0.1;
option domain-name "linux";
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
ddns-updates on;
range 192.168.1.3 192.168.1.150;
}
# linux
host linux {
option domain-name-servers 127.0.0.1;
option domain-name "linux";
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
ddns-updates on;
}
After reading your answer I tried to add a log-facility called local7. But it does not appear to be writing anything to /var/log/dhcpd.log like the log facility should. The log file does not exist, will it be created automatically if there is something to log?
Have you modified your syslog.conf too?
Quote:
Originally Posted by gsm113
-- something else to note: my machine's original hostname was localhost.localdomain. To log in to webmin I would enter url
Code:
https://localhost.localdomain:10000
I have since changed my hostname to linux, but must still use this old hostname to log in to webmin. Also not sure why but I must use the secure https log in, not http.
Have you changed your /etc/hostname to change the name of the system? Have you changed your /etc/hosts to asociate the name with the IP?
You didn't say if your problem is the DHCP or the DNS. First locate the problem, then I'll try to answer questions.
Have you changed your /etc/hostname to change the name of the system? Have you changed your /etc/hosts to asociate the name with the IP?
I had edited the first one, and just now edited the second. Now I can log in to webmin with the new hostname.
Quote:
Originally Posted by rodrifra
You didn't say if your problem is the DHCP or the DNS. First locate the problem, then I'll try to answer questions.
I believe the problem is with DNS. When I activate both servers, then go to my windows machine in the same network, release ip, flushdns, renew ip, I can see that I have an IP from my linux server. But when I try to access a website, I get an error message that DNS lookup failed.
Have you reloaded configuration of syslog after changing the file, or restarted daemon?
Scanning your named.conf file I can see your forwarder is your gateway. That is wrong, a forwarder must be another DNS where yours will relay when it has no answers, I thing your gateway is not one of those. Besides, that statement is only relevant when used with forward, and I don't see a forward in any of your zones. This leads to a question, if your DNS server is asked for a name that is not in your linux domain what will it answer? It will not know what to do.
Check the next link as a reference for your configuration:
Have you reloaded configuration of syslog after changing the file, or restarted daemon?
Scanning your named.conf file I can see your forwarder is your gateway. That is wrong, a forwarder must be another DNS where yours will relay when it has no answers, I thing your gateway is not one of those. Besides, that statement is only relevant when used with forward, and I don't see a forward in any of your zones. This leads to a question, if your DNS server is asked for a name that is not in your linux domain what will it answer? It will not know what to do.
Check the next link as a reference for your configuration:
I have changed my forwarders to the nameservers provided by my ISP (is this right?). I am using Cox and I believe the correct nameservers are 68.105.28.12 and 68.105.29.12
These IP's were found in my old resolv.conf file. The video tutorial I was following said to change the resolv.conf file to the following:
Code:
search linux
nameserver 127.0.0.1
My other computers are still not able to reach websites when the DNS server is active with these settings. Do you see something else either in named or resolv.conf which could be the cause?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.