You need to forward port 80 on a Linux host to a container or VM on 10.0.3.5:8080. How?
AdvancedScenarioNetworking, SSH and remote access
Answer
Situation read → DNAT plus forwarding.
What I'd do →
sudo sysctl -w net.ipv4.ip_forward=1
sudo nft add table ip nat
sudo nft add chain ip nat prerouting '{ type nat hook prerouting priority -100; }'
sudo nft add rule ip nat prerouting iifname "eth0" tcp dport 80 dnat to 10.0.3.5:8080
sudo nft add chain ip nat postrouting '{ type nat hook postrouting priority 100; }'
sudo nft add rule ip nat postrouting ip daddr 10.0.3.5 masquerade
Persist in /etc/nftables.conf and make ip_forward permanent in /etc/sysctl.d/.
Why → DNAT rewrites the destination; masquerade makes return traffic come back through this host.
Interview tip → Mention that locally generated traffic hits the output hook, not prerouting, so testing from the same host needs an extra rule.
More on Networking, SSH and remote access
A key belonging to a departed engineer may be in `authorized_keys` on 300 servers. How do you rotate SSH keys across the fleet?IntermediateYou need to reach a database on a private subnet from your laptop through a bastion. How?BeginnerYour security team wants SSH hardened on all servers. What changes do you make?BeginnerA new server needs a static IP, gateway and DNS on RHEL 9. How do you configure it persistently?BeginnerYou're changing the network config of a remote server over SSH and could lose access. How do you protect yourself?IntermediateA web server should accept HTTP/HTTPS from anywhere but SSH only from the office. Configure the firewall.Beginner