Configuring Port Forwarding on VYOS - jwells24/Tech-Journal GitHub Wiki
Configuring Port Forwarding on VYOS
In VYOS, if we want to configure port forwarding we are working with NAT. In order to configure NAT for port forwarding, we add a NAT destination rule. In the image below, we are configuring a NAT destination rule to direct incoming web requests towards our web server.
The syntax for commands to add to a NAT rule is very similar to a firewall rule, we use set nat destination rule # as our starting point. Then, we add any parameters after this, as seen above. In the commands above, we can see how to add a description, a destination port, an inbound-interface, a protocol, and a translation address/port to our NAT destination rule. This specific example will forward any traffic that comes into our firewall destined for port 80 towards our web server at 172.16.50.3.