LFCS Network Service Configuration Questions and Answers — Questions and Answers
Question 1: A system administrator needs to configure a Linux server to act as a caching-only DNS server to speed up name resolution for local clients. Which package is most commonly installed to provide this service?
- dhcpd
- bind (Correct answer)
- net-tools
- samba
Correct answer: bind
BIND (Berkeley Internet Name Domain) is the most widely used software for providing DNS services on Linux. It can be configured as a caching-only server, which stores the results of DNS queries to speed up subsequent requests for the same domain names.
Question 2: You are tasked with setting up a new web server. After installing the Apache HTTP Server package (httpd on RHEL/CentOS, apache2 on Debian/Ubuntu), you create a basic index.html file. Which command should you use to start the web server and ensure it automatically starts on boot?
- service httpd start && chkconfig httpd on
- systemctl start httpd && systemctl enable httpd (Correct answer)
- apachectl start && update-rc.d apache2 defaults
- /etc/init.d/apache2 start && systemctl load apache2
Correct answer: systemctl start httpd && systemctl enable httpd
On modern Linux distributions that use systemd, 'systemctl start <service>' is used to start a service immediately, and 'systemctl enable <service>' is used to configure the service to start automatically at boot time.
Question 3: A Linux server's clock is drifting significantly. To resolve this, you need to configure it to synchronize with a reliable time source on the network. Which of the following is the modern, default service used on most current Linux distributions like RHEL 8+ and recent Ubuntu versions for time synchronization?
- ntpd
- timedatectl
- hwclock
- chronyd (Correct answer)
Correct answer: chronyd
Chrony (chronyd) has replaced the traditional ntpd as the default Network Time Protocol (NTP) daemon on modern distributions like RHEL 8+ and recent versions of Ubuntu. It is designed to be more accurate and faster at synchronizing the system clock, especially for systems with intermittent network connections.
Question 4: A system administrator needs to configure a static IP address for a server running a Debian-based distribution. Which of the following files is the primary location for configuring network interfaces on this system?
- /etc/sysconfig/network-scripts/ifcfg-eth0
- /etc/netplan/01-netcfg.yaml (Correct answer)
- /etc/hostname
- /etc/resolv.conf
Correct answer: /etc/netplan/01-netcfg.yaml
Modern Ubuntu and some other Debian-based systems use Netplan as the default network management tool. Configuration is typically handled by editing a YAML file within the /etc/netplan/ directory, such as /etc/netplan/01-netcfg.yaml, to define static IP addresses, gateways, and DNS servers. While /etc/network/interfaces was used previously, Netplan is the current standard.
Question 5: You are securing a vsftpd (Very Secure FTP Daemon) server and need to enforce the use of SSL/TLS for all connections, including both login and data transfer for local users. Which combination of directives in the `vsftpd.conf` file achieves this?
- ssl_enable=YES
- allow_anon_ssl=YES force_anon_logins_ssl=YES
- ssl_enable=YES force_local_logins_ssl=YES force_local_data_ssl=YES (Correct answer)
- require_ssl_reuse=YES
Correct answer: ssl_enable=YES force_local_logins_ssl=YES force_local_data_ssl=YES
To enforce SSL/TLS, `ssl_enable=YES` must be set to activate SSL. Then, `force_local_logins_ssl=YES` forces local users to use a secure connection to send their password, and `force_local_data_ssl=YES` ensures that the data channels for local users are also encrypted. This combination provides comprehensive encryption for user sessions.
Question 6: Which of the following commands is used to display the current IP address, subnet mask, and other network interface information on a modern Linux system, replacing the older, now-obsolete `ifconfig` command?
- netstat -i
- route -n
- ip addr show (Correct answer)
- arp -a
Correct answer: ip addr show
The `ip` command is the modern standard for network configuration and information retrieval in Linux. The `ip addr show` (or its shorter alias `ip a`) command is specifically used to display information about network interfaces, including their IP addresses, MAC addresses, and state.
A system administrator needs to configure a Linux server to act as a caching-only DNS server to speed up name resolution for local clients.
Which package is most commonly installed to provide this service?