XK0-006 practice question on Firewalls, 2026-11-09
Archived question for 2026-11-09. Domain: Security. Objective 3.2: Firewalls. Original SecLern question, written for practice.
An administrator must allow ssh in the public zone only from 192.0.2.0/24 using a firewalld rich rule. Which rule text does this?
Show the explanation
The rule matches the source network and the service, then accepts.
Each option
- A. drop discards the traffic that should be allowed. It would be right for blocking that network.
- B. Without a source this allows ssh from everywhere. It would be right to open ssh to all.
- C (correct). Correct: The rule matches the source network and the service, then accepts.
- D. reject refuses the connection with an error. It would be right for blocking with a response.
What this question tests
It maps to XK0-006 objective 3.2, Firewalls: Firewalls Related ideas: firewalld, rich rules.
The published topics under this objective, so you can check what you have covered:
- Zones and services
- Rich rules
- nftables and iptables
More from the archive
- 2026-11-05: A TLS query to a directory server fails. ``` $ ldapsearch -x -H ldaps://10.0.0.8 -b dc=example,dc=com uid=alice TLS: hostname does not match CN in peer certificate ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) ``` The server's certificate names ldap.example.com. Which change fixes it while keeping validation on?
- 2026-11-06: Which nftables feature lets one rule match a whole list of addresses?
- 2026-11-07: A scheduled script on web01 needs a Kerberos ticket without a person typing a password. A keytab exists at /etc/app.keytab for the principal app/web01.example.com. Which command obtains the ticket?
- 2026-11-08: A host runs Docker on an Ubuntu server with ufw enabled. ``` $ sudo ufw status Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere $ docker run -d -p 8080:80 nginx $ curl -sI http://203.0.113.10:8080 | head -1 # run from another host HTTP/1.1 200 OK ``` Why is port 8080 reachable although ufw has no rule for it?
- 2026-11-10: An administrator searches the audit log for changes to the account database. ``` $ sudo ausearch -k identity-file -ts today ---- time->Wed Nov 12 10:22:14 2026 type=SYSCALL msg=audit(1794565334.211:512): arch=c000003e syscall=257 success=yes exit=3 ppid=2301 pid=2330 auid=1001 uid=0 gid=0 euid=0 comm="vipw" exe="/usr/sbin/vipw" key="identity-file" ``` Which field identifies the login user who ran the command through sudo?
- 2026-11-11: A rule that blocks ssh works for IPv4 but a client still connects over IPv6. ``` $ sudo iptables -S INPUT -P INPUT ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j DROP $ sudo ip6tables -S INPUT -P INPUT ACCEPT ``` Why does the IPv6 connection still work?
- 2026-11-12: Which command lists ufw rules with numbers so that one can be deleted by number?
- 2026-11-13: A pipeline file has these jobs. ``` stages: - build - test - deploy deploy-job: stage: deploy script: - ./deploy.sh test-job: stage: test script: - make test build-job: stage: build script: - make ``` In which order do the jobs run, and what happens when test-job fails?
Start a daily session
Several questions at a time, aimed at your gaps.