I have some issues with my install of GPL Virtualmin, i created a test server here at home and i'm having trouble with some domains. The clients that i work on uses the DNS server of the server it self because all my test sites uses the tld of .loc. The server it self runs Ubuntu.
I have created these websites.
vb.loc xendevelop.loc myphpadmin.loc svn.loc
Also xendevelop is the only site that uses WebDav and svn.loc is linked to subversion.
The problem is that the clients can't access the websites except xendevelop.loc the other websites i can't open at all. IPtables has no rules and the server only used one ip address. When i SSH to the server and do a wget on the domains i get the expected result svn.loc says it needs login and password as configured, vb.loc says 403 because nothing has uploaded to there etc etc. From the clients that i have in my home all give the same error i even installed my main pc today from scratch because of hardware changes and still have the same issues. Server side it seems to be working but when i try to access from clients it does not work.
What can i check to get everything working again, because no sometimes it works other times it don't.
The problem is that the clients can't access the websites except xendevelop.loc the other websites i can't open at all.
What sort of error(s) are you and your clients seeing when attempting to access those websites?
-Eric
Basically there are three steps involved in successfully retrieving a web page.
1) Can the clients resolve the web site's host name?
dig vb.loc
for a quick test,dig vb.loc +trace
for details2) Can the clients ping the web server?
3) Can the clients telnet to the web server's port 80?
telnet servername 80
And, as Eric said, it would sure help if you told us what error the clients actually see :), and what gets logged, if anything, in the Apache error log?
When i try to access the sites by FireFox (All clients windows based) i get that de server is not found the same under telnet.
When trying on server with wget i get the following
wget svn.loc
This is correct because login and pass is needed
wget xendevelop.loc
iptables -L
Apache does not log anything from the client except when it displays the website. Its now also completely random sometimes it works then it does not after x min it works again etc etc.
Thank you for helping and showing me what to do.
Can you please enclose your console output lines in
tags? They will be much better readable then.
I hope that more readable. I just forgot that code tags could be used.
Yeah, much better.
I cannot see any error or problem though in the things you posted. (It's normal that a `dig +trace´ won't find anything for your domains, since they're not known in the Internet.) Can you re-iterate what exactly the problem is and the precise steps to reproduce them?
I try to give you the pricise steps what i do.
The following domains exist:
The following services run on the server just like before i installed Ubuntu and virtualmin.
The domain vb.loc and the location of the control panel are in the main tabs of FireFox and always open, on vb.loc i see 403 forbidden that should be correct because no files are yet uploaded. When i try to go to any of the other locations it can be that it opens correct and everything work, but in most cases i get that the domain will not open, i then get that server could not be found in FireFox (FTP gives the same error), usaully one location will work but from the four domains i never now witch one, if they all fail its easy i go to the virtualmin admin panel and then access the following edit virtual server and then press the domain name on that screen 9 out of 10 it will open even if it failed to do so before. The wierest problem is its random i can never know when something will happen today it seems to work just fine but Sunday when i was trying stuff it did not. First i thought that it was Bind that was acting up but its running fine.
What services can have this kind of effect and what log books can i view to trace the error. I am not really interested in a quick fix this is also fun to do btw.
I think you're on the right track with suspecting "BIND". Often random connection errors like this are caused by incorrectly set up / synced nameservers. When you have two NS of which one is erroneous, clients will randomly choose one and sometimes work and sometimes not.
Unfortunately that's the only idea I currently have where you could go do some digging, otherwise your report that Firefox cannot load the page does not match the positive test results of the commands you executed.
Well it all random try to ftp to ftp.vb.loc works, disconnect forgot something try to connect 2 min later does not work. I am going to ask someone that hase more knowledge of Bind because i hate DNS systems i always get lost.
To find out if it's a nameserver issue or not, you might (instead of trying to load the web page or FTPing) try a DNS resolution those "two minutes later". If the name can be resolved one time and cannot be resolved the next time, we know where to dig further. :)
Well when i do a DNS resolution we get the following
Here you can see that the ip is 192.168.1.123 that is correct thats the ip i used, when i try to ftp to ftp.vb.loc i get
This is around 5 sec after the DNS resolution that i tried connecting to ftp.vb.loc its now around 2 to max 3 min later and i can now connect to ftp.vb.loc.
What nameservers are configured on your workstation(s)? Just the .1.120 one? Did you try emptying the resolver cache (
ipconfig /flushdns
under Windows)?I just see that in your initial
dig
test, your nameserver returns "debianjp.dyndns.org." as NS entry for "vb.loc". I suppose that should rather be "vb.loc." as well, and your nameserver must serve an A record for that.I made a typo with the debianjp.dyndns.org made .loc and changed the Bind cfg's to reflect .loc
The ipconfig /flushdns had no effect but changing the DNS on my system did i now only have one DNS running namely 192.168.1.120 it seems to work now so i test it for a few days like this if it still works sunday or so then its something with the DNS on the systems.
And what nameservers did you have configured before on your workstations?
The workstations get from the DHCP server thats installed on the same box.
The host list is longer but its the same except the fixed-address that ofc changes every time, i have now disabled on my own station automatic DNS and only said that it need to listen to 192.168.1.120.
The IP address 192.168.1.254 is my DSL broadband router that also hold DNS from my provider.
Okay, then the second (provider) nameserver was quite likely the problem. When your workstations query that one to resolve your ".loc" domains, it'll say "I have never heard about such a top-level domain". :) Hence the random failure.
Yes but the primary was 192.168.1.120 secondary was 192.168.1.254 how i understand that when it, was not found on primary it goes to secondary but why would it go to secondary in most of the cases.