Differences
This shows you the differences between two versions of the page.
linux_wiki:network_services_overview_nfs [2018/04/12 23:58] billdozor [Host Based] |
linux_wiki:network_services_overview_nfs [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Network Services Overview: NFS ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | This page covers the Network Services objectives, specifically for NFS. | ||
- | |||
- | **Network Services Objectives** | ||
- | * Install the packages needed to provide the service | ||
- | * Configure SELinux to support the service | ||
- | * Use SELinux port labeling to allow services to use non-standard ports | ||
- | * Configure the service to start when the system is booted | ||
- | * Configure the service for basic operation | ||
- | * Configure host-based and user-based security for the service | ||
- | |||
- | ---- | ||
- | |||
- | ====== Lab Setup ====== | ||
- | |||
- | The following virtual machines will be used: | ||
- | * server1.example.com (192.168.1.150) -> Perform all NFS client tests from here | ||
- | * server2.example.com (192.168.1.151) -> Install the NFS server here | ||
- | |||
- | ---- | ||
- | |||
- | ====== Install the packages needed to provide the service ====== | ||
- | |||
- | Install the service | ||
- | <code bash> | ||
- | yum install nfs-utils | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== Configure SELinux to support the service ====== | ||
- | |||
- | * Service agnostic -> [[linux_wiki: | ||
- | |||
- | ---- | ||
- | |||
- | ====== Use SELinux port labeling to allow services to use non-standard ports ====== | ||
- | |||
- | Configuring the < | ||
- | |||
- | **NOTE**: "man semanage-port" | ||
- | |||
- | ---- | ||
- | |||
- | ====== Configure the service to start when the system is booted ====== | ||
- | |||
- | Check Current Service Status | ||
- | <code bash> | ||
- | systemctl status nfs-server | ||
- | </ | ||
- | * Also displays if the service is enabled or disabled | ||
- | |||
- | \\ | ||
- | Enabling a service to start on boot | ||
- | <code bash> | ||
- | systemctl enable nfs-server | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== Configure the service for basic operation ====== | ||
- | |||
- | Enable and Start the service | ||
- | <code bash> | ||
- | systemctl enable nfs-server | ||
- | systemctl start nfs-server | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== Configure host-based and user-based security for the service ====== | ||
- | |||
- | ===== Firewall ===== | ||
- | |||
- | Allow access through the firewall to the NFS service | ||
- | <code bash> | ||
- | firewall-cmd --permanent --add-service=nfs | ||
- | firewall-cmd --reload | ||
- | </ | ||
- | |||
- | \\ | ||
- | Allow access through the firewall to allow the showmount command from clients to work | ||
- | <code bash> | ||
- | firewall-cmd --permanent --add-service=rpc-bind | ||
- | firewall-cmd --permanent --add-service=mountd | ||
- | firewall-cmd --reload | ||
- | </ | ||
- | |||
- | ===== Host Based ===== | ||
- | |||
- | Configure host based access in / | ||
- | <code bash> | ||
- | / | ||
- | |||
- | / | ||
- | </ | ||
- | * Hostname based and network based | ||
- | * Others refused | ||
- | |||
- | Export modifications< | ||
- | ===== User Based ===== | ||
- | |||
- | Default NFS security (sec=sys) is via IP addresses or hostname. | ||
- | |||
- | [[linux_wiki: | ||
- | |||
- | ---- | ||