I have two separate internet connection assume one named primary and the other secondary. The main internet traffic is being routed through the primary connection but port 1723 for vpn service is not open from my provider. I want to use the secondary internet connection just for vpn services. My internal network is being natted behind a Mikrotik router. The problem is as follows:
When I use as gateway for the internet traffic the gateway of the primary internet router (route 0.0.0.0/0 through 10.74.4.1) then the vpn service cant be established because any call for vpn through the secondary internet connection is being tried to be routed back throught the primary internet connection where the port 1723 is locked.
On the other side when I use as gateway for the internet traffic the gateway of the secondary internet router (route 0.0.0.0/0 through 192.168.10.254) then the vpn service is available and working very well but internet traffic is being routed through the secondary internet connection despite of the primary.
What I did so far is marking the tcp packets on destination port 1723 and the gre protocol and try to route this out through 192.168.10.254. S my code is like this
/ip firewall mangle add chain=prerouting protocol=tcp dst-port=1723
action=mark-routing
new-routing-mark=vpn_traffic passthrough=yes comment=“VPN Traffic”
disabled=no
/ip firewall mangle add chain=prerouting protocol=gre
action=mark-routing
new-routing-mark=vpn_traffic passthrough=yes comment=“GRE”
disabled=no
/ip route add dst-address=0.0.0.0/0 gateway=192.168.10.254
routing-mark=vpn_traffic comment=“VPN Traffic”
and route all other traffic through 10.74.4.1
/ip route add dst-address=0.0.0.0/0 gateway=10.74.4.1 comment=“Default
Route to Internet”
Does anybody have any idea why this isn’t working? Please any idea is very welcome at this point cause i am absolutely stucked