Each side has proper routes to the other side's network, through WireGuard, and it works flawlessly.
Side A:
Code: Select all
/ip/address add address=10.10.10.254/20 interface=bridge
/interface wireguard add listen-port=13231 mtu=1420 name=wireguard1
/ip/route/add gateway=wireguard1 dst-address=10.10.0.0/20
Side B:
Code: Select all
/ip/address add address=10.10.192.1/20 interface=bridge
/interface wireguard add listen-port=13231 mtu=1420 name=wireguard1
/ip/route/add gateway=wireguard1 dst-address=10.10.192.0/20
However, if I try to use mangle/conn-mark/route-mark (or a route rule) to force all traffic from a specific host on side A (such 10.10.11.31)
to flow over to side B (so it will come out to the Internet with side-B's IP address) it simply doesn't work.
I've added to side A
Code: Select all
/ip/firewall/mangle add chain=prerouting action=mark-connection new-connection-mark=to-b passthrough=yes src-address=10.10.11.30
/ip/firewall/mangle add chain=prerouting chain=prerouting action=mark-routing new-routing-mark=to_b passthrough=no connection-mark=to-b
/routing/table add name="to_b" fib
/ip route add gateway=wireguard1 dst-address=0.0.0.0/0 routing-table=to_b
The router on side A will return "unreacheable" if I try pinging anything on side "B" or on the Internet. If I disable the mangle mark connection rule, then I can ping hosts on side-B, but then Internet will flow with Side-A external IP address (that is not the desired configuration)
I can make it work using an OpenVPN or L2TP VNP (simply changing the name of the gateway interace on the route command for the "to_b" routing table), albeit in these cases I use src-NAT on side "A".
Any ideas? It's really strange that