LPIC 2 202-450 Practice Questions with Explanations

Free LPIC 2 202-450 practice questions. 23 of them, each with the correct answer, a full explanation, and the reason every other option is wrong. These are real questions from the 202-450 exam, not paraphrases, and every explanation is written out rather than just marking the right letter.

They are drawn from the same bank as the full 202-450 pack, which has 120 questions in total.

Get the full 202-450 question bank (120 questions) →

202-450 practice questions

Question 1

On a Linux router, packet forwarding for IPv4 has been enabled. After a reboot, the machine no longer forwards IP packets from other hosts. The command: echo 1 > /proc/sys/net/ipv4/ip_forward temporarily resolves this issue. Which one of the following options is the best way to ensure this setting is saved across system restarts?

  • A. Add echo 1 > /proc/sys/net/ipv4/ip_forward to the root user login script
  • B. Add echo 1 > /proc/sys/net/ipv4/ip_forward to any user login script
  • C. In /etc/sysct1.conf change net.ipv4.ip_forward to 1
  • D. In /etc/rc.local add net.ipv4.ip_forward = 1
  • E. In /etc/sysconfig/iptables-config add ipv4.ip_forward = 1
Show answer and explanation ▾

Correct answer: C

The /etc/sysctl.conf file is the standard configuration file for persistent sysctl settings on Linux systems. Setting net.ipv4.ip_forward = 1 in this file ensures the kernel parameter is applied at boot time through the sysctl service. This is the proper, persistent method endorsed by Linux distributions for maintaining kernel parameters across reboots.

Why the other options are wrong:

  • A. Login scripts only execute when a user logs in, not at system boot, and root may not always log in.
  • B. Relying on user login scripts is unreliable and won't execute if no user logs in after boot.
  • D. The /etc/rc.local syntax is incorrect; it should use sysctl format (net.ipv4.ip_forward = 1) but sysctl.conf is the proper location.
  • E. The iptables-config file is for iptables-specific settings, not general kernel parameters, and the syntax is wrong.

Question 2

What option in the client configuration file would tell OpenVPN to use a dynamic source port when making a connection to a peer?

  • A. src-port
  • B. remote
  • C. source-port
  • D. nobind
  • E. dynamic-bind
Show answer and explanation ▾

Correct answer: D

The 'nobind' option in OpenVPN client configuration tells the client to not bind to a fixed local port, allowing it to use dynamic source ports when making connections to peers. This is the correct option for enabling dynamic source port allocation in OpenVPN clients.

Why the other options are wrong:

  • A. src-port is not a valid OpenVPN configuration option.
  • B. remote specifies the peer address and port, not the local source port behavior.
  • C. source-port is not a valid OpenVPN configuration option.
  • E. dynamic-bind is not a valid OpenVPN configuration option.

Question 3

Which Linux user is used by vsftpd to perform file system operations for anonymous FTP users?

  • A. The Linux user which runs the vsftpd process
  • B. The Linux user that owns the root FTP directory served by vsftpd
  • C. The Linux user with the same user name that was used to anonymously log into the FTP server
  • D. The Linux user root, but vsftpd grants access to anonymous users only to globally read-/writeable files
  • E. The Linux user specified in the configuration option ftp_username
Show answer and explanation ▾

Correct answer: E

The vsftpd daemon uses the Linux user specified in the ftp_username configuration option (typically 'ftp') to perform file system operations on behalf of anonymous FTP users. This configuration option explicitly defines which user account vsftpd impersonates when handling anonymous connections, allowing administrators to control file permissions and access.

Why the other options are wrong:

  • A. The vsftpd process typically runs as root or a dedicated service user, not the user for anonymous operations.
  • B. The FTP root directory owner is not necessarily the user used for anonymous operations.
  • C. Anonymous users don't have Linux usernames; they're mapped to a single configured user.
  • D. vsftpd does not rely on root access with special file permissions for anonymous users; it uses a dedicated ftp user account.

Question 4

When the default policy for the netfilter INPUT chain is set to DROP, why should a rule allowing traffic to localhost exist?

  • A. All traffic to localhost must always be allowed
  • B. It doesn't matter; netfilter never affects packets addressed to localhost
  • C. Some applications use the localhost interface to communicate with other applications
  • D. syslogd receives messages on localhost
  • E. The iptables command communicates with the netfilter management daemon netfilterd on localhost to create and change packet filter rules
Show answer and explanation ▾

Correct answer: C

When the INPUT chain policy is DROP, a rule allowing localhost traffic is necessary because many applications use the localhost interface (127.0.0.1 and ::1) to communicate with other local applications or services. Without allowing loopback traffic, essential inter- process communication breaks, causing applications and system services to malfunction. This is a fundamental networking principle that applies regardless of netfilter's specific implementation.

Why the other options are wrong:

  • A. While true, this is too vague and doesn't explain the specific technical reason why it's necessary.
  • B. Netfilter absolutely affects localhost traffic; packets addressed to localhost travel through the network stack and are subject to iptables rules.
  • D. While syslogd may use localhost, this is too specific; the general principle applies to many applications.
  • E. iptables is a userspace utility; netfilter is the kernel subsystem. The management daemon netfilterd doesn't exist; iptables communicates directly with the kernel.

Question 5

The content of which local file has to be transmitted to a remote SSH server in order to be able to log into the remote server using SSH keys?

  • A. ~/.ssh/authorized_keys
  • B. ~/.ssh/config
  • C. ~/.ssh/id_rsa.pub
  • D. ~/.ssh/id_rsa
  • E. ~./ssh/known_hosts
Show answer and explanation ▾

Correct answer: C

To enable SSH key-based login to a remote server, the public key (id_rsa.pub) from the local client must be transmitted and added to the remote server's ~/.ssh/authorized_keys file. The public key is the only component that should be shared with remote systems; it is used by the server to verify that the client possesses the corresponding private key.

Why the other options are wrong:

  • A. authorized_keys is the destination file on the remote server where the public key is placed, not the file to be transmitted from the local client.
  • B. config is a local SSH client configuration file that specifies connection preferences and has no role in key authentication.
  • D. id_rsa is the private key and must never be transmitted or shared with any remote system.
  • E. known_hosts stores fingerprints of remote servers the client has connected to, unrelated to authentication key setup.

Question 6

What is the name of the network security scanner project which, at the core, is a server with a set of network vulnerability tests?

  • A. NetMap
  • B. OpenVAS
  • C. Smartscan
  • D. Wireshark
Show answer and explanation ▾

Correct answer: B

OpenVAS (Open Vulnerability Assessment System) is a network security scanner project built around a server with a collection of network vulnerability tests. It performs comprehensive vulnerability scanning and assessment on network hosts and services.

Why the other options are wrong:

  • A. NetMap is not a recognized network vulnerability scanning framework or project.
  • C. Smartscan is not a standard or widely recognized network vulnerability assessment tool.
  • D. Wireshark is a packet analyzer and network protocol analyzer, not a vulnerability scanner with tests.

Question 7

With fail2ban, what is a "˜jail'?

  • A. A netfilter rules chain blocking offending IP addresses for a particular service
  • B. A group of services on the server which should be monitored for similar attack patterns in the log files
  • C. A filter definition and a set of one or more actions to take when the filter is matched
  • D. The chroot environment in which fail2ban runs
Show answer and explanation ▾

Correct answer: C

In fail2ban, a 'jail' is a combination of a filter definition (which identifies attack patterns in log files) and one or more actions (such as banning or alerting) that are executed when the filter conditions are matched. Jails are the fundamental operational units in fail2ban.

Why the other options are wrong:

  • A. While jails may result in netfilter rules being applied, a jail itself is not defined as a netfilter chain.
  • B. A jail is specific to a service or log file pattern, not a group of similar services, though multiple jails can be configured.
  • D. Fail2ban does not run in a chroot environment; jails are not related to chroot isolation.

Question 8

Which of the following Samba configuration parameters is functionally identical to the parameter read only=yes?

  • A. browseable=no
  • B. read write=no
  • C. writeable=no
  • D. write only=no
  • E. write access=no
Show answer and explanation ▾

Correct answer: C

In Samba, 'writeable=no' is functionally identical to 'read only=yes'. Both parameters serve the same purpose of making a share read-only, preventing clients from writing or modifying files on that share.

Why the other options are wrong:

  • A. browseable=no controls whether a share appears in browse lists, not whether it is read-only.
  • B. read write=no is not a standard Samba parameter.
  • D. write only=no is not a standard Samba parameter and is not a valid configuration option.
  • E. write access=no is not a standard Samba parameter for controlling share permissions.

Question 9

How must Samba be configured such that it can check CIFS passwords against those found in /etc/passwd and /etc/shadow?

  • A. Set the parameters "encrypt passwords = yes" and "password file = /etc/passwd"
  • B. Set the parameters "encrypt passwords = yes", "password file = /etc/passwd" and "password algorithm = crypt"
  • C. Delete the smbpasswd file and create a symbolic link to the passwd and shadow file
  • D. It is not possible for Samba to use /etc/passwd and /etc/shadow directly
  • E. Run smbpasswd to convert /etc/passwd and /etc/shadow to a Samba password file
Show answer and explanation ▾

Correct answer: D

Samba cannot directly use /etc/passwd and /etc/shadow files for CIFS password authentication. Samba requires its own password database (typically smbpasswd or tdbsam) because it needs to store password hashes in a format compatible with the SMB/CIFS protocol, which differs from Unix crypt or shadow formats. This is a fundamental architectural limitation of Samba.

Why the other options are wrong:

  • A. Setting these parameters alone does not enable /etc/passwd and /etc/shadow usage; Samba cannot authenticate against them.
  • B. Even with these parameters and algorithm specification, Samba cannot directly authenticate against /etc/passwd and /etc/shadow.
  • C. Creating symbolic links does not work because Samba cannot parse the shadow file format for CIFS authentication.
  • E. smbpasswd is used to maintain Samba's own password database, not to convert Unix password files for Samba use.

Question 10

In which CIFS share must printer drivers be placed to allow Point'n'Print driver deployment on Windows?

  • A. winx64drv$
  • B. print$
  • C. The name of the share is specified in the option print driver share within each printable share in smb.conf
  • D. pnpdrivers$
  • E. NETLOGON
Show answer and explanation ▾

Correct answer: B

The 'print$' share is the standard CIFS share where printer drivers must be placed to enable Point'n'Print driver deployment on Windows clients. This is a well-defined convention in Samba for managing printer driver distribution.

Why the other options are wrong:

  • A. winx64drv$ is not a standard Samba share for printer driver deployment.
  • C. While Samba allows configuration options, the standard and expected share for Point'n'Print is print$, not a custom-named share.
  • D. pnpdrivers$ is not a recognized Samba share name for printer driver storage.
  • E. NETLOGON is used for logon scripts and domain policies, not for printer driver distribution.

Question 11

Which of the following Samba services handles the membership of a file server in an Active Directory domain?

  • A. winbindd
  • B. nmbd
  • C. msadd
  • D. admemb
  • E. samba
Show answer and explanation ▾

Correct answer: A

The winbindd service handles the membership of a file server in an Active Directory domain. It manages user and group information from Active Directory, performs domain authentication, and provides name service switching integration for AD users and groups.

Why the other options are wrong:

  • B. nmbd handles NetBIOS name registration and browsing, not Active Directory domain membership.
  • C. msadd is not a recognized Samba service.
  • D. admemb is not a recognized Samba service.
  • E. samba (the main daemon) handles file sharing and printing, not specifically AD domain membership management.

Question 12

Which of the following statements is true regarding the NFSv4 pseudo file system on the NFS server?

  • A. It must be called /exports
  • B. It usually contains bind mounts of the directory trees to be exported
  • C. It must be a dedicated partition on the server
  • D. It is defined in the option Nfsv4-Root in /etc/pathmapd.conf
  • E. It usually contains symlinks to the directory trees to be exported
Show answer and explanation ▾

Correct answer: B

The NFSv4 pseudo file system is a virtual namespace on the NFS server that usually contains bind mounts of the directory trees to be exported. These bind mounts present the actual exported directories within a unified namespace that NFSv4 clients see as a single coherent file system hierarchy.

Why the other options are wrong:

  • A. The pseudo file system is not required to be named /exports; the name is configurable.
  • C. The pseudo file system does not need to be a dedicated partition; it is typically a directory within the existing file system.
  • D. The NFSv4 root is not defined in /etc/pathmapd.conf; it is configured in /etc/exports or /etc/nfs.conf.
  • E. The pseudo file system uses bind mounts rather than symlinks to present the exported directory trees.

Question 13

Which command is used to configure which file systems a NFS server makes available to clients?

  • A. exportfs
  • B. mkfs.nfs
  • C. mount
  • D. nfsservct1
  • E. telinit
Show answer and explanation ▾

Correct answer: A

The 'exportfs' command is used to configure and manage which filesystems an NFS server makes available to clients. It reads the /etc/exports file and maintains the kernel's export table, allowing administrators to add, remove, or modify NFS exports without restarting the service.

Why the other options are wrong:

  • B. mkfs.nfs creates filesystems and is unrelated to NFS export configuration
  • C. mount is used to mount filesystems locally, not to configure NFS server exports
  • D. nfsservctl (or similar) is not a standard command for configuring NFS exports
  • E. telinit is used to change runlevels and is unrelated to NFS configuration

Question 14

Which of these tools, without any options, provides the most information when performing DNS queries?

  • A. dig
  • B. nslookup
  • C. host
  • D. named-checkconf
  • E. named-checkzone
Show answer and explanation ▾

Correct answer: A

The 'dig' command provides the most detailed and comprehensive output for DNS queries without any options. It displays full DNS response data including headers, sections, and query details, making it superior to nslookup and host for diagnostic purposes.

Why the other options are wrong:

  • B. nslookup provides less detailed output than dig and is considered legacy
  • C. host provides only basic DNS lookup information with minimal details
  • D. named-checkconf validates BIND configuration files, not a query tool
  • E. named-checkzone validates zone files, not a DNS query tool

Question 15

Performing a DNS lookup with dig results in this answer:

  • A. There is no . after linuserv.example.net in the PTR record in the forward lookup zone file
  • B. There is no . after linuserv in the PTR record in the forward lookup zone file
  • C. There is no . after linuserv.example.net in the PTR record in the reverse lookup zone file
  • D. The . in the NS definition in the reverse lookup zone has to be removed
Show answer and explanation ▾

Correct answer: C

The PTR record in the ANSWER SECTION shows 'PTR linuserv.example.net.123.168.192.in-addr.arpa' which is incorrect syntax. In reverse lookup zones, the PTR record's target (the hostname it points to) must be a fully qualified domain name (FQDN) ending with a dot. The correct format should be 'PTR linuserv.example.net.' (with a trailing dot) instead of what appears to be 'linuserv.example.net.123.168.192.in-addr.arpa' as the target. The missing dot after linuserv.example.net in the reverse lookup zone file prevents proper FQDN resolution, causing DNS lookup failures.

Why the other options are wrong:

  • A. The forward lookup zone uses A records and NS records, not PTR records; PTR records exist only in reverse zones.
  • B. The incomplete hostname 'linuserv' is not the issue; the problem is the FQDN terminator in the reverse zone file.
  • D. The NS record definition 'linuserv.example.net.' is correctly formatted with a trailing dot and does not need modification.

Question 16

What option for BIND is required in the global options to disable recursive queries on the DNS server by default?

  • A. allow-recursive-query ( none; );
  • B. allow-recursive-query off;
  • C. recursion { disabled; };
  • D. recursion { none; };
  • E. recursion no;
Show answer and explanation ▾

Correct answer: E

The correct BIND option to disable recursive queries is 'recursion no;' in the global options section. This is the standard syntax used in named.conf to prevent the DNS server from performing recursive lookups on behalf of clients.

Why the other options are wrong:

  • A. The syntax 'allow-recursive-query ( none; )' is not valid BIND configuration syntax
  • B. The syntax 'allow-recursive-query off' is not the correct BIND option name or format
  • C. The syntax 'recursion { disabled; }' uses invalid syntax; recursion uses a boolean value
  • D. The syntax 'recursion { none; }' uses invalid syntax with braces instead of a boolean value

Question 17

Which of the following DNS records could be a glue record?

  • A. ns1.lab A 198.51.100.53
  • B. lab NS 198.51.100.53
  • C. ns1.lab NS 198.51.100.53
  • D. ns1. A 198.51.100.53
  • E. ns1.lab GLUE 198.51.100.53
Show answer and explanation ▾

Correct answer: A

A glue record is an A record that provides the IP address of a nameserver, typically needed when the nameserver's hostname is within the zone being delegated. Option A (ns1.lab A 198.51.100.53) is an A record that maps a nameserver hostname to its IP address, which is the definition of a glue record.

Why the other options are wrong:

  • B. An NS record cannot be used as a glue record; glue records must be A or AAAA records
  • C. An NS record with an IP address is invalid syntax; NS records contain hostnames, not addresses
  • D. The notation 'ns1.' (with trailing dot but no domain) is incomplete and invalid
  • E. GLUE is not a valid DNS record type; glue records are A or AAAA records by definition

Question 18

What is DNSSEC used for?

  • A. Encrypted DNS queries between nameservers
  • B. Cryptographic authentication of DNS zones
  • C. Secondary DNS queries for local zones
  • D. Authentication of the user that initiated the DNS query
  • E. Encrypting DNS queries and answers
Show answer and explanation ▾

Correct answer: B

DNSSEC (DNS Security Extensions) is used for cryptographic authentication of DNS zones. It provides digital signatures and keys that allow DNS clients to verify that DNS responses originate from authoritative sources and have not been tampered with during transmission.

Why the other options are wrong:

  • A. DNSSEC does not encrypt DNS queries; it provides authentication through digital signatures
  • C. Secondary DNS queries are not related to DNSSEC functionality
  • D. DNSSEC authenticates zones and servers, not individual users who initiate queries
  • E. DNSSEC provides authentication, not encryption of queries and answers

Question 19

What word is missing from the following excerpt of a named.conf file?

  • A. networks
  • B. net
  • C. list
  • D. acl
  • E. group
Show answer and explanation ▾

Correct answer: D

In BIND's named.conf configuration file, the blank line before 'friends {' should contain the keyword 'acl' to define an access control list. The proper syntax is 'acl friends { ... };' which declares a named ACL called 'friends' containing the specified IP address ranges. This ACL is then referenced in the options block with 'allow-query { friends; };' to permit DNS queries from those networks.

Why the other options are wrong:

  • A. networks is not a BIND configuration keyword for defining address groups
  • B. net is not the correct BIND syntax for declaring access control lists
  • C. list is not the BIND keyword; access control lists use 'acl' not 'list'
  • E. group is not a BIND configuration statement; ACLs are declared with 'acl'

Question 20

In a BIND zone file, what does the @ character indicate?

  • A. It's the fully qualified host name of the DNS server
  • B. It's an alias for the e-mail address of the zone master
  • C. It's the name of the zone as defined in the zone statement in named.conf
  • D. It's used to create an alias between two CNAME entries
Show answer and explanation ▾

Correct answer: C

In a BIND zone file, the @ character is a special symbol that represents the name of the zone as it is defined in the zone statement in the named.conf configuration file. It serves as a shorthand to refer to the zone apex without having to type the full zone name repeatedly.

Why the other options are wrong:

  • A. @ does not represent the fully qualified hostname of the DNS server
  • B. @ is not an alias for the zone master's email address; that is specified separately in SOA records
  • D. @ is not used to create aliases between CNAME entries; it simply represents the zone name

Question 21

Which BIND option should be used to limit the IP addresses from which slave name servers may connect?

  • A. allow-zone-transfer
  • B. allow-transfer
  • C. allow-secondary
  • D. allow-slaves
  • E. allow-queries
Show answer and explanation ▾

Correct answer: B

The 'allow-transfer' option in BIND is used to limit which IP addresses are permitted to initiate zone transfers from the master nameserver. This controls which slave (secondary) nameservers can pull zone data from the primary server.

Why the other options are wrong:

  • A. allow-zone-transfer is not the correct BIND option name
  • C. allow-secondary is not a standard BIND option for restricting zone transfers
  • D. allow-slaves is not a standard BIND option for zone transfer control
  • E. allow-queries restricts which addresses can perform DNS queries, not zone transfers

Question 22

In order to protect a directory on an Apache HTTPD web server with a password, this configuration was added to an .htaccess file in the respective directory: Furthermore, a file /var/www/dir/ .htpasswd was created with the following content: usera:S3cr3t Given that all these files were correctly processed by the web server processes, which of the following statements is true about requests to the directory?

  • A. The user usera can access the site using the password s3cr3t
  • B. Accessing the directory as usera raises HTTP error code 442 (User Not Existent)
  • C. Requests are answered with HTTP error code 500 (Internal Server Error)
  • D. The browser prompts the visitor for a username and password but logins for usera do not seem to work
  • E. The web server delivers the content of the directory without requesting authentication
Show answer and explanation ▾

Correct answer: D

The .htaccess configuration correctly specifies Basic authentication with AuthUserFile pointing to .htpasswd. However, the .htpasswd file contains 'usera:S3cr3t' which is a plain text password, not a properly hashed password (htpasswd typically creates MD5, bcrypt, or other hashed formats). When a user attempts to log in as usera with password 's3cr3t', Apache will prompt for credentials but the authentication will fail because Apache compares the submitted password against the stored hash. Since 'S3cr3t' is stored as plaintext rather than a proper hash, the login attempt for usera will not succeed, even though the authentication mechanism itself is functioning and prompting for credentials.

Why the other options are wrong:

  • A. usera cannot access the site because the password in .htpasswd is not properly hashed; plain text storage causes authentication to fail
  • B. HTTP 442 is not a standard error code; Apache would return 401 Unauthorized for failed authentication, not 442
  • C. There is no server configuration error here; the files are correctly processed and the syntax is valid, so no 500 error would occur
  • E. The Require valid-user directive enforces authentication, so the directory is protected and will not be delivered without credentials

Question 23

Which Apache HTTPD directive enables HTTPS protocol support?

  • A. HTTPSEngine on
  • B. SSLEngine on
  • C. SSLEnable on
  • D. HTTPSEnable on
  • E. StartTLS on
Show answer and explanation ▾

Correct answer: B

SSLEngine on is the correct Apache HTTPD directive that enables SSL/TLS (HTTPS) protocol support. This directive must be present in the Apache configuration, typically within a VirtualHost or Directory context, to activate SSL/TLS functionality for secure connections.

Why the other options are wrong:

  • A. HTTPSEngine is not a valid Apache directive; the correct module is mod_ssl which uses SSLEngine.
  • C. SSLEnable is not a valid Apache directive syntax.
  • D. HTTPSEnable is not a valid Apache directive.
  • E. StartTLS is used in LDAP and SMTP contexts, not Apache HTTPD configuration.

Get the complete 202-450 bank

These 23 questions are roughly 29% of the bank. The full pack has 120 real 202-450 questions, each with the same depth of explanation, plus a questions-only PDF for timed practice and free updates forever.

View the full LPIC 2 202-450 question bank →

Related exams

Browse free practice questions for every exam →

Back to blog