VPN slows down regular internet access

sososowhat

Registered
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!
 
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

# Remove default of going to work network
route delete default $VPN_GATEWAY

# Route work traffic through the VPN connection
route -n add -net 61.48.23 $VPN_GATEWAY
route -n add -net 61.48.24 $VPN_GATEWAY

# Route everything else through your local connection
route add default $LOCAL_GATEWAY

# Add company intranet
VALUE=`cat /etc/resolv.conf | grep mycompany `
[ -z $VALUE ] && {
echo "search mycompany.net " >> /etc/resolv.conf
}
A few extra notes:
  1. 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).
  2. 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).
  3. 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.
 
Back
Top