Basically, I've got a service listening to eth0
's 10.16.1.1
on port 1000
on a Ubuntu 22.04 machine. This service doesn't allow to listen to a catchall like 0.0.0.0 (outside of my control). This is an internal network.
For remote access, I've also got a VPN network running on wg0
which assigned the adress 192.168.100.1
to this machine.
Here's the question: How do I forward requests to 192.168.100.1:1000
to land at 10.16.1.1:1000
?
You can use the iptables
DNAT
action to redirect traffic: