Simple VyOS port forwarding

Software

Speaking of VyOS, last week I learned—relearned?—how to configue a simple port forward from an interface with an internet routable address, to an internal network on another interface:

$ configure
# set nat destination rule 100 description "Would prefer pfSense!"
# set nat destination rule 100 inbound-interface eth0
# set nat destination rule 100 protocol tcp
# set nat destination rule 100 translation address $TARGET_SERVER
# set nat destination rule 100 translation port $TARGET_PORT

You’ll want to change the rule number to get the order right.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!