Vlan nat outbond

vyos@vyos:~$ config
[edit]
vyos@vyos# show interface ethernet eth7
vif 2201 {
address 192.168.60.1/24
}
[edit]
vyos@vyos# set nat source rule 20 outbound-interface name vif2201
[edit]
vyos@vyos# commit

WARNING: NAT interface “vif2201” for source NAT rule “20” does not
exist!

Source NAT configuration error in rule 20: translation requires address
and/or port

[[nat]] failed
Commit failed
[edit]
vyos@vyos#

please help
i dont know why

How about this? It seem like you missing the translation address command line.

set nat source rule 20 outbound-interface name 'vif2201'
set nat source rule 20 translation address 'masquerade'
commit
save

vyos@vyos:~$ config
[edit]
vyos@vyos# set nat source rule 20 outbound-interface name vif2201
[edit]
vyos@vyos# set nat source rule 20 translation address ‘masquerade’
[edit]
vyos@vyos# commit

WARNING: NAT interface “vif2201” for source NAT rule “20” does not
exist!

[edit]
vyos@vyos#

it’s still the same

this is my interfaces

[edit]
vyos@vyos# show interface ethernet eth7
vif 2201 {
address 192.168.60.1/24
}
[edit]
vyos@vyos#

what wrong with my NAT

Did you set interface vif 2201 and then commit && save first?

on interface still commit
not saved yet

its done brother
thanks u

[edit]
vyos@vyos# set nat source rule 20 outbound-interface name eth7.2201
[edit]
vyos@vyos# set nat source rule 20 translation address ‘masquerade’
[edit]
vyos@vyos# commit
[edit]
vyos@vyos#

2 Likes