LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-12-2007, 12:39 PM   #1
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 208Reputation: 208Reputation: 208
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 ?
 
Old 07-12-2007, 01:02 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
You can edit your /etc/hosts file to include
Code:
webserver <ip of webserver>
 
Old 07-12-2007, 01:19 PM   #3
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Original Poster
Rep: Reputation: 208Reputation: 208Reputation: 208
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."
 
Old 07-12-2007, 01:52 PM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
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....

Last edited by custangro; 07-12-2007 at 01:53 PM.
 
Old 07-12-2007, 02:18 PM   #5
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
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..
 
  


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
How to configure HOSTNAME and DOMAIN DataSheet Linux - General 4 12-26-2006 08:21 PM
Domain name / hostname confusion bhm8hwcm Linux - Networking 9 11-05-2006 04:13 PM
What is the difference between domain name and hostname? davidas Linux - Newbie 9 04-23-2004 02:38 PM
Want to set up a new domain name and hostname? hamster Linux - Networking 6 04-06-2003 01:04 PM
hostname vs domain racediver007 Linux - Newbie 5 03-20-2003 04:30 PM


All times are GMT -5. The time now is 12:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration