Hi
I have connect two router through public IPs as VXLAN vteps.
The address for each VLAN has been set. Routers can ping each other VXLAN IP (192.168.210.0).
Route for forwarding DNS requests of router1 towards router2 works flawlessly through MAIN route table route.
When I mangle PPP clients on router1 and mark route the traffic to a table with VXLAN IP of router2 as gateway and set source NAT rule with VXLAN interface of router1 as outgoing interface and masquerade, clients can't connect to internet anymore.
In firewall connections tab C or Cs state apears due to mangle on output or preroute chain.
They can translate addresses through MAIN table route but can't access internet.
router1 config:
# apr/18/2023 09:29:28 by RouterOS 7.8
/interface sstp-server
add comment="TK Link" name=sstp-in-TK user=TK
/interface list
add name=WAN
add name=VXLAN
/ip pool
add name=pool-VXLAN ranges=192.168.2.11-192.168.2.99
/interface vxlan
add local-address=2.2.2.2 mac-address=CE:6A:2B:3B:86:E6 mtu=1500 \
name=vxlan-TK port=1350 vni=1 vrf=main vteps-ip-version=ipv4
/ppp profile
add dns-server=192.168.2.1 local-address=192.168.2.1 name=VXLAN \
remote-address=pool-VXLAN
/ppp secrets
add name=vxuser profile=VXLAN
/routing table
add fib name=VXLAN
/interface l2tp-server server
set allow-fast-path=yes enabled=yes l2tpv3-circuit-id=0 use-ipsec=required
/interface list member
add interface=ether1 list=WAN
add interface=vxlan-TK list=VXLAN
/interface sstp-server server
set certificate="VPN Server" default-profile=default-encryption enabled=yes \
keepalive-timeout=10
/interface vxlan vteps
add interface=vxlan-TK port=1350 remote-ip=1.1.1.1
/ip address
add address=2.2.2.2/24 interface=ether1 network=2.2.2.0
add address=192.168.210.2/30 interface=vxlan-TK network=192.168.210.0
/ip dns
set allow-remote-requests=yes cache-max-ttl=1d servers=\
94.140.15.15,94.140.14.14
/ip firewall filter
add action=accept chain=input comment=Winbox dst-port=7353 in-interface-list=\
WAN protocol=tcp
add action=accept chain=input comment=SSTP dst-port=443 in-interface-list=WAN \
protocol=tcp
add action=accept chain=input comment=L2TP dst-port=500,4500,1701 \
in-interface-list=WAN protocol=udp
add action=accept chain=input comment=DNS dst-port=53 in-interface-list=!WAN \
protocol=udp
add action=accept chain=input comment=ICMP in-interface-list=!WAN protocol=\
icmp
add action=accept chain=input comment=VXLAN dst-port=1350 in-interface-list=\
WAN protocol=udp
add action=accept chain=input comment=Related connection-state=\
established,related,untracked
add action=drop chain=input comment=Drop
/ip firewall mangle
add action=mark-routing chain=prerouting comment="VXLAN Mark" \
dst-address-type=!local new-routing-mark=VXLAN \
passthrough=no routing-mark=!VXLAN src-address=192.168.2.11-192.168.2.99
/ip firewall nat
add action=masquerade chain=srcnat comment="VXLAN NAT" out-interface-list=\
VXLAN routing-mark=VXLAN
add action=masquerade chain=srcnat comment="NAT" out-interface-list=WAN
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=2.2.2.1
add comment=DNS1 disabled=no distance=1 dst-address=94.140.15.15/32 gateway=\
192.168.210.1 pref-src=0.0.0.0 routing-table=main scope=30 \
suppress-hw-offload=no target-scope=10
add comment=DNS2 disabled=no distance=1 dst-address=94.140.14.14/32 gateway=\
192.168.210.1 pref-src=0.0.0.0 routing-table=main scope=30 \
suppress-hw-offload=no target-scope=10
add comment="VPN VXLAN" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.210.1 routing-table=VXLAN scope=30 suppress-hw-offload=no \
target-scope=10
/ip service
set winbox port=7353
router2 config:
# apr/18/2023 09:12:46 by RouterOS 7.8
#
/interface vxlan
add local-address=1.1.1.2 mac-address=7E:32:B4:C1:32:DD mtu=1500 name=\
vxlan-IR0 port=1350 vni=1 vrf=main vteps-ip-version=ipv4
/ip address
add address=1.1.1.1/24 interface=ether1 network=1.1.1.0
add address=192.168.210.1/30 interface=vxlan-IR0 network=192.168.210.0
/ip dns
set servers=8.8.8.8,9.9.9.9
/ip firewall filter
add action=accept chain=input comment=Winbox dst-port=7353 in-interface=\
ether1 protocol=tcp
add action=accept chain=input comment=Ping in-interface=!ether1 protocol=icmp
add action=accept chain=input comment="Allow Related" connection-state=\
established,related,untracked
add action=accept chain=input comment=VXLAN dst-port=1350 in-interface=ether1 \
protocol=udp
add action=drop chain=forward comment="WAN !desnated forward drop" \
connection-nat-state=!dstnat connection-state=new in-interface=ether1
add action=drop chain=input comment="Input drop"
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=1.1.1.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set winbox port=7353
set api-ssl disabled=yes