This is a rehash of a similar question I asked last year:
The original scenario was a router speaking BGP and announcing IPv4/IPv6 prefixes, but the upstream interface only had IPv6 address assigned (no v4 address, announcing v4 routes over BGPv6 session). In this case, VyOS is defaulting to my unrouted local network for source IP on all router-originated traffic exiting towards the internet, which obviously does not work.
I have a separate environment that is now suffering from a similar issue with different configuration: the underlying physical ISP connection is used exclusively to establish an IPSEC tunnel. IPSEC is configured with VTI, and VTI interface has an address assigned from RFC6598 space. There is a dummy interface dum0
with a publicly routed IPv4 assigned as a /32. The far end is configured to route traffic to dum0
’s /32 over the VTI interface. SNAT rules are configured with outbound-interface vti0
/ address <addr-of-dum0>
.
This configuration works as expected for clients behind VyOS, but all traffic originated from VyOS itself still attempts to use the upstream WAN IPv4 as source address.
In both cases, any locally originated traffic from VyOS must manually specify the correct source address, which is annoying at best and not possible with some services. This type of local traffic rewrite is totally possible with nftables and postrouting SNAT, but I don’t see any way to do it in VyOS - are there any plans to support SNAT for locally originated traffic? I seem to recall Vyatta and maybe early VyOS supported such configurations. Perhaps I am just approaching the problem incorrectly?