Link to home
Start Free TrialLog in
Avatar of certek
certek

asked on

Domain name Service for Red Hat 5.1

I am trying to setup an intranet using Linux (Red Hat Linux 5.1) as my server and a Power Mac as a client machine. During the installation I assigned a Host name and class C IP address to the machine. I was then asked to assign the Primary server IP address. I used the same IP address assigned for the host, thinking that the host machine will also be the server; moreover I gave the machine a FQDN (i.e., nat for host / nat. mydomain.com). I tested the intranet connection by entering the IP address of the server in the browser window on  my Mac and eureka! However, I was unsuccessful when I entered the domain name. Can this problem be solved during installation or do I need to modify a file i.e., host.conf or resolv.conf? Was I correct to use the same IP for host and primary server on the same machine?
Avatar of swwelsh
swwelsh

Sounds you have it set up right. Try adding an entry in resolv.conf as follows and see if it works.

domain mydomain.com
nameserver xxx.xxx.xxx.xxx    (your server ip address)

You can also do this with the /etc/hosts file, for example,

127.0.0.1 localhost
xxx.xxx.xxx.xxx nat.mydomain.com nat
yyy.yyy.yyy.yyy macclient.mydomain.com macclient

where macclient is the name of you mac machine and yyy.yyy.yyy.yyy is the mac's ip address. xxx.xxx.xxx.xxx is the ip of the server

If this works, let me resubmit as an answer
Avatar of certek

ASKER

after altering the resolv.conf to domain mydomain I tried to pull up the Apache welcome page using mydomain.com. I was unsucessful. I than used the FQDN nat.mydomain.com still no luck. The original resolv.conf file read search mydomain  for the first line and namerserver xxx.xxx.xxx.xxx for the second line. I only changed the first line because the second line of the resolv.conf was correct. Do you have any other ideas ?

domain mydomain
If there are only going to be few machines involved you should be able to put entries in /etc/hosts that map the names of the various machines. In the example I gave in the first post the hosts file should tell linux that nat, nat.mydomain.com and the ip number for this machine all refer to the same computer, so all should work. If that's not it, there is probably something to add in your apache setup. You could try removing the nameserver line in resolv.conf and just using the hosts file. You could also run named on the linux machine, but this seems a bit involved for a 2 machine network.
Avatar of certek

ASKER

Thanks alot for your help! I would like create a nameserver ;however I do not know enough about DNS - BIND. I believe I must config the named.boot file to create a namedserver. This also involves creating data files. I can live with entering the IP address until I become more knowledgeable.
ASKER CERTIFIED SOLUTION
Avatar of ernaniaz
ernaniaz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, but I've checked the text before posting this and have an error: Put a "." at start of lines that begin with "604800 IN NS" in the file /etc/named.cache.
--ernaniaz
Avatar of certek

ASKER

emaniaz,
Thanks ! I beginning to get the concept of DNS.