VPN post-connect script?

  • Thread starter Thread starter Scott Balmos
  • Start date Start date
S

Scott Balmos

Hi all,

I solved the earlier issue I was having, with not being able to share
directories. It's because the server only knows about its 192.168.x address
when dealing with shares (I have no idea why... if someone could explain that
one, I'd love it). So, after I connect to the server via the VPN, and get a
10.x address, I need to add a routing table entry to force traffic for
192.168.254.254 over the 10.x VPN address.

My question is if there is anything *client side* I can set to run some type
of post-connect batch script, which can automatically add this static route
entry. Explaining to a customer how to read the routing table to get the
assigned 10.x VPN IP, and then how to type in the routing table add entry
would be painful at best.

Any suggestions? Thanks!

--Scott
 
If you want to do it that way, configure the server with a static address
pool. Then the gateway becomes the first IP in the pool:

route add 192.168.254.254 mask 255.255.255.255 <First 10.x address in Pool>

Doug Sherman
MCSE, MCSA, MCP+I, MVP
 
That would work if the route add to be added on the VPN server. But I stated
*client* side. I know the server gets 10.0.0.1, the beginning of the IP pool.
But the client gets something between 10.0.0.2 through 10.0.0.100. That IP
isn't known until the VPN is connected and the server gives the IP,
obviously. Thus my asking if there is some incantation to ipconfig or
elsewhere that will give me this IP programmatically, so I can write a
connection batch file that uses rasdial to connect the VPN, and then some
other command line hand-waving to feed the assigned IP into the route entry.

--Scott
 
Back
Top