A systems administrator is troubleshooting why a newly deployed internal web service that listens on port 8443/TCP cannot be reached from other servers on the same VLAN. On the Ubuntu Server 22.04 host, the Java process is confirmed to be listening, and ufw status shows that only ports 22/tcp and 80/tcp are currently allowed. Which single command should the administrator run on the server to restore connectivity while keeping the existing firewall policy intact?
sudo ufw allow 8443/tcp
sudo sysctl -w net.ipv4.ip_forward=1
sudo firewall-cmd --permanent --add-port=8443/tcp
sudo iptables -A INPUT -p tcp --dport 8443 -j DROP
Because UFW (Uncomplicated Firewall) is enabled on the Ubuntu host, inbound traffic is blocked unless an allow rule exists. Adding an allow rule for TCP port 8443 with sudo ufw allow 8443/tcp immediately opens the port for remote clients and leaves all other rules unchanged. Enabling IP forwarding affects routing, not local firewall rules. firewall-cmd manages firewalld, which is not used when UFW is active on Ubuntu. An iptables rule that jumps to DROP would explicitly block, not permit, the port, so it would worsen the issue.
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 does UFW stand for, and how does it work?
Open an interactive chat with Bash
Why is `sudo ufw allow 8443/tcp` the correct command in this scenario?
Open an interactive chat with Bash
What is the purpose of port 8443, and why might it be used by a web service?