I am trying to filter packet at vrf enslaved interface
set interfaces ethernet eth0 vif 496 address ‘1.1.1.2/30’
set interfaces ethernet eth0 vif 496 description ‘ACCES TO INTERNET’
set interfaces ethernet eth0 vif 496 firewall local name ‘FW_FROM_INET’
set interfaces ethernet eth0 vif 496 vrf ‘INET-VRF’
after that firewall rule generated
ubnt2@vyos-g2:~$ sudo iptables -L VYATTA_FW_LOCAL_HOOK -nv
Chain VYATTA_FW_LOCAL_HOOK (1 references)
pkts bytes target prot opt in out source destination
0 0 FW_FROM_INET all – eth0.496 * 0.0.0.0/0 0.0.0.0/0
but no packets passed through this rule
I had to add master interface to iptables
ubnt2@vyos-g2:~$ sudo iptables --append VYATTA_FW_LOCAL_HOOK -i INET-VRF --jump FW_FROM_INET
and now I can see incoming packets:
ubnt2@vyos-g2:~$ sudo iptables -L VYATTA_FW_LOCAL_HOOK -nv
Chain VYATTA_FW_LOCAL_HOOK (1 references)
pkts bytes target prot opt in out source destination
0 0 FW_FROM_INET all – eth0.496 * 0.0.0.0/0 0.0.0.0/0
5760 665K FW_FROM_INET all – INET-VRF * 0.0.0.0/0 0.0.0.0/0
probably this is the way of vrf kernel implementaion, but there is no any mentions in vyos user guide