LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2013, 01:20 PM   #1
rpmacaspac
Member
 
Registered: Jul 2013
Distribution: centos 6
Posts: 48

Rep: Reputation: Disabled
DNS bind locally(LAN) cant resolve my fqdn


im all set up. my configuration is all done. i can ping my hostname. i can nslookup my ipaddr. it can resolv my ip addr. i can dig my ipaddr and prompt and answer.

Since I want my site to be viewed locally. my fqdn must be searchable in anothers computer browser. Other pc is using windows by the way and it can see my page just typing my ip but it can't browse my page using my domain name.

i enable my port 80,53(tcp,udp)and i dont know if it has something to do with port forwarding.
 
Old 09-03-2013, 01:37 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
If I get you right you just need to edit dns-settings for yor domain.
That means you login to <whatever your nameserver for domain is> and add an A-record for www.yourdomain pointing to your public ip.
If your server is on private ip, behind a firewall, then you also need to configure port forwarding.
(When you say you can ping your hostname, you mean you can ping it from the server itself, right?)
 
Old 09-03-2013, 01:46 PM   #3
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 262

Rep: Reputation: 54
@OP

Do you have the second machine set up to use your DNS server? If so, running the same nslookup command should yield the same results. If not, look into your network settings on the Windows machine and change it's DNS to look at your DNS server.
 
Old 09-03-2013, 02:23 PM   #4
rpmacaspac
Member
 
Registered: Jul 2013
Distribution: centos 6
Posts: 48

Original Poster
Rep: Reputation: Disabled
yes i can ping it. i add "www.rolem.apc.local. IN A 192.168.1.8" in forward.zone and is still the same.

i had running centos on my laptop and windows7 on my pc in the same LAN. if i type 192.168.1.8 in my windows browser which is my centos ip it outputs my html page. but it coulnt find it when i type rolem.apc.local

do i need to configure my windows just to resolv my domain name
 
Old 09-03-2013, 02:37 PM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
So you have a local hostname only, it's not registered. I got you wrong there so forget about my first post.
How is your network setup?
Do you have a functioning DNS server on your LAN?
One easy way to do it - and necessary if you don't have a dns server - if it's just one computer that needs to reach your site, then add fqdn+ip in their hosts file.
 
Old 09-03-2013, 04:52 PM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by rpmacaspac View Post
yes i can ping it. i add "www.rolem.apc.local. IN A 192.168.1.8" in forward.zone and is still the same.

i had running centos on my laptop and windows7 on my pc in the same LAN. if i type 192.168.1.8 in my windows browser which is my centos ip it outputs my html page. but it coulnt find it when i type rolem.apc.local

do i need to configure my windows just to resolv my domain name
MS win7 can be stupid at times with local DNS. just edit the hosts file in win7 (as administrator) and you will be fine.

1. click on start
2. click on all programs
3. accessories
4. RIGHT CLICK wordpad, run as administrator. if you have UAC still enabled, tell it YES.
5. open c:\windows\system32\drivers\etc\hosts

edit it to look something like the following:

Code:
# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
192.168.222.1		server
192.168.222.2		workstation_1
192.168.222.3		workstation_2
192.168.222.4		workstation_3
192.168.222.5		workstation_4
192.168.222.6		workstation_5
save, reboot, and you should be set.
 
Old 09-03-2013, 11:09 PM   #7
rpmacaspac
Member
 
Registered: Jul 2013
Distribution: centos 6
Posts: 48

Original Poster
Rep: Reputation: Disabled
still the same. ill try again later

Last edited by rpmacaspac; 09-03-2013 at 11:21 PM.
 
Old 09-03-2013, 11:24 PM   #8
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
if you adjusted your win7 hosts file as administrator, rebooted and are still having the same problem, then it is a MS problem. the hosts file just like the /etc/hosts in Linux tells the computer who the IP belongs to.

ex: a good way to block things like doubleclick.net and what are in the MS world is to put that in the hosts file as:
Code:
127.0.0.1     doubleclick.net
when the computer, ANY computer, is starting its quarry as to how to resolve a DNS, the very first place it looks is always itself. who am i is what the computer asks. in my example above when a computer is resolving for doubleclick.net that computer will resolve to 127.0.0.1, aka. HOME, aka, itself and look no further. in other words even if the web page has a link to that advertising/spy/malware/bloated site your computer will never actually go there as it believes it is doubleclick.net what a lovely tool.

so if you properly populated your hosts file with the proper IP and URL, and it is still not going to the correct location, then it is your win7 box doing something stupid, but those are rather big IF's
 
1 members found this post helpful.
Old 09-04-2013, 05:04 AM   #9
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
Thats correct making an entry in c:\windows\system32\drivers\etc\hosts properly is the right solution to your prob, if it si not working for you .. go ahead to the control panel-->administration-->services (if i recalled it corectly) and check the concerned services are ok on the win 7 machine or not.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
BIND - reverse dns queries only working locally, forward dns works fine. SloS13 Linux - Networking 3 08-25-2011 01:46 PM
Using BIND to resolve internal non-FQDN names ddenton Linux - Server 1 09-03-2009 01:20 PM
DNS bind cant resolve IP and hostname dwarf007 Linux - Software 1 01-14-2006 09:42 AM
BIND - Locally OK, LAN cleints unable to resolve? Xaque208 Linux - Networking 2 08-08-2005 10:32 AM
BIND/DNS: Some subdomains resolve, some don't natetheros Linux - Networking 0 04-22-2005 07:36 PM


All times are GMT -5. The time now is 12:50 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration