During a security audit you need to start a containerized SSH server with Podman on a developer workstation. The SSH daemon inside the container listens on port 22, but the service must be reachable through TCP port 2222 only from the workstation itself; no other host on the LAN should be able to connect. The container will run on the default bridge network. Which run-time option meets this requirement?
The loopback address 127.0.0.1 restricts the published port to the host's local interface. Using the syntax -p ip:hostPort:containerPort binds host port 2222 to container port 22 and limits the listener to localhost, preventing external connections. Omitting the IP or using 0.0.0.0 binds to all interfaces, allowing remote access. -P (or --publish-all) exposes every container port to random host ports on all interfaces, which is even less restrictive. Therefore, only the first option satisfies the requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the loopback address (127.0.0.1) in network configurations?
Open an interactive chat with Bash
Why does specifying 0.0.0.0 in a port binding make the service accessible from other machines?
Open an interactive chat with Bash
What does the default bridge network do in containerized environments like Podman or Docker?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .