XK0-005 · Question #90
A Linux administrator built a GitLab server. Later that day, a software engineer tried to access the server to upload the repository during the final step of installation. The software engineer…
The correct answer is A. iptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -. To allow external access to a GitLab server, a firewall rule must be configured to permit incoming TCP traffic on the standard HTTP (port 80) and HTTPS (port 443) ports.
Question
A Linux administrator built a GitLab server. Later that day, a software engineer tried to access the server to upload the repository during the final step of installation. The software engineer could not access the website. Which of the following firewall rules would allow access to this site?
Options
- Aiptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -
- Biptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -
- Ciptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -
- Diptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -
How the community answered
(24 responses)- A75% (18)
- B4% (1)
- C13% (3)
- D8% (2)
Why each option
To allow external access to a GitLab server, a firewall rule must be configured to permit incoming TCP traffic on the standard HTTP (port 80) and HTTPS (port 443) ports.
The `iptables` command `-A INPUT -p tcp -m multiport --dports 80,443` specifies that the rule applies to incoming TCP packets targeting destination ports 80 (HTTP) and 443 (HTTPS), which are the standard ports for web access. Including state tracking like `-m conntrack --ctstate NEW,ESTABLISHED,RELATED -j ACCEPT` ensures that new connection attempts are allowed and existing or related connections can continue, which is essential for proper web server functionality.
Without the full command for choice B, it is impossible to determine the specific technical reason it is wrong.
Without the full command for choice C, it is impossible to determine the specific technical reason it is wrong.
Without the full command for choice D, it is impossible to determine the specific technical reason it is wrong.
Concept tested: iptables firewall rules for web services
Source: https://man7.org/linux/manpages/man8/iptables.8.html
Topics
Community Discussion
No community discussion yet for this question.