LPI 202-450 Practice Test Questions and Exam Dumps Part 15 Q281-300

View Full LPI 202-450  Exam Dumps and Practice Test Dumps

 

Question 281. Which BIND directive specifies the IP addresses on which a DNS server accepts queries?

  1. query-interface
  2. listen-query
  3. allow-query
  4. query-address

Correct Answer: 3. allow-query

Explanation :-

The BIND allow-query directive controls which clients are permitted to submit DNS queries to a server. It can be configured globally in the options statement or more specifically within views or zones. This access control is separate from allow-recursion, which determines which clients may use recursive resolution. Restricting query access can help prevent unauthorized use of a DNS server. Administrators should distinguish between the address on which BIND listens and the clients that are authorized to query it. Properly combining interface and query controls provides more precise DNS access management.

Question 282. Which Apache directive specifies the administrative email address associated with a virtual host?

  1. ServerContact
  2. ServerAdmin
  3. AdminEmail
  4. Webmaster

Correct Answer: 2. ServerAdmin

Explanation :-

The Apache ServerAdmin directive specifies the email address that the server can use to identify the administrator responsible for a site or virtual host. It may appear in server configuration or virtual host definitions and can be used in generated error documents. This setting does not control authentication or mail delivery. ServerName identifies the server hostname, while ServerAlias provides additional hostnames for a virtual host. Keeping administrative contact information accurate can help users and administrators identify who is responsible for a web service when Apache-generated error pages or related information reference the administrator.

Question 283. Which NFS version uses a single well-known port, TCP 2049, for the main NFS protocol?

  1. NFSv2 only
  2. NFSv3 only
  3. NFSv4
  4. NFS over UDP only

Correct Answer: 3. NFSv4

Explanation :-

NFSv4 uses TCP port 2049 as its primary well-known port and integrates functionality that historically involved several separate RPC services. Earlier NFS versions, particularly NFSv2 and NFSv3, commonly depended on additional RPC services such as rpcbind and could use dynamically assigned ports for some operations. NFSv4 also provides improvements such as stronger protocol integration, state management, and support for security mechanisms. Understanding the port differences between NFS versions is useful when configuring firewalls because a firewall policy designed for NFSv3 may not match the requirements of an NFSv4 deployment.

Question 284. Which Samba command validates the syntax and internal consistency of the Samba configuration file?

  1. smbcheck
  2. smbtest
  3. smbverify
  4. testparm

Correct Answer: 4. testparm

Explanation :-

The testparm utility checks the Samba configuration file for syntax and reports configuration information that Samba recognizes. It is commonly run after editing /etc/samba/smb.conf and before restarting or reloading Samba services. The command can help identify invalid parameters and configuration mistakes. smbclient is instead used to access SMB/CIFS resources, while smbstatus reports current Samba connections and locks. Validating the configuration before applying changes is particularly useful on production servers because a configuration error can prevent Samba services from starting correctly.

Question 285. Which DNS record contains the serial number used by secondary servers to determine whether a zone has changed?

  1. SOA
  2. NS
  3. MX
  4. TXT

Correct Answer: 1. SOA

Explanation :-

The SOA, or Start of Authority, record contains the zone serial number. Secondary DNS servers use this serial value to determine whether the zone’s data has changed and whether they need to obtain an updated copy through a zone transfer. Administrators normally increment the serial whenever authoritative zone data is modified. The SOA record also contains refresh, retry, expire, and minimum-related timing information. NS records identify authoritative name servers, MX records identify mail exchangers, and TXT records contain text data. Correct SOA management is therefore important for reliable DNS zone synchronization.

Question 286. Which DHCP message informs a client that the server has accepted its requested IP configuration and lease?

  1. DHCPOFFER
  2. DHCPDISCOVER
  3. DHCPREQUEST
  4. DHCPACK

Correct Answer: 4. DHCPACK

Explanation :-

A DHCPACK message confirms that the DHCP server has accepted the client’s request and is providing the requested configuration and lease. In a typical DHCP exchange, the client begins with DHCPDISCOVER, receives DHCPOFFER, sends DHCPREQUEST, and receives DHCPACK from the selected server. DHCPNAK can instead indicate that the requested configuration is not valid or cannot be provided. Understanding these messages helps administrators identify where DHCP negotiation fails. Packet captures and DHCP client logs can be used to determine whether discovery, offering, requesting, or acknowledgment is the stage causing the problem.

Question 287. Which Postfix parameter identifies the hostname that Postfix uses for itself?

  1. myhostname
  2. server_hostname
  3. mailname
  4. local_hostname

Correct Answer: 1. myhostname

Explanation :-

The Postfix myhostname parameter specifies the fully qualified hostname of the mail system. It is used in several parts of Postfix’s identity and configuration, including default values for other parameters. Correct hostname configuration is important for SMTP communication, message headers, and local mail handling. mydestination specifies destinations for which the server performs local delivery, while mynetworks identifies trusted networks. Administrators can inspect the effective value with postconf myhostname. Incorrect hostname configuration can contribute to mail-delivery problems, DNS inconsistencies, or confusing server identity during SMTP sessions.

Question 288. Which Dovecot command displays the effective configuration for a specific setting or service?

  1. doveadm show
  2. doveconf
  3. dovecotctl
  4. doveconfig

Correct Answer: 2. doveconf

Explanation :-

The Dovecot doveconf utility displays the effective configuration after Dovecot processes its configuration files and included settings. Administrators can use it to inspect individual parameters or obtain configuration information for particular services. This is valuable when troubleshooting because the active configuration may combine values from several files. doveadm is primarily used for administrative operations such as mailbox management and maintenance. Looking at the effective configuration rather than only one configuration file can reveal inherited or overridden settings that explain unexpected Dovecot behavior.

Question 289. Which SSH feature allows a client to use a locally running SSH authentication agent to authenticate to another server through an SSH connection?

  1. X11 forwarding
  2. Local port forwarding
  3. Agent forwarding
  4. Dynamic forwarding

Correct Answer: 3. Agent forwarding

Explanation :-

SSH agent forwarding allows an SSH client to make its authentication agent available through an SSH connection to a remote host. This can allow the remote host to authenticate to another SSH server using keys held by the original client’s agent without copying the private keys to the intermediate system. Agent forwarding should be used carefully because a compromised intermediate host may be able to interact with the forwarded agent during the session. The feature is enabled by the client option -A or corresponding SSH configuration. It is distinct from X11 and network-port forwarding.

Question 290. Which SELinux command displays the security context associated with files in a directory?

  1. ls -Z
  2. lscontext
  3. selabel -l
  4. getcontext

Correct Answer: 1. ls -Z

Explanation :-

The ls -Z command displays SELinux security contexts associated with files and directories. These contexts include components such as user, role, type, and level. The SELinux type is particularly important when determining whether a policy permits a process to access a file. Administrators can use ls -Z during troubleshooting to compare a problematic file’s context with that of similar working files. Commands such as restorecon can restore expected contexts based on SELinux policy definitions. Understanding file contexts is essential when traditional Unix ownership and permissions appear correct but access is still denied.

Question 291. Which nftables command adds a rule that accepts TCP traffic destined for port 22 in an input chain?

  1. nft accept tcp 22 input
  2. nft add rule input tcp dport 22 accept
  3. nft add rule inet filter input tcp dport 22 accept
  4. nft permit tcp input 22

Correct Answer: 3. nft add rule inet filter input tcp dport 22 accept

Explanation :-

The command nft add rule inet filter input tcp dport 22 accept adds a rule to the input chain of the filter table in the inet family, allowing TCP traffic destined for port 22. The referenced table and chain must already exist. Port 22 is commonly used by SSH. Administrators should consider rule order and the chain’s existing policy because an earlier rule may already accept or reject the traffic. Understanding nftables’ family-table-chain-rule hierarchy is important when constructing or troubleshooting firewall configurations.

Question 292. Which DNS record type creates an alias from one hostname to another canonical hostname?

  1. PTR
  2. CNAME
  3. A
  4. SRV

Correct Answer: 2. CNAME

Explanation :-

A CNAME record creates an alias from one DNS name to another canonical hostname. For example, www.example.com can be configured as a CNAME pointing to web.example.com. DNS clients then resolve the canonical name to obtain the relevant address records. A records map names directly to IPv4 addresses, PTR records provide reverse mappings, and SRV records identify services and ports. CNAME records have placement restrictions and generally should not coexist with other data at the same owner name. Administrators should understand these rules when designing DNS records and troubleshooting unexpected resolution behavior.

Question 293. Which Apache directive permanently redirects a requested URL to another location using HTTP status 301?

  1. RedirectPermanent
  2. RedirectTemporary
  3. PermanentURL
  4. RewritePermanent

Correct Answer: 1. RedirectPermanent

Explanation :-

Apache’s RedirectPermanent directive creates a permanent redirect, normally returning HTTP status 301 to the client. It is useful when a resource has moved permanently to another URL and clients or search engines should use the new location. Redirect can also be used with explicit status codes, while RedirectMatch provides pattern-based redirect matching. RedirectPermanent is a straightforward Apache directive for permanent URL changes. Administrators should ensure that redirect targets are correct because incorrect or chained redirects can create accessibility problems and make troubleshooting web applications more difficult.

Question 294. Which NFS command displays the file systems exported by a remote NFS server?

  1. exportfs -r
  2. showmount -e
  3. nfsstat -e
  4. mount.nfs –exports

Correct Answer: 2. showmount -e

Explanation :-

The showmount -e command displays the export list advertised by an NFS server. For example, showmount -e server.example.com can show directories that the server makes available for NFS clients. This is useful for verifying server-side exports before attempting a mount. exportfs is mainly used locally on an NFS server to manage exports, while nfsstat reports protocol statistics. On NFSv4 systems, some aspects of export discovery and namespace behavior differ from older NFS versions, so administrators should consider the NFS version when interpreting command output.

Question 295. Which Postfix command removes a specific message from the mail queue using its queue ID?

  1. postqueue -d
  2. postsuper -d
  3. postfix –delete
  4. mailq -r

Correct Answer: 2. postsuper -d

Explanation :-

The Postfix postsuper -d command deletes messages from the Postfix mail queue. When a queue ID is supplied, the command can remove a specific message, while broader forms can operate on multiple messages. Administrators should use queue-management commands carefully because deleting a message removes it from the queue rather than simply forcing another delivery attempt. postqueue -p displays the queue and postqueue -f requests queue processing. Queue administration is particularly important when dealing with persistent delivery failures, malformed messages, or messages that should no longer be delivered.

Question 296. Which Dovecot command is commonly used to perform administrative operations on user mailboxes?

  1. doveadm
  2. dovecot-admin
  3. dovecontrol
  4. mailadm

Correct Answer: 1. doveadm

Explanation :-

The doveadm utility is Dovecot’s administrative command-line interface. It can perform many mailbox and service-management operations, including searching, moving, expunging, and querying mailbox information depending on the command and permissions. It is useful for maintenance and troubleshooting without requiring direct manipulation of mailbox files. doveconf, by contrast, is used to inspect Dovecot configuration. Administrators should understand the distinction because configuration inspection and mailbox administration involve different tools and operations. The exact doveadm subcommands available can depend on the installed Dovecot version and configuration.

Question 297. Which SSH server directive controls whether public-key authentication is enabled?

  1. EnablePublicKeys
  2. PublicKeyLogin
  3. PubkeyAuthentication
  4. AllowKeyAuth

Correct Answer: 3. PubkeyAuthentication

Explanation :-

The OpenSSH PubkeyAuthentication directive controls whether public-key authentication is allowed by the SSH server. When enabled, users can authenticate using a configured public/private key pair, subject to other SSH authentication and account restrictions. The user’s public key is commonly stored in an authorized-keys file such as ~/.ssh/authorized_keys. This mechanism avoids transmitting a password as the authentication credential and is widely used for administrative access. PasswordAuthentication controls password-based authentication separately, so disabling passwords does not automatically disable public-key authentication.

Question 298. Which SELinux utility restores the default security context of a file based on policy rules?

  1. restorecon
  2. setcon-default
  3. selinuxfix
  4. fixcontext

Correct Answer: 1. restorecon

Explanation :-

The restorecon utility restores SELinux security contexts according to the expected file-context definitions in the SELinux policy. It is commonly used after files have been copied, moved, or created in a location where their contexts do not match the expected policy. For example, restorecon -Rv /var/www/html can recursively restore contexts under a web directory. This differs from chcon, which can make direct context changes but may not survive a later context restoration. Administrators commonly use restorecon when diagnosing SELinux access problems caused by incorrect file labels.

Question 299. Which DNS command can query a specific DNS record type while showing the authoritative answer and other response sections?

  1. host -simple
  2. dig
  3. dnsinfo
  4. named-query

Correct Answer: 2. dig

Explanation :-

The dig utility provides detailed DNS query output, including answer, authority, and additional sections when present. It allows administrators to specify record types such as A, MX, NS, SOA, TXT, or AAAA and can direct queries to a particular DNS server. This makes it particularly useful for diagnosing DNS delegation, authoritative responses, recursion, and zone configuration. The host command is convenient for simpler lookups but generally provides less diagnostic information. Administrators can also use dig +trace to investigate the delegation path from the DNS root toward a target domain.

Question 300. Which Linux command displays the default route and other entries in the kernel routing table?

  1. ip addr
  2. ip neigh
  3. ip route
  4. ip link

Correct Answer: 3. ip route

Explanation :-

The ip route command displays the Linux kernel routing table, including directly connected networks and the default route when one is configured. A default route is commonly shown with a destination of default and identifies the gateway and interface used for traffic destined for networks without a more specific route. ip addr displays interface addresses, ip neigh displays the neighbor table, and ip link displays link-layer interface information. Examining the routing table is a fundamental step when troubleshooting connectivity to remote networks because a correct IP address alone does not guarantee correct packet forwarding.