VPN post-connect script?

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
 
D

Doug Sherman [MVP]

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
 
S

Scott Balmos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top