The following applies to the Cisco VPN Client Version 4.0.3 and SafeNet 8 - although of course it may work for other situations.
As part of my work, I need to access my customers' networks via VPN. Naturally, they don't all use the same VPN client software, and, equally obviously, the VPN clients are completely incompatible; the Cisco VPN client will refuse to install if the SafeNet client is installed (the reverse isn't true, but they just doesn't work if you try it).
Given that I have a primary PC on which I have my development tools configured, I don't want to set up another PC with all that stuff and switch between them. However, the solution does require a second PC.
Since the two VPN clients cannot coexist on the same PC, they must be installed on two different PCs; one on the main PC, and one on a second PC. We must then configure TCP/IP routing so that traffic that needs to use the VPN on the second PC routes its traffic to that PC, which then passes it through its own VPN.
Sounds simple, eh? Unfortunately, there are some catches.
The first thing to know is that the Cisco VPN Client does not permit routing through it from the local area network. Fortunately, the SafeNet client does allow such routing. This simplifies our choice; the Cisco VPN client must be installed on the primary PC, and the SafeNet on the secondary.
HKLM\System\CurrentControlSet \Services\Tcpip\Parameters\IPEnableRouter
route add 172.16.10.0 mask 255.255.255.0 192.168.0.100 -p
HKLM\System\CurrentControlSet \Services\Tcpip\Parameters\EnableICMPredirect
All traffic destined for 172.16.10.nnn will now be routed via the secondary PC.
"What on Earth...?" I hear you cry. There is a subtlety to TCP/IP implementation on Windows that screws us unless we make the change outlined above
By default, when Windows TCP/IP sends a packet, it cunningly looks at the route that was actually used and sees if it can be optimized. That is to say, for example, if sending to address (Z) is done by sending to (X), but (A) sends it to via the local router/firewall (Y), then Windows spots this, and creates an entry in the route table that says, "hey, to get to (Z), go via (Y).
Obviously this is usually a good thing - what's the point in going via point (X) if you need to? Of course, in our case we HAVE to go via (X), since this does the VPN encryption stuff.
Fortunately, Microsoft (gawd bless 'em) gave us a means to switch off this intelligence, using the registry setting described above. The symptom if you don't make this change is that the first packet that you send via ping (for example) gets through, but the rest do not, and an entry mysteriously appears in the route table.