LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DNS bind locally(LAN) cant resolve my fqdn (https://www.linuxquestions.org/questions/linux-newbie-8/dns-bind-locally-lan-cant-resolve-my-fqdn-4175475733/)

rpmacaspac 09-03-2013 12:20 PM

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.

pingu 09-03-2013 12:37 PM

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?)

YankeePride13 09-03-2013 12:46 PM

@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.

rpmacaspac 09-03-2013 01:23 PM

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

pingu 09-03-2013 01:37 PM

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.

lleb 09-03-2013 03:52 PM

Quote:

Originally Posted by rpmacaspac (Post 5021064)
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.

rpmacaspac 09-03-2013 10:09 PM

still the same. ill try again later

lleb 09-03-2013 10:24 PM

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

SAbhi 09-04-2013 04:04 AM

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.


All times are GMT -5. The time now is 01:52 PM.