Setup:
An external interface is assigned to a specific VRF (e.g., "VRF_ISP").
/ip vrf
add interfaces=ether2 name=VRF_ISP
Local services (such as L2TP) services are running in the main routing table context.
Ip address exist in both main and VRF_ISP
/ip address
add address=10.0.0.2/24 interface=ether2 network=10.0.0.0
add address=10.0.0.2/32 interface=lo network=10.0.0.2
The Issue:
Local services unreachable via VRF
To resolve this, I have tried using /routing rule or /ip firewall mangle to force a lookup in the main table:
/ip firewall mangle
add action=mark-routing chain=prerouting disabled=yes dst-port=1701 in-interface=ether2 new-routing-mark=main protocol=udp
/routing rule
add action=lookup-only-in-table disabled=no dst-address=10.0.0.2/32 routing-mark=ISP table=main
Incoming packets for local services (e.g., UDP 1701 for L2TP) arriving at the VRF interface fail to reach the INPUT chain. Instead, they are processed in the FORWARD chain.
Observation:
Even after the routing table is changed to main, the router does not recognize the packet as "Local Delivery".
Firewall logs confirm that these packets bypass the INPUT chain entirely and are handled as transit traffic in the FORWARD chain.
/ip firewall mangle
add action=accept chain=input dst-port=1701 log=yes protocol=udp
add action=accept chain=forward dst-port=1701 log=yes protocol=udp
ip firewall/mangle/print stats
Flags: X - DISABLED
Columns: CHAIN, ACTION, BYTES, PACKETS
CHAIN ACTION BYTES PACKETS
0 prerouting mark-routing 744 6
1 input accept 0 0
2 forward accept 744 6
Questions:
Why does the Routing Decision process treat packets destined for the router's own IP as transit traffic (Forward) when they originate from a VRF interface, even after a manual table lookup shift to main?
Is this behavior expected in the current v7.14+ architecture, or is it a known limitation of the VRF implementation?
Are there plans to make the L2TP server "VRF-aware" so it can listen directly on interfaces within a VRF without requiring workarounds like VETH or physical loopback cables?
