A new HTTPS web service is being deployed on a server.
Which of the following commands should the Linux administrator use to ensure traffic is able to flow through the system firewall to the new service?
Click on the arrows to vote for the correct answer
A. B. C. D.C.
https://www.linode.com/docs/security/firewalls/control-network-traffic-with-iptables/To allow traffic to flow through the system firewall to the new HTTPS web service, the Linux administrator needs to configure the firewall to allow incoming traffic to the server's port 443, which is the default port used by HTTPS.
Out of the given options, option B is the correct one to use.
Explanation of each option:
Option A:
cssiptables -I OUTPUT -p tcp --sport 443 -j ACCEPT
This command inserts a rule into the OUTPUT chain that allows outgoing traffic with a source port of 443. However, this rule does not open the server's port 443 for incoming traffic, which is required for the new HTTPS web service.
Option B:
cssiptables -A INPUT -p tcp --dport 443 -j ACCEPT
This command appends a rule to the INPUT chain that allows incoming traffic with a destination port of 443. This will open the server's port 443 for incoming traffic, allowing the new HTTPS web service to receive traffic.
Option C:
cssiptables -I INPUT --dport 443 -j ACCEPT
This command inserts a rule into the INPUT chain that allows incoming traffic with a destination port of 443. This is similar to option B, but using -I
instead of -A
makes this rule the first in the chain. However, this may not be necessary and could interfere with other rules in the chain.
Option D:
cssiptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
This command appends a rule to the OUTPUT chain that allows outgoing traffic with a destination port of 443. However, this rule does not open the server's port 443 for incoming traffic, which is required for the new HTTPS web service.
Therefore, option B (iptables -A INPUT -p tcp --dport 443 -j ACCEPT
) is the correct command to use in this scenario to ensure traffic is able to flow through the system firewall to the new service.