Hi,
I'm not sure if you've managed to solved this yet, but I'm sort of in the same situation now. I saw that I've made a syntax error in my previous post:
add chain=prerouting action=mark-connection connection-mark=vpn passthrough=yes src-address=172.16.10.250-172.16.10.254
should've been
add chain=prerouting action=mark-connection new-connection-mark=vpn passthrough=yes src-address=172.16.10.250-172.16.10.254
I find it quite odd: my games & web browser works fine, but my IRC is connecting from the wrong interface when I'm just using:
I'm connecting from a PPTP VPN (192.168.128.8/30) and trying to use ISP1 (interface = pppoe-isp1) which would be dedicated for me and my PPTP VPN IP address block only!
/ip route
add dst-address=192.168.128.8/30 gateway=<pptp-vpn> routing-mark=isp1
/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=isp1 passthrough=yes src-address=192.168.128.8/30
add chain=input action=mark-connection new-connection-mark=isp1 passthrough=yes in-interface=isp1
add chain=prerouting action=mark-routing new-routing-mark=isp1 passthrough=no connection-mark=isp1
I now have everything working when I add a new rule at the end:
add chain=output action=mark-routing new-routing-mark=isp1 passthrough=no connection-mark=isp1
Here's all most of the relevant code:
/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=isp1 passthrough=yes src-address=192.168.128.8/30
add chain=input action=mark-connection new-connection-mark=isp1 passthrough=yes in-interface=pppoe-isp1
add chain=prerouting action=mark-routing new-routing-mark=isp1 passthrough=no connection-mark=isp1
add chain=output action=mark-routing new-routing-mark=isp1 passthrough=no connection-mark=isp1
/ip firewall nat
add chain=srcnat action=masquerade src-address=192.168.128.8/30 routing-mark=isp1 out-interface=pppoe-isp1
/ip route
add dst-address=0.0.0.0/0 gateway=pppoe-isp1 routing-mark=isp1
add dst-address=192.168.128.8/30 gateway=<pptp-vpn> routing-mark=isp1
The problem with the last line is that the gateway identifier is lost as soon as <pptp-vpn> connection drops (or reconnects for that matter!). I haven't had the time yet to write a script to fix it. I just wish ROS won't delete that gateway identifier as soon as the connection is lost!