Page 1 of 1

Fetch tool over VPN

Posted: Thu Apr 10, 2014 3:14 pm
by haldepoorter
Hello,

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?

Thanks in advance!

Re: Fetch tool over VPN

Posted: Thu Apr 10, 2014 4:47 pm
by rickfrey
Specify the VPN address like this:

tool fetch address=(VPN Facing Address)

Re: Fetch tool over VPN

Posted: Thu Apr 10, 2014 5:15 pm
by haldepoorter
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.

I've tried this but it doesn't work right away.

Re: Fetch tool over VPN

Posted: Wed Jul 22, 2015 3:28 pm
by andrace
is anybody resolved this ?

Re: Fetch tool over VPN

Posted: Wed Jul 22, 2015 3:30 pm
by andrace
How to forward the "toll fetch" into a ipsec or a vpn tunnel?

Re: Fetch tool over VPN

Posted: Wed May 02, 2018 4:04 pm
by Splin
Faced the same issue, fetch is not routing through VPN, using address argument with VPN facing IP doesn't help too. Any workaround?

Re: Fetch tool over VPN

Posted: Thu May 03, 2018 5:44 pm
by sindy
Faced the same issue, fetch is not routing through VPN, using address argument with VPN facing IP doesn't help too. Any workaround?
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.

Re: Fetch tool over VPN

Posted: Fri May 04, 2018 5:19 pm
by Anumrak
is anybody resolved this ?
Maybe a static route into vpn interface?

Re: Fetch tool over VPN

Posted: Fri May 04, 2018 5:23 pm
by sindy
is anybody resolved this ?
Maybe a static route into vpn interface?
With plain IPsec in tunnel mode, there is no VPN interface, which causes a lot of confusion until you get used to the whole concept.