I manage IT for a small corporation with several offices and several employees who work from home.
One of my sales staff has a laptop which they use from home, and connects to the office using a Microsoft PPTP VPN connection over her regular broadband internet connection.
For her own sanity, she DOES NOT use the VPN connection as the default gateway. This way, her office traffic goes through the VPN, and all other internet traffic goes through her regular internet connection.
Since no route to the office LAN is automatically created over the VPN, I have given her a batch file to run that will automatically create a route to the office LAN over her VPN via the new IP she was issued on the VPN connection. The batch file figures out which IP is the VPN connection, and sets a custom route for the office subnet through that IP.
The problem:
Her PPTP connection drops frequently. The custom routes are automatically removed each time. Setting a static or persistent route would not work, as the IP address assigned via PPTP varies. I cannot set an automatic "redial", as upon connection, I need the route to be reestablished via the batch file. Microsoft DUN allows scripts to be run for PPP dial-up connections, but apparently not for PPTP.
How do I AUTOMATICALLY create a custom route every time she connects, so I can take advantage of automatic "redial"? My batch file works, but I have no current way of making it automatically execute upon a VPN connection.
More detail:
Her laptop is running Windows XP Professional.
Every time she connects to the office via PPTP, she is assigned an IP such as 192.168.30.2 . The last octet is dynamic, which means it might change every time she reconnects. The office LAN consists of a private Class C subnet like 192.168.40.0/255.255.255.0.
So every time she connects, she has to manually run the batch file I gave her, which reads the routing table (route print), finds the 192.168.30 address, and sets a custom route with the route add command. So in the example above, the batch file would run the following command upon completion:
route add 192.168.40.0 mask 255.255.255.0 192.168.30.2
If she is dropped, and has to reconnect, she might be assigned the address 192.168.30.1 . Then when she runs the batch file again, it will execute:
route add 192.168.40.0 mask 255.255.255.0 192.168.30.1
This example does not reveal my real private IPs or subnets, but the premise is the same.
One of my sales staff has a laptop which they use from home, and connects to the office using a Microsoft PPTP VPN connection over her regular broadband internet connection.
For her own sanity, she DOES NOT use the VPN connection as the default gateway. This way, her office traffic goes through the VPN, and all other internet traffic goes through her regular internet connection.
Since no route to the office LAN is automatically created over the VPN, I have given her a batch file to run that will automatically create a route to the office LAN over her VPN via the new IP she was issued on the VPN connection. The batch file figures out which IP is the VPN connection, and sets a custom route for the office subnet through that IP.
The problem:
Her PPTP connection drops frequently. The custom routes are automatically removed each time. Setting a static or persistent route would not work, as the IP address assigned via PPTP varies. I cannot set an automatic "redial", as upon connection, I need the route to be reestablished via the batch file. Microsoft DUN allows scripts to be run for PPP dial-up connections, but apparently not for PPTP.
How do I AUTOMATICALLY create a custom route every time she connects, so I can take advantage of automatic "redial"? My batch file works, but I have no current way of making it automatically execute upon a VPN connection.
More detail:
Her laptop is running Windows XP Professional.
Every time she connects to the office via PPTP, she is assigned an IP such as 192.168.30.2 . The last octet is dynamic, which means it might change every time she reconnects. The office LAN consists of a private Class C subnet like 192.168.40.0/255.255.255.0.
So every time she connects, she has to manually run the batch file I gave her, which reads the routing table (route print), finds the 192.168.30 address, and sets a custom route with the route add command. So in the example above, the batch file would run the following command upon completion:
route add 192.168.40.0 mask 255.255.255.0 192.168.30.2
If she is dropped, and has to reconnect, she might be assigned the address 192.168.30.1 . Then when she runs the batch file again, it will execute:
route add 192.168.40.0 mask 255.255.255.0 192.168.30.1
This example does not reveal my real private IPs or subnets, but the premise is the same.