|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
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! |
|
|||
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. |
|
|||
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? |
|
|||
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. |
|
|||
Quote:
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. |
|
|||
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. |
|
|||
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? |
|
||||
Quote:
Quote:
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. |
|
|||
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 |
|
|||
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. |
|
|
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 |