How do I set up Host and (nis/dns)Domain Names

How do I set up Host and (nis/dns)Domain Names

Post by Herb » Wed, 12 Mar 2003 11:06:25



I am completely new to Linux and I am trying to complete a networking
project for university.

If I am using DHCP on my network (to assign ip addresses , of course) and I
want different NFS servers in different departments to be accessible to only
certain hosts in their departments - for example, one nfs server in the
marketing department is accessible by only 24 hosts (of 72) in that
department; how do I specify those hosts?

From reading the Linux Network Administrators Guide I get the following file
contents (slightly rewritten for my use)

SERVER
---------
/etc/exports

/home    m1(rw)   m2(rw)   m3(rw)
# the home directory is mountable to the hosts m1.market.bogus.ca,
m2.market.bogus.ca, and m3..market.bogus.ca

/usr/bin    m*.marketing.bogus.ca
# the /usr/bin directory is mountable to any host in market.bogus.ca
starting with the letter "m" - like m1.market.bogus.ca

/usr/test 192.168.1.105 (ro)
#the /usr/test directory is mountable to the hosts with ip address
192.168.1.105

----------
/etrc/hosts.allow and /etc/hosts.deny woudl be set up to allow only my
network (192.168.1.0) and deny ALL.
-----------

CLIENT
--------
cat /etc/fstab
nfs1.market.bogus.ca:/home   /mnt    nfs    rw,hard,intr    0    0
------
in a start-up script or at a prompt , I add...
mount nfs.market.bogus.ca: /home
--------

Use of a specific ip is straight forward, but that ip address is only useful
if it is a static address - my goal is dhcp assigned addresses for my
workstations/hosts.

I assume that I specify them by host name.  How is that set on a host name?
How are domain names set and are they dns domains or nis domains?  How is
the other domain name set?  How is a hierarchy of domain names set
(bogus.ca, market.bogus.ca, engineering.bogus.ca, and so on) Does the NFS
server need a domain name set to be identical to the domain name of its
clients (like nis)?

Enlightenment is much appreciated. :o)

 
 
 

How do I set up Host and (nis/dns)Domain Names

Post by Herb » Sat, 15 Mar 2003 05:11:06


I am completely new to Linux and I am trying to complete a networking
project for university.

If I am using DHCP on my network (to assign ip addresses , of course) and I
want different NFS servers in different departments to be accessible to only
certain hosts in their departments - for example, one nfs server in the
marketing department is accessible by only 24 hosts (of 72) in that
department; how do I specify those hosts?

From reading the Linux Network Administrators Guide I get the following file
contents (slightly rewritten for my use)

SERVER
---------
/etc/exports

/home    m1(rw)   m2(rw)   m3(rw)
# the home directory is mountable to the hosts m1.market.bogus.ca,
m2.market.bogus.ca, and m3..market.bogus.ca

/usr/bin    m*.marketing.bogus.ca
# the /usr/bin directory is mountable to any host in market.bogus.ca
starting with the letter "m" - like m1.market.bogus.ca

/usr/test 192.168.1.105 (ro)
#the /usr/test directory is mountable to the hosts with ip address
192.168.1.105

----------
/etrc/hosts.allow and /etc/hosts.deny woudl be set up to allow only my
network (192.168.1.0) and deny ALL.
-----------

CLIENT
--------
cat /etc/fstab
nfs1.market.bogus.ca:/home   /mnt    nfs    rw,hard,intr    0    0
------
in a start-up script or at a prompt , I add...
mount nfs.market.bogus.ca: /home
--------

Use of a specific ip is straight forward, but that ip address is only useful
if it is a static address - my goal is dhcp assigned addresses for my
workstations/hosts.

I assume that I specify them by host name.  How is that set on a host name?
How are domain names set and are they dns domains or nis domains?  How is
the other domain name set?  How is a hierarchy of domain names set
(bogus.ca, market.bogus.ca, engineering.bogus.ca, and so on) Does the NFS
server need a domain name set to be identical to the domain name of its
clients (like nis)?

Enlightenment is much appreciated. :o)

 
 
 

How do I set up Host and (nis/dns)Domain Names

Post by John Oliv » Sat, 15 Mar 2003 05:45:51



> If I am using DHCP on my network (to assign ip addresses , of course) and I
> want different NFS servers in different departments to be accessible to only
> certain hosts in their departments - for example, one nfs server in the
> marketing department is accessible by only 24 hosts (of 72) in that
> department; how do I specify those hosts?

Give each of those departments their own subnet, and only allow
connections from hosts on the loacl subnet.  You could give the NFS
servers no default route so they could only talk to hosts on the local
network, or use iptables, or use tcp_wrappers, or set this in
/etc/exports...

--
John Oliver, CCNA                            http://www.john-oliver.net/
Linux/UNIX/network consulting         http://www.john-oliver.net/resume/
***               sendmail, Apache, ftp, DNS, spam filtering         ***
****                Colocation, T1s, web/email/ftp hosting          ****

 
 
 

1. NIS domain names and DNS domain names not matching.

We are using a Solaris2.5.1 implementation of NIS (Not NIS+, e have SGI
systems on the network).  We have set the -b in the Makefile to resolve
hosts from DNS.  The DNS server has most of our hosts in a domain named
"houston.domain.com" and we use the NIS defaultdoamin of "domain.com"
There are also systems in midland and zimbabwe in DNS domains
"midland.domain,com" and "zimbabwe.domain.com".  I would like to be able
to resolve a host from NIS that may be in any of those domains without
specifying the .---.domain.com.

My /etc/resolv.conf looks like this;

search domain.com
hostresorder bind
nameserver 55.55.55.01
nameserver 55.55.55.02
search domain.com houston.domain.com \
midland.domain.com zimbabwe.domain.com

from an NIS client, I can ping foobar.zimbabwe.domain.com, but not
foobar.

The only workaround I have found thus far is to set aliases in DNS like
this;

55.45.00.200   foobar.zimbabwe.domain.com foobar.domain.com

Anyone have a better solution or a suggestion which might make life
easier?  Yes, I have to do it this way....policy.  No, the NIS/DNS names
below are not real.

Thanks in advance,
--

Anadarko Petroleum Corp, Houston (281)876-8619

UNIX doesn't ask you to confirm -- if you didn't want it to do what you
asked, why did you ask?'' -- Frank Willison, O'Reilly & Associates

2. Welcome to comp.unix.shell [Frequent posting]

3. Host name, primary name, domain name...?

4. Realtime Linux Distribution wanted

5. DNS w/ NIS Domain Name Questions

6. httpd and openssl update conflict

7. /etc/hosts (or NIS host map): official-host-name vs nicknames

8. Help: cdrom auto-probe hangs!!

9. NIS+ and DNS domain names

10. What breaks when NIS+ & DNS domain names are different

11. RESOLVE Domain Names: hosts file FIRST, then DNS????

12. Using different domain names in NIS+ and DNS namespace?

13. DNS and NIS same domain name