Multiple " WAN " + Destionation " NAT " Proper Config


#1

Greetings! Thanks for reading this. This is relatively " newbie " stuff so hopefully can be discussed by many. Thank you. I take this URL as reference for the thread: https://wiki.vyos.net/wiki/User_Guide

What actually happens is, after assigning multiple “WAN”-type IPs to my “eth0” interface, I’d like to create my " DNAT " rules accordingly, respecting (sorting) different traffic / ports for IP1, IP2 all falling under the same NIC “eth0” (in this case I think they call it NIC “bonding” setup, right?). If I take what is in the reference material, isn’t enough, correct?

set nat destination rule 10 inbound-interface ‘eth0’

I therefore located through other sources an IP based (Vyatta) argument rule to append called " destination address " and thus, I just assign the rule to the desired “WAN” IP as so:

set nat destination rule 10 destination address ’ WAN IP1 or WAN IP2 or WAN IP3…’

Could you please confirm if that’s the proper way of achieving “DNAT” separation of multiple inbound “WAN” lanes?

Thanks! And long live this project!


#2

In a destination NAT rule you can specify the inbound interface and the destination IP address (you can also specify the source IP address if you want)

So there’s no problem to distinguish traffic destined to several different IP on the same interface.