LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-23-2007, 09:30 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
Caching DNS and Website


I have a caching DNS server at the office and the companies website is being hosted my another web hosting company. Intermittently the problem that I am having is only locally from inside the office network I cannot get to the own companies website. We can go to any other website without any issues, it is only the companies website that nobody can get to it. Outside of the company you are fine! I called the web hosting company and we went to megaproxy.com and tested to see if it was their end or my end and we were able to get to the website from the proxy without any issues. But when I try and get their from with the company it says:

PHP Code:
The requested URL could not be retrieved

While trying to retrieve the URLhttp://www.nodomain.com/

The following error was encountered:

    
Unable to determine IP address from host name for www.nodoamin.com 

The dnsserver returned
:

    
Name ErrorThe domain name does not exist

This means that:

 
The cache was not able to resolve the hostname presented in the URL
 
Check if the address is correct

Your cache administrator is webmaster.
Generated Mon23 Jul 2007 15:59:19 GMT by sludge.local.net (squid/2.5.STABLE10
I tried it from the firewall and it is the same. When I try it from the DMZ I can get to it without any problems. I have a caching DNS server and it forwards requests that it can find locally to an external DNS server. What could this be. Very odd! Another point. I do not have port 53 open to only establish or related tcp connections. Does that make a difference. It has been working! Also I have two domains, daman.com and daman.net. I have daman.net redirect all traffic to daman.com. I can ping daman.net and get a reply but I cannot ping daman.com and I cannot get to either domain!

For security reasons I use nodomain.com as the domain.

Should I add a A record pointing to the IP address of the domain or is that a major security risk?

Last edited by metallica1973; 07-26-2007 at 10:07 PM.
 
Old 07-23-2007, 10:56 AM   #2
depam
Member
 
Registered: Sep 2005
Posts: 861

Rep: Reputation: 30
Hi,

Have you tried pinging www.yourcompany.com? If so, does it resolve with your domain name and static IP address? What are the techologies that you are using to cache dns? Do you have a proxy?
 
Old 07-23-2007, 11:09 AM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I have tried pinging www.mycompany.com and zero I get nothing. I can ping the ip address and get a response no problems at all. I use Squid as my proxy and dansguardian as my filter but I am doing this directly from my firewall. This issue is intermittent!

Last edited by metallica1973; 07-23-2007 at 11:10 AM.
 
Old 07-23-2007, 11:58 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ok, well intermittent *could* mean that you are using different name servers or something... use a (you guessed it...) packet sniffer to see where your packets are actually going, and also dedicated dns tools like dig and host to just directly inspect the dns infrastructure, rather than just trying to use it within other tools like ping.
 
Old 07-23-2007, 01:08 PM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
PHP Code:
dig nodomain.com
 
<<>> DiG 9.3.2 <<>> nodomain.com
;; global options:  printcmd
;; Got answer:
;; ->>
HEADER<<- opcodeQUERYstatusNOERRORid65131
;; flagsqr aa rd raQUERY1ANSWER0AUTHORITY1ADDITIONAL0

;; QUESTION SECTION:
;
nodomain.com.                  IN      A

;; AUTHORITY SECTION:
nodomain.com.           60      IN      SOA     server1.nodomain.comdaman.nodomain.com200612291 7200 300 604800 60

;; Query time5 msec
;; SERVER192.168.3.1#53(192.168.3.1)
;; WHENMon Jul 23 14:12:38 2007
;; MSG SIZE  rcvd79 
PHP Code:
host nodomain.com 
has no response

There must be some confusion with the local domain NODOMAIN.com and the NODOMAIN.com for my Hosting company. I know that it is local because you can go to megaproxy.com and put it the domain and bam it is there and all of my clients can get to it externally!help!

Last edited by metallica1973; 07-23-2007 at 01:11 PM.
 
Old 07-23-2007, 06:37 PM   #6
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
What the heck is going on. Now I can get to www.mycompanydomain.com. It is very intermittent. I had a computer that wouldnt install certain windows update. I just reformatted that machine and now everything is back up to normal. Could a trojan,virus, or something had been causing an issue like this? When you have a caching DNS server like the one that I have at my clients site how does it distinguish what is internal mycompanydomain.com(LAN) traffic and www.mycompanydomain.com(WAN) traffic
 
Old 07-24-2007, 09:09 AM   #7
depam
Member
 
Registered: Sep 2005
Posts: 861

Rep: Reputation: 30
Possible. But if you're using squid, then probably you also can't resolve any site since its just a web proxy. Why not trying IPCop? It's an all around proxy,gateway and firewall
 
Old 07-24-2007, 09:17 AM   #8
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I have to rule out the proxy because all of my testing is in front of the proxy and on my firewall. So far so good this morning. I am just trying to understand why it is just my domain. Is there any settings in BIND that should be set so internal request know to go to that IP address. Maybe something is not setup right in BIND?
 
Old 07-26-2007, 09:38 AM   #9
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Ok here is a new update. I can get to the website in the DMZ but not inside of the network on any computer. I know that it has something to due with BIND. Where should I start looking?
 
Old 07-26-2007, 06:39 PM   #10
The_Dude
LQ Newbie
 
Registered: Jul 2007
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by metallica1973
Ok here is a new update. I can get to the website in the DMZ but not inside of the network on any computer. I know that it has something to due with BIND. Where should I start looking?
Does your firewall run PAT? If so, you are going to be having problems till hell freezes over. The explanation is rather long, if you are interested, check Cisco's site for details. My suggestion to you is split DNS. Run an internal authoritative DNS server that services only your internal clients, external clients are serviced by your external service provider. Add the forward and reverse records to your DNS tables. That should take care of your woes. Also, check to make sure that Bind is not querying on port 53. A lot of sites hate this. So if you have the line:

query-source address * port 53;

in your named.conf, remove it.

much love,

The Dude
 
Old 07-26-2007, 10:17 PM   #11
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
The Dude,

I removed:

query-source address * port 53;

and restart named

and still the same thing! I have a caching DNS server that does split the DNS responsibilities. It resolves internal host fine and then forwards any requests that it cant satisfy to external DNS servers. Where should I begin looking. It is only the #$!@#$!@#$ companies website that we cannot get to0. But from the DMZ I do not have a problem!

Also another note:

The domain inside the network (mycompany.com)is the same as the website(mycompany.com). So how does DNS no the diffence and where to send requests too. In other words internal from external and the other way around!

Last edited by metallica1973; 07-26-2007 at 10:19 PM.
 
Old 07-27-2007, 12:14 PM   #12
The_Dude
LQ Newbie
 
Registered: Jul 2007
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by metallica1973
The Dude,

I removed:

query-source address * port 53;

and restart named

and still the same thing! I have a caching DNS server that does split the DNS responsibilities. It resolves internal host fine and then forwards any requests that it cant satisfy to external DNS servers. Where should I begin looking. It is only the #$!@#$!@#$ companies website that we cannot get to0. But from the DMZ I do not have a problem!

Also another note:

The domain inside the network (mycompany.com)is the same as the website(mycompany.com). So how does DNS no the diffence and where to send requests too. In other words internal from external and the other way around!
Sigh,

Is your firewall running PAT (port address translation)? If it is, you can not use a caching nameserver, period.

Second, from the information that you have posted, it does not sound like you have a split DNS setup correctly. Please post your config files:

/etc/resolv.conf, /etc/named.conf, and your zone files.
 
Old 07-27-2007, 05:57 PM   #13
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I use IPTABLES and I use NAT. As far as bind is concernced here is my conf files:

/etc/resolv.conf

PHP Code:
search mycompanydomain.com

nameserver 192.168.3.1 
/etc/named.caching-nameserver.conf

PHP Code:
acl mycompanydomain.com 192.168.3.0127.0/8; };

options {
        
listen-on port 53 127.0.0.1192.168.3.1; };
//      listen-on-v6 port 53 { ::1; };
        
directory       "/var/named";
        
dump-file       "/var/named/data/cache_dump.db";
        
statistics-file "/var/named/data/named_stats.txt";
        
memstatistics-file "/var/named/data/named_mem_stats.txt";
//      query-source    port 53;
//      query-source-v6 port 53;
        
allow-query     127.0.0.1192.168.3.0/27;  };
        
notify no;
        
forwarders      XX.XX.XX.XXXX.XX.XX.XX;  };

};
logging {
        
channel default_debug {
                
file "data/named.run";
                
severity dynamic;
        };
};

view localhost_resolver {
        
match-clients      localhost192.168.3.0/27; };
        
match-destinations localhost192.168.3.0/27;  };
        
recursion yes;
        include 
"/etc/named.rfc1912.zones";

}; 
var/named/127.0.0.1.zone

PHP Code:
$TTL 1W
$ORIGIN 0.0.127
.in-addr.arpa.
@               
IN SOA          localhost.   root.localhost. (
                                
42              serial (dadams)
                                
2D              refresh
                                4H              
retry
                                6W              
expiry
                                1W 
)            ; minimum

                IN NS           localhost
.
1               IN PTR          localhost
/var/named/zone.com.Mycompanydomain

PHP Code:
$TTL 1D
;
;       
Anythime you make a change to the domain change the "serial setting below. Here is the format "YYYYMMDDI"
;
Mycompanydomain.com.                    IN     SOA     DNS_SERVER.Mycompanydomain.com. user.Mycompanydomain.com. (

                           200612291 ; serial
                           2H        ; refresh
                           5M        ; retry
                           1W        ; retry
                           1M        ; expire
                        )


@                       IN      NS           DNS_SERVER.Mycompanydomain.com.

DNS_SERVER.Mycompanydomain.com.                              IN  A      192.168.3.1
nameserver                                      IN  CNAME  DNS_SERVER.Mycompanydomain.com.
WS_1.Mycompanydomain.com.                         IN  A      192.168.3.2
WS_2.Mycompanydomain.com.                              IN  A      192.168.3.5
WS_3.Mycompanydomain.com.                         IN  A      192.168.3.30
WS_4.Mycompanydomain.com.                           IN  A      192.168.3.27
WS_5.Mycompanydomain.com.                               IN  A      192.168.3.21                                                       
;WS_6.Mycompanydomain.com.                            IN  A      192.168.3.21
;Mycompanydomain.com                                   IN A            ...
IP.ADDR.OF.DOMAIN 
/var/named/revp.192.168.3.0

PHP Code:
$TTL 1D
@               IN      SOA             DNS_SERVER.Mycompanydomain.comroot.Mycompanydomain.com. (
                                
200612171       serial 
                                2H              
refresh (8 hours)
                                
5M              retry (4 hours)
                                
1W              expire (4 weeks)
                                
1M              minimum (1 day)
                                )

;               
Define the authoritative name server
                 IN     NS             DNS_SERVER
.Mycompanydomain.com.

;               
Our Hostin numeric order
1                IN     PTR             DNS_SERVER
.Mycompanydomain.com.
2                IN     PTR             WS_1.Mycompanydomain.com
3                IN     PTR             WS_2
.Mycompanydomain.com.
4                IN     PTR             WS_3.Mycompanydomain.com.
5                IN     PTR             WS_4.Mycompanydomain.com.
6                IN     PTR             WS_5.Mycompanydomain.com.
7                IN     PTR             WS_6.Mycompanydomain.com.
;
8                IN     PTR             WS_7.Mycompanydomain.com

Last edited by metallica1973; 07-27-2007 at 07:31 PM.
 
Old 07-27-2007, 06:38 PM   #14
GregLee
Member
 
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
If I understand you, it's just the single name<->ip-address look-up that causes a problem. So why not just put this name/address in the static /etc/hosts table?
 
Old 07-27-2007, 07:30 PM   #15
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I tryed that as well and add the ip to domain translation in /etc/hosts! What next?
 
  


Reply



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
dns caching? codec Linux - Networking 7 07-04-2005 06:02 PM
DNS is not caching Mike Healan Mandriva 4 12-24-2004 08:53 PM
DNS still slow after installing caching DNS mooreted Linux - Networking 16 01-01-2004 12:18 AM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 01:54 PM
Caching DNS lookups vikasa Linux - Networking 0 06-26-2003 12:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration