LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Hostname in domain (https://www.linuxquestions.org/questions/linux-software-2/hostname-in-domain-568786/)

jhwilliams 07-12-2007 11:39 AM

Hostname in domain
 
I have a domain domain.org. The DNS servers are somewhere out on the internet at foreign IPs 33.33.33.33 and 44.44.44.44. My webserver is on my local network at 192.168.1.100. I would like to have this webserver host its own domainname, "webserver", so that when I'm on 192.168.1.101 I can type

"rlogin webserver".

Also: Is it possible to make "webserver" the primary DNS server for domain.org, and use 33.33.33.44 and 44.44.44.44 as secondary DNS servers ?

custangro 07-12-2007 12:02 PM

You can edit your /etc/hosts file to include
Code:

webserver <ip of webserver>

jhwilliams 07-12-2007 12:19 PM

Yes, but if I have n clients, that could be time consuming. I'd like to do it on the server side if possible, so that if ask for "webserver" the webserver says "oh that's me, here's some data."

custangro 07-12-2007 12:52 PM

in your zonemaster file in your named.db directory you can add a dns entry

webserver IN A <ip address>

Change the serial number in the file and save and quit the file. Then you restart named

NOTE: Put 2 tabs between the "webserver" and "IN" one tab between the "IN" and "A" and one tab between the "A" and the ip address....

farslayer 07-12-2007 01:18 PM

You would need to install and configure BIND in order to handle DNS resolution for your internal network.

Your internal DNS could point webserver.domain.org to 192.168.1.100

Meanwhile people on the internet using the public DNS servers you mentioned would get pointed to the webserver at it's public IP address..


All times are GMT -5. The time now is 03:02 PM.