I have a question and i could not find the answer in the forum or wiki.
I want to use the tool fetch to get a file from our server to my mikrotik, but the file on the server is only reachable through VPN.
The device has a vpn-ipsec tunnel to connect to the server, client data goes through that tunnel, no problem.
But if i try to fetch anything on the mikrotik device, it uses plain internet, not the vpn tunnel.
So it ends up in a “forbidden” status.
Is there something i can do to force the device to use the vpn tunnel to fetch that file?
I can not give in a src-addres in fetch like i do in ping commands, and the only other thing i can think of is trying to change default routes.
Any ideas?
Well the thing is that i need to connect to a certain url after the VPN, so you mean doing it like this?
/tool fetch address= “VPN addres” mode=http url=“http://x.x.x.x/index.php” dst-path=myfile.rsc
The x.x.x.x part is a private range only reachable after the vpn.
If it is a plain IPsec VPN, try adding an individual route for the destination with pref-src set to a local IP address matched by policy. The gateway may be the same like for the default route, it is not important, the packet just must be routed “somewhere” so that the IPsec policy could match it.