I need to have internet traffic from one specific vlan/IP subnet to exit using a specific public IP.
I thought this would be some simple routing (without the need for connection marks, etc.) but so far have not been able to get it to work as expected.
(Goal is to have all external-bound traffic from vlan23 (10.10.23.0/24) to be sourced with public IP 76.xxx.xxx.10 (default route uses 76.xxx.xxx.9)
Config snippets:
Code: Select all
# RouterOS 7.11.2
#
# model = RB5009UG+S+
/ip address
add address=10.10.10.1/24 interface=vlan10-Domain network=10.10.10.0
add address=10.10.20.1/24 interface=vlan20-DMZ network=10.10.20.0
add address=10.10.23.1/24 interface=vlan23-HostedPhoneServer network=10.10.23.0
add address=10.10.30.1/24 interface=vlan30-Cameras network=10.10.30.0
add address=192.168.254.1/24 interface=vlan254-Guest network=192.168.254.0
add address=172.16.10.1/24 interface=wireguard network=172.16.10.0
add address=76.xxx.xxx.9/29 interface=ether1 network=76.xxx.xxx.8
add address=76.xxx.xxx.10/29 interface=ether1 network=76.xxx.xxx.8
add address=76.xxx.xxx.11/29 interface=ether1 network=76.xxx.xxx.8
/routing table
add disabled=no fib name=HP.10
/routing rule
add action=lookup-only-in-table disabled=no dst-address=0.0.0.0/0 src-address=10.10.23.0/24 table=HP.10
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=76.xxx.xxx.14 pref-src="" routing-table=main scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=76.xxx.xxx.14 pref-src=76.xxx.xxx.10 routing-table=HP.10 \
suppress-hw-offload=no
Do I need to go a different route (ba-dum-tiss) and use connection marks, etc. or am I just missing something?