I am trying to resolve the following problem: I need to be connected to my company's Mikrotik router to reach company's NAS server. It works well. But if I stay connected all the time then all my internet traffic goes through VPN connection and consequentially it is painfully slow. So how can I force my internet traffic to avoid VPN connection? I believe that it can be solved through VPN settings in Network Manager (GUI) but ticking off "only use for local resources" at Routes in IPv4 just doesn't work - in such case VPN connection is established, internet avoids VPN but it fails to reach NAS server. Any suggestions?

  • Check your company's Internet Access Policy - you may be about to violate it by subverting the purpose of VPNs. Don't get fired over this. Don't do it.
    – waltinator
    Sep 15, 2016 at 12:57
  • @waltinator, It's OK, I checked it. It is no violation. Company encourages this.
    – Peter M
    Sep 15, 2016 at 13:26

1 Answer 1


You need to have a route to you NAS server that goes along the VPN. Having the default-route on the VPN is apparently a way to achieve that (depends on details of your networking configuration and environment).

Yes, "only use for local resources" configures the presence of the detault-route.

Often you get automatically specific routes to reach the resources on the VPN. If that doesn't happen, it could be a misconfiguration in the VPN server, on your side or a bug.

Regardless whether that works automatically, you can also add manual, static routes. Find out the IP address you want to reach (ping NAS-SERVER, or ask your admin). Possibly, you don't only add a route to that one IP address, but an entire subnet (like You can configure that in your NetworkManager GUI. Afterwards re-activate your VPN connection.

Check the assignes routes with ip route.

You might also try traceroute -n NAS-SERVER to see the way that your IP packets take.

  • Thanks. Unfortunately you told this way-over my ability to comprehend. This is what I get:peter@BareBone:~$ ip route default dev ppp0 proto static scope link metric 50 default via dev eth0 proto static metric 100 via dev eth0 src dev eth0 scope link metric 1000 dev eth0 proto kernel scope link src metric 100 dev ppp0 proto kernel scope link src metric 50 Unfortunately I have no Idea which value to use and where to put it.
    – Peter M
    Sep 21, 2016 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.