What is the effect of this command on subsequent attempts to access the web server on HOST01 using port 80?

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?

——A. New connection attempts timeout.

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?

——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.

Explanation:



Leave a Reply 6

Your email address will not be published. Required fields are marked *


*****

*****

Answer: C

iptables rules take effect immediately. Because the script is Appending (-A) to the INPUT chain, the new rule is being added to the end of the chain. The other terminating rule that precedes the new rules, then will take effect (and later rules will not).

Not D, because the reload of firewall would help only if the iptables is saved.

Marc

Marc

A Tested: This web page is not available

ERR_CONNECTION_TIMED_OUT

Jef Adams

Jef Adams

as -A option is used I would go for answer C