Oracle Linux 6 System Administration — Question 3
A web server on HOST01 is listening on port 80.
Examine the IPTABLES rule shown:
[root@host01 ~] # iptables L INPUT
Chain INPUT (policy ACCEPT)
targetportoptsourcedestination
ACCEPTtcp- - anywhereanywheretcp dpt:http
Another rule is then added:
[root@host01 ~] # iptables A INPUT P tcp - - dport 80 j REJECT
What is the effect of this command on subsequent attempts to access the web server on HOST01 using port 80?
Answer options
- A. New connection attempts timeout.
- B. New connection attempts are refused and the client informed of the refusal.
- C. New connection attempts always succeed.
- D. New connection attempts succeed until a reload of the firewall rules.
Correct answer: A
Explanation
The added IPTABLES rule changes the disposition of incoming connections on port 80 from accepting them to rejecting them. However, since it is a REJECT rule, it will notify the client that the connection is refused, making option A incorrect as it implies a timeout without notification.