Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to configure a server to automatically copy some files to a remote machine. In order to make the copy work, I need to establish a VPN connection to the remote network. I can use rasdial.exe to establish the connection.

To avoid interfering with anyone else using the server, I would like to specify that only certain traffic should flow through the VPN. Ideally, this would be traffic to specific IP addresses.

A similar question exists for Cisco VPN. The answers to this question make me suspect that this may only be possible with actual hardware rather than software.

Is it possible to set up my machine to send traffic through a VPN opened using rasdial.exe? If so, how can I accomplish it?

share|improve this question

1 Answer 1

If you're looking to send traffic through an IP for only a specific range of IP addresses, then you've got a relatively easy task that network routing was designed for.

Most consumer VPN connections set the default route to be the VPN's endpoint when it is activated. What you want to do is leave the default route entry pointing where it was. You'll then add specific entries for the subnet ranges that you're interested in accessing over the VPN.

Microsoft documentation for the Windows routing table is a good reference point. I'm not sure if you can setup the routes with rasdial beforehand, but you can definitely script the appropriate add / remove commands to trigger when the interface comes online.

Update from @graveyface's comment

Connection Manager Administration Toolkit has a way to define routing tables in your connection besides the default routing entry that a connection would otherwise have.

share|improve this answer
1  
if you roll a connection with the CMAK kit, you can specify routes, etc. Then all he would need to do is call the connection after installing it (CMAK creates an executable installer) with rasdial and terminate when he's done. –  gravyface Aug 20 '12 at 18:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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