Linux Security

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

22:58 14/9/24 Bài test cuối khóa

Home / My courses / Linux Security - 03.08.2024 / Bài test cuối khóa / Bài test cuối khóa

Question 1 1. On a Linux router, packet forwarding for IPv4 has been enabled. After a reboot, the machine no
Not yet longer forwards IP packets from other hosts. The command:
answered
echo 1 > /proc/sys/net/ipv4/ip_forward temporarily resolves this issue.
Marked out of
1.00 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

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 1/12
22:58 14/9/24 Bài test cuối khóa

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

Marked out of a. All traffic to localhost must always be allowed


1.00
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

Clear my choice

Question 3 Which command is used to administer IPv6 netfilter rules?


Not yet
answered
a. iptables
Marked out of
1.00 b. iptablesv6

c. iptables6

d. ip6tables

e. ipv6tables

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 2/12
22:58 14/9/24 Bài test cuối khóa

Question 4
Which of the statements below are correct regarding the following commands, which are executed on a
Not yet Linux router? (Choose two.)
answered

Marked out of
1.00

a. Packets with source or destination addresses from fe80::/64 will never occur in the FORWARD
chain

b. The rules disable packet forwarding because network nodes always use addresses from fe80::/64
to

identify routers in their routing tables

c. ip6tables returns an error for the second command because the affected network is already
part of

another rule

d. Both ip6tables commands complete without an error message or warning

e. The rules suppress any automatic configuration through router advertisements or DHCPv6

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 3/12
22:58 14/9/24 Bài test cuối khóa

Question 5
What is the command to add another IP address (192.168.1.2) to a network interface (eth0) that already
Not yet has (at least) one IP address in the 192.168.1.0/24 subnet?
answered

Marked out of
a. ip add addr 192.168.1.2/32 dev eth0
1.00

b. ifconfig eth0 192.168.1.2 netmask 255.255.255.255

c. ip addr add 192.168.1.2/32 dev eth0

d. ipconfig eth0 192.168.1.2

Clear my choice

Question 6
A network client has an ethernet interface (eth0) configured with an IP address in the subnet
Not yet 192.168.0.0/24. This subnet has a router, with the IP address 192.168.0.1, that connects this subnet to the
answered
Internet. What needs to be done on the client to enable it to use the router as its default gateway?
Marked out of
(Choose TWO correct answers.)
1.00

a. route add default gw 192.168.0.1 eth0

b. ifconfig eth0 defaultroute 192.168.0.1

c. ip route add default via 192.168.0.1 dev eth0

d. echo defaultroute 192.168.0.1 >> /etc/resolv.conf

e. route add defaultgw=192.168.0.1 if=eth0

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 4/12
22:58 14/9/24 Bài test cuối khóa

Question 7
Which of the following commands lists IPv4 addresses and MAC addresses of network nodes that the
Not yet local system has seen on its directly connected IP networks?
answered

Marked out of
a. arp
1.00

b. ifconfig

c. ipadm

d. iwlist

Clear my choice

Question 8
What is true regarding the statement beginning with #! that is found in the first line of script? (Choose
Not yet two.)
answered

Marked out of
a. It prevents the scripts from being executed until the ! is removed.
1.00

b. it triggers the installation of the script’s interpreter

c. It specifies the path and the arguments of the interpreter used to run the script

d. It defines the character encoding of the script

e. It is a comment that is ignored by the script interpreter

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 5/12
22:58 14/9/24 Bài test cuối khóa

Question 9
Given the following routing table:
Not yet
answered

Marked out of
1.00

How would an outgoing packet to the destination 192.168.2.150 be handled?

a. It would be passed to the default router 192.168.178.1 on wlan0

b. It would be directly transmitted on the device eth0

c. It would be passed to the default router 255.255.255.0 on eth0

d. It would be passed to the router 192.168.1.1 on eth0

e. It would be directly transmitted on the device wlan0

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 6/12
22:58 14/9/24 Bài test cuối khóa

Question 10
What is true about NetworkManager on a Linux system that uses its distribution’s mechanisms to
Not yet configure network interfaces? (Choose two.)
answered

Marked out of
a. NetworkManager reconfigures all network interfaces to use DHCP unless they are specifically
1.00
managed by NetworkManager.

b. NetworkManager must be explicitly enabled for each interface it should manage

c. NetworkManager by default does not change interfaces which are already configured

d. NetworkManager disables all interfaces which were not configured by NetworkManager

e. NetworkManager can be configured to use the distribution’s network interface configuration

Question 11
Which standardized TCP port is used by HTTPS services?
Not yet
answered
a. 25
Marked out of
1.00 b. 80

c. 8080

d. 443

e. 636

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 7/12
22:58 14/9/24 Bài test cuối khóa

Question 12
What command, depending on its options, can display the open TCP connections, the routing tables, as
Not yet well as network interface statistics? (Specify only the command without any path or parameters.)
answered

Marked out of
1.00 Answer: netstat

Question 13
How many IP addresses can be used for unique hosts inside the IPv4 subnet 192.168.2.128/26?
Not yet
answered
a. 6
Marked out of
1.00 b. 14

c. 30

d. 62

e. 126

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 8/12
22:58 14/9/24 Bài test cuối khóa

Question 14
Which of the following IPv4 networks are reserved by IANA for private address assignment and private
Not yet routing? (Choose three.)
answered

Marked out of
a. 10.0.0.0/8
1.00

b. 127.0.0.0/8

c. 169.255.0.0/16

d. 172.16.0.0/12

e. 192.168.0.0/16

Question 15 15. What output is produced by the following command sequence?


Not yet
answered
echo ‘1 2 3 4 5 6’ | while read a b c; do

Marked out of echo result $c $b $a;


1.00
done

a. result: 6 5 4

b. result: 1 2 3 4 5 6

c. result: 3 4 5 6 2 1

d. result: 6 5 4 3 2 1

e. result: 3 2 1

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 9/12
22:58 14/9/24 Bài test cuối khóa

Question 16
Which of the following are valid host addresses for the subnet 203.0.113.64/28? (Choose two.)
Not yet
answered
a. 203.0.113.64
Marked out of
1.00 b. 203.0.113.78

c. 203.0.113.65

d. 203.0.113.80

e. 203.0.113.81

Question 17
How does the ping command work by default?
Not yet
answered
a. Is sends an ICMP Echo Request to a remote host and waits to receive an ICMP Echo Response
Marked out of in return.
1.00
b. It sends an ARP request to a remote host and waits to receive an ARP response in return

c. It sends a TCP SYN packet to a remote host and waits to receive an TCP ACK response in
return

d. Is sends a broadcast packet to all hosts on the net and waits to receive, among others, a
response from the target system

e. It sends a UDP packet to port 0 of the remote host and waits to receive a UDP error response in
return

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 10/12
22:58 14/9/24 Bài test cuối khóa

Question 18
What does the following iptables rule accomplish:
Not yet
answered iptables -A INPUT -s 208.77.188.166 -j DROP
Marked out of
1.00 a. Forwards all incoming traffic to the host 208.77.188.166

b. Accepts all traffic from 208.77.188.166

c. Nothing, there is a syntax error

d. Drops all traffic from 208.77.188.166

Clear my choice

Question 19
What does the following iptables rule accomplish:
Not yet
answered iptables -A INPUT -s 208.77.188.166 -d 10.142.232.1 -p tcp --dport 22 -j ACCEPT
Marked out of
1.00
a. Accepts traffic on port 22 only from the host 208.77.188.166 and 10.142.232.1

b. Forwards all requests from the host 10.142.232.1 on port 22 the internal host 208.77.188.166

c. Accepts all requests from the host 208.77.188.166 on port 22 the internal host 10.142.232.1

d. Drops traffic on port 22 only from the host 208.77.188.166 and 10.142.232.1

Clear my choice

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 11/12
22:58 14/9/24 Bài test cuối khóa

Question 20
When the default policy for the iptables INPUT chain is set to DROP, why should a rule allowing traffic to
Not yet localhost exist?
answered

Marked out of
a. All traffic to localhost must always be allowed
1.00

b. It doesn’t matter; iptables never affects packets addressed to localhost

c. Sendmail delivers emails to localhost

d. Some applications use the localhost interface to communicate with other applications

e. syslogd receives messages on localhost

Clear my choice

◄ Phiếu đánh giá kết quả khóa


Jump to...
học

https://courses.robusta.vn/mod/quiz/attempt.php?attempt=3150&cmid=12475#question-3233-9 12/12

You might also like