Same config as for others (routing table, route, masquerade), only routing rule instead of mangle rule:
is it a way to do it via lists?
OK, let me ask a big picture.
What I have now are IPSec tunnels 3 mangeled to countries, 1 dedicated for an one IP
Sometimes I have to send entire traffic of another device (which usually is a part mangled) to that country which already has tunel, and I am doing this by creating dedicated tunnel for that list
/ip ipsec mode-config add connection-mark=VPN-IP-PL name="VPN - Poland" responder=no use-responder-dns=yes
/ip ipsec mode-config add connection-mark=VPN-IP-DE name="VPN - Germany" responder=no use-responder-dns=yes
/ip ipsec mode-config add connection-mark=VPN-IP-UK name="VPN - UK" responder=no use-responder-dns=yes
/ip ipsec mode-config add connection-mark=no-mark name="VPN - US" responder=no use-responder-dns=no
/ip ipsec mode-config add connection-mark=no-mark name="VPN - US - Dedicated" responder=no src-address-list=local-us
/ip ipsec mode-config add connection-mark=no-mark name="VPN - UK - Dedicated" responder=no src-address-list=local-uk
/ip ipsec mode-config add connection-mark=no-mark name="VPN - Poland - Dedicated" responder=no src-address-list=local-pl
/ip firewall address-list add address=10.20.30.56 list=local-us
/ip firewall address-list add address=10.20.30.56 list=Own-VPN
/ip firewall address-list add address=10.20.30.16 disabled=yes list=Own-VPN
/ip firewall address-list add address=10.20.30.16 list=local-uk
/ip firewall address-list add address=10.20.30.17 list=local-uk
/ip firewall address-list add address=10.20.30.17 disabled=yes list=Own-VPN
/ip firewall mangle add action=mark-connection chain=prerouting dst-address-list=VPN-IP-Poland new-connection-mark=VPN-IP-PL passthrough=yes src-address-list=!Own-VPN
/ip firewall mangle add action=mark-connection chain=prerouting dst-address-list=VPN-IP-Germany new-connection-mark=VPN-IP-DE passthrough=yes src-address-list=!Own-VPN
/ip firewall mangle add action=mark-connection chain=prerouting dst-address-list=VPN-IP-UK new-connection-mark=VPN-IP-UK passthrough=yes src-address-list=!Own-VPN
/system script add dont-require-permissions=yes name=IP16-17-VPN-UK-ON owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="ip ipsec peer enable \"KeepSolidVPN - UK - Dedicated\"\ ## new tunnel
\nip firewall address-list enable 26694" ## enable Own-VPN list
/system script add dont-require-permissions=yes name=AppleTV-VPN-UK-OFF owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="ip ipsec peer disable \"KeepSolidVPN - UK - Dedicated\"\ ## delete tunnel
\nip firewall address-list disable 26694" ## disable Own-VPN list
So normally IP 16 or 17 are going through mangle, but when I enable them at Own-VPN list and get them new tunnel they are going exclusively over there. Probably there is a smarter way to do it without the need for new tunnel.
Is there a similar way of doing this via wg through lists? Or should I use routing rules?