LFCS Certification Network Service Configuration 3 — Questions and Answers
Question 1: Which NFS client command mounts a remote NFS share at /mnt/data from server 192.168.1.10 sharing /exports/data?
- mount -t nfs 192.168.1.10:/exports/data /mnt/data (Correct answer)
- nfs mount 192.168.1.10 /exports/data /mnt/data
- mount --bind 192.168.1.10:/exports/data /mnt/data
- smbmount 192.168.1.10:/exports/data /mnt/data
Correct answer: mount -t nfs 192.168.1.10:/exports/data /mnt/data
mount -t nfs specifies the NFS filesystem type and uses server:path notation to identify the remote export.
Question 2: In /etc/exports, which option grants read-write access and maps remote root to the local root user?
- (rw,no_root_squash) (Correct answer)
- (rw,root_squash)
- (ro,all_squash)
- (rw,anonuid=0)
Correct answer: (rw,no_root_squash)
no_root_squash allows remote root to act as local root; without it root_squash is the secure default.
Question 3: Which command applies changes made to /etc/exports without restarting the NFS server?
- nfsstat -r
- exportfs -ra (Correct answer)
- mount -a
- service nfs reload
Correct answer: exportfs -ra
exportfs -ra re-exports all directories listed in /etc/exports, picking up any edits.
Question 4: What does the 'nameserver' directive in /etc/resolv.conf specify?
- The local hostname of the machine
- The IP address of a DNS resolver to query (Correct answer)
- The default gateway for the network
- The NTP server address
Correct answer: The IP address of a DNS resolver to query
Each 'nameserver' line lists an IP of a DNS recursive resolver the system will query for lookups.
Question 5: Which xinetd/inetd replacement is commonly used in modern Linux to manage on-demand TCP services?
- tcpd
- systemd socket activation (Correct answer)
- xinetd
- inetd
Correct answer: systemd socket activation
systemd socket units replace inetd/xinetd by starting services on-demand when connections arrive.
Question 6: A service fails to bind to port 80 when run as a non-root user. Which capability must be granted to allow this?
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE (Correct answer)
- CAP_SYS_ADMIN
- CAP_NET_BROADCAST
Correct answer: CAP_NET_BIND_SERVICE
CAP_NET_BIND_SERVICE allows a process to bind to privileged ports (below 1024) without full root.
Question 7: Which firewalld command opens port 8080/tcp permanently in the default zone?
- firewall-cmd --add-port=8080/tcp
- firewall-cmd --zone=public --add-port=8080/tcp --permanent (Correct answer)
- iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
- ufw allow 8080/tcp
Correct answer: firewall-cmd --zone=public --add-port=8080/tcp --permanent
The --permanent flag saves the rule across reboots; without it the rule is only active until next restart.
Which NFS client command mounts a remote NFS share at /mnt/data from server 192.168.1.10 sharing /exports/data?