# VPN slows down regular internet access



## sososowhat (Apr 15, 2003)

I'm using Internet Connect VPN (PPTP) into my work.  However, when I do so access to the internet through Safari or Explorer slows & pretty much dies (most,  not all, sites often, not always, time out).

Is there a way to keep it so that I've got the VPN for using Citrix or Terminal Server into the office & collecting my email into Mail, while at the same time NOT using the VPN for the rest of my internet access?

Help would be very much appreciated!


----------



## pikester (May 2, 2003)

Piece o' cake! Here's a script I use to do just that:


> #!/bin/bash
> # Setup Gateway information
> VPN_GATEWAY=`netstat -r | grep "pptp0" | grep "UH" | awk '{print $1}'`
> LOCAL_GATEWAY=192.168.0.1
> ...


A few extra notes:

I am using a Linksys router to connect to my DSL modem. The LOCAL_GATEWAY is the IP address I've assigned to the router. If you don't use a router, just go to the Network Panel to get your IP (let me know if you want to automate getting this in the script).
Route the work addresses through the VPN connection. List out each different subnet that you hit up (my company has several subnets, my list is quite long).
If you are use to accessing your machines with a short name (web vs. web.mycompany.net), you can set that up as well.
[/list=1]
Create the file in your home directory (I call mine vpnme.sh). In the unix terminal, allow yourself and others to run it:
chmod 755 vpnme.sh

When you want to run it:
sudo vpnme.sh
and type in your password again.


----------

