DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th May 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Thanked 1 Time in 1 Post
Default Question about DNS.

Hi,

When it comes to *nix administration I know my way around, but one thing that I'm a little confused about is the function of BIND. Here's the problem: I have a server that's running FreeBSD 7 and I also have a domain name that it is pointed to the IP address of my server. I have a website that's up and running but what's weird is that when I browse the website using my domain name, there are certain things missing (title of website is not being displayed in the web browser and I can't get to the administrator page). But if I browse the website using the IP address of my server, everything works just fine. I did a nslookup on the domain name, and it showed an IP different from the server that the domain name is pointed to.

So here's my question: Is this happening because I didn't configure the DNS for that domain name on my server? If I configure BIND correctly for my domain name, will I then be able to browse through my website without a problem using the domain name?

Thanks for the help!
Reply With Quote
  #2   (View Single Post)  
Old 16th May 2008
marco64 marco64 is offline
Real Name: Marco
Port Guard
 
Join Date: May 2008
Location: Italy
Posts: 15
Thanked 1 Time in 1 Post
Default

So here's my question: Is this happening because I didn't configure the DNS for that domain name on my server? If I configure BIND correctly for my domain name, will I then be able to browse through my website without a problem using the domain name?

Probably not because as first thing you need to route on the actual server.

I think you are being redirected to the router's IP or some other IP that is visible from outside (WAN , Internet) if this is not handled you will not browse the /var/www/some_dir_where_there_are_the_web-pages

but

Your_IP/someplace

on the computer that You use (the client) handle the hosts.

On nix this is usually /etc/hosts
On Win this is in WINxxx/System32/drivers/etc/hosts

put something like:

actual_LAN's_server_ip www.my_domain.com

I have a public IP: 62.111.111.111
My Web server: 192.168.0.200
My client (browser): 192.168.0.100
thus the first 2 lines in my hosts are:

127.0.0.1 localhost
192.168.0.200 www.my_domain.com

Try. You should be able in seeing it.
Reply With Quote
  #3   (View Single Post)  
Old 17th May 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Thanked 1 Time in 1 Post
Default

I tried that, but that's not the problem. Let me give a little background so that it may be easier to understand the problem.

My FreeBSD server is a dedicated server that's in a data center. My friend owns a domain name that I'm using, so I asked him that he pointed the domain name to my server's IP address. Now, I can browse the domain name and view the website just fine from any computer (inside the LAN or outside), but there are certain little things that are missing in the website when I view it using the domain name. But if I use the IP of my server, there's nothing missing in the website.

Now here's what I find weird: If I ping or do a nslookup on the domain name that's pointed to my server's IP, I get a reply from an IP that's not my server's IP address. And if I browse the domain name, I can view my website just fine (with the exception of certain missing things).

Is this something that needs to be worked on the registrar of the domain name, or do I need to configure DNS for the domain name on my server?
Reply With Quote
  #4   (View Single Post)  
Old 17th May 2008
marco64 marco64 is offline
Real Name: Marco
Port Guard
 
Join Date: May 2008
Location: Italy
Posts: 15
Thanked 1 Time in 1 Post
Default

ah!

If I ping or do a nslookup on the domain name that's pointed to my server's IP, I get a reply from an IP that's not my server's IP address.

Think that the issue stems from an non-updated DNS server.

I have a local cache DNS server. The first time that I nslookup a name it cannot handle and gets the record from another authoritative DNS near to me. From that time on the backup server continues to give the first record.

Investigating in this direction should bring you to find "who" still caches the old IP.
Reply With Quote
  #5   (View Single Post)  
Old 17th May 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by marco64 View Post
Investigating in this direction should bring you to find "who" still caches the old IP.
Thanks for the help!

So what should I do once I find who caches the old the IP? And how can I find who is caching the IP (with "whois" command ?)?

Sorry if this a stupid question.
Reply With Quote
  #6   (View Single Post)  
Old 17th May 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Quote:
Originally Posted by bigb89 View Post
Thanks for the help!

So what should I do once I find who caches the old the IP? And how can I find who is caching the IP (with "whois" command ?)?

Sorry if this a stupid question.
There might be million of DNS servers caching your old IP, you cant find all of them. They will update the new IP, just be patient, the propagation time might take long. And the 2nd question, I would rephrase to: how can I find the authorative DNS server of my domain name?

Yes whois command would be an appropriate way, but it might be a bit dated. To check the current DNS server, ask your friend to log in the domain admin website and check the dns server address.
__________________
The power of plain text? It can control an entire OS
Reply With Quote
  #7   (View Single Post)  
Old 18th May 2008
marco64 marco64 is offline
Real Name: Marco
Port Guard
 
Join Date: May 2008
Location: Italy
Posts: 15
Thanked 1 Time in 1 Post
Default

if can be of help:

sometimes , as 18Googol2 pointed out, takes a lot of time to having all DNS servers to update. Therefore I point my server or client to the DNS server that was holding the domain informations in first place and check if all went well. In this case this will be that of your friend or the DNS that your friend managed.
Reply With Quote
  #8   (View Single Post)  
Old 21st May 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Thanked 1 Time in 1 Post
Default

Thanks for all the help guys.

The DNS issue just got a little weirder. The best way to explain the issue is by letting you guys see for yourselves. Try going to this domain (domain pointed to my server):

www.ibbi.org (this will go to the home page)

www.ibbi.org/administrator (it will all show the home page, but its supposed to go to the administrator section)

ibbi.org (it will go to the home page, but it shows the IP of the server where you typed the URL in the web browser)

ibbi.org/administrator (it shows a blank page)

http://216.110.3.218/administrator (this is the IP of my server, and it shows the correct administrator page).

Now, what could be causing all of this to happen? Is this due to DNS issues still? Does this has to do with my server or with the domain's registrar?
Reply With Quote
  #9   (View Single Post)  
Old 21st May 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Quote:
Originally Posted by bigb89 View Post
Thanks for all the help guys.

The DNS issue just got a little weirder. The best way to explain the issue is by letting you guys see for yourselves. Try going to this domain (domain pointed to my server):

www.ibbi.org (this will go to the home page)

www.ibbi.org/administrator (it will all show the home page, but its supposed to go to the administrator section)

ibbi.org (it will go to the home page, but it shows the IP of the server where you typed the URL in the web browser)

ibbi.org/administrator (it shows a blank page)

http://216.110.3.218/administrator (this is the IP of my server, and it shows the correct administrator page).

Now, what could be causing all of this to happen? Is this due to DNS issues still? Does this has to do with my server or with the domain's registrar?
View source www.ibbi.org/administrator:

Quote:
<html>
<head><title></title></head>
<frameset cols='*' rows='*'>
<frame src='http://216.110.3.218/' frameborder='0' scrolling='Auto' noresize marginwidth='0' marginheight='0'>
</frameset>
<!--
<noframes><body>Frame required.</body></noframes>
-->
</html>
Whichever HTTP request to www.ibbi.org is, it will fetch the static content of the root dir of the IP 216.110.3.218. Try www.ibbi.org/Testing and you will see what I mean.

Change src='http://216.110.3.218/' to src='http://216.110.3.218/administrator', you will see what you wish. However, its a dirty fix. What you should do is:

- Log in the website that manages the domain ibbi.org.

- Point the domain to IP 216.110.3.218 (currently point to 66.113.136.229 & 66.113.136.225)

- Point the host www.ibbi.org to IP 216.110.3.218 (currently point to 66.113.136.225)
__________________
The power of plain text? It can control an entire OS

Last edited by 18Googol2; 21st May 2008 at 06:17 AM.
Reply With Quote
Old 21st May 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,142
Thanked 182 Times in 149 Posts
Default

I get this IP address for www.ibbi.org
Code:
$ dig www.ibbi.org

; <<>> DiG 9.3.4 <<>> www.ibbi.org
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39776
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.ibbi.org.                  IN      A

;; ANSWER SECTION:
www.ibbi.org.           14400   IN      A       66.113.136.225

;; Query time: 276 msec
;; SERVER: 192.168.222.10#53(192.168.222.10)
;; WHEN: Wed May 21 23:35:09 2008
;; MSG SIZE  rcvd: 46
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 22nd May 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Thanked 1 Time in 1 Post
Default

I really appreciate all the help.

I contacted my friend (the one with access to the domain name registrar) and told him the whole issue. I asked that he take a look to see why the domain name is pointing to a different IP when you "dig" it or "ping" and correct that problem since its probably to do with the domain being misconfigured in the registrar.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
external drive partition question + fdisk question gosha OpenBSD General 15 15th June 2009 02:00 PM


All times are GMT. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick