Syed Jahanzaib Personal Blog to Share Knowledge !

November 18, 2014

VPN/PPTP Static Routes Loose gateway when client reconnects

Filed under: Mikrotik Related — Tags: , , , — Syed Jahanzaib / Pinochio~:) @ 1:14 PM

1


Recently i configured a site to site vpn connectivity (Head office to Branch office) at some place. Everything was working fine , both end clients could access each other with direct access as proper routes were setup, But strange issue was happening that if the branch office mikrotik goes offline or Re connects the pptp dialer,    static route at head office mikrotik becomes un-reachable

(manual route was added at H.O mikrotik to access branch offices via dynamic pptp interface).


As showed in the image below … (head office router) routeunreachable


It was happening because the route is looking at a dynamic interface. When the dynamic interface goes away (branch office mikrotik pptp disconnect-reconnect) the Route does not know which interface to point to. . To sort this issue, I added ROUTE in ppp/secret section @ Head Office mikrotik.

As showed in the image below ….

pptp_secret .


The above subnet 192.168.88.0/24 is branch office clients subnet. now whenever the branch will re connect the pptp, a dynamic route will add each time on H.O mikrotik, so it will know that from which route it should access B.O clients.

As showed in the image below.

drotue-added


TIP:

You can do it manually too by assigning static ip, and in route use that ip in gateway, But I prefer to use dynamic route , because the route will be created dynamically each time when user connected to the router and disappear when user disconnect. And so the route will work transparently even if changes are made in other sections.


Howto add permanent static route in windows by CMD

Destinations = 10.0.1.0 / 24
Local Gateway = 192.16.10.2
-p = permanent add

route -p ADD 10.0.1.0 MASK 255.255.255.0 192.168.10.2

Regard’s


Syed Jahanzaib

%d bloggers like this: