Connect to Site to Site VPN with Mac OS X

The following is a list of steps and screenshots to set up a VPN connection to a site-to-site VPN on Apple Mac OS X. This happens to be a Windows 2003 Server running a VPN for this example but this tutorial should work for other VPN's as well. Mac OS X has a built-in VPN client so there is no need for 3rd party software to make the connection to a VPN:

Open System Preferences from the Apple menu.

launch system preferences



On System Preferences under the Internet & Network section, open the Network tool.

system preferences dialog

Click on the "+" button to add a new network connection.

network dialog

In the dialog to create a new network connection, click the Interface drop down and select VPN.

select the network interface

Choose a VPN Type. In this case, we've chosen PPTP (Point to Point Tunneling Protocol) since we are connecting to a Windows Site to Site VPN.

select vpn type

Configure you connection by entering the Server Address (this should be the IP Address or Domain to your VPN server). Also set the Account Name (the user name of your windows account on the VPN server). Then click Apply.

configure server address

Click on the Authentication Settings button to set the password for your VPN account.

open authentication settings

Enter the password to your VPN server that is associated with the Account Name you entered on the previous screen. You could also use a different authentication method from the list but in this case, we are connecting with a standard Windows account. Click OK.

user authentication dialog

This is an important note. If you are already connected to the Internet and want to use your current Internet connection for web surfing, etc. Once you connect to this VPN, your system will automatically try to use the VPN connection for Internet browsing. By checking the Send all traffic over VPN connection option, you are telling Mac to use your current Internet connection to browse the web instead of using the VPN. This is probably always what you want and if you see a dead browser page after turning on your Internet connection, look for this setting and make sure it is checked.

vpn options

Click Apply to commit these settings and then the Connect button will be clickable.

apply vpn changes

Click Connect to start the VPN connection.

connect to vpn

After a few seconds (give or take) of negotiating the connection, you should see the following "Connected" status on your VPN connection. That is when you know you have successfully set up your VPN. Notice the green bars on the Sent/Received bars will also show you that the VPN is working correctly.

vpn connected status

You can see in your system icons that there is a new VPN icon. By clicking on it, you can easily disconnect this VPN or Open Network Preferences... to open the dialog where you can edit your VPN configuration. This will also show a timer of how long you have been connected to the VPN.

vpn system menu

Most times, the reason you are using a VPN is to easily share files on a secure network or connect to a protected application. In this case, here are the steps you would take to connect to a shared windows directory on the new VPN network. With the Finder in focus, click on Go -> Connect to Server...

connect to server

You will be using Mac OS X's networking subsystem called "Samba" to connect to the shared folder. So the address you would enter will be prefaced with "smb://" and then the server name and shared folder name you want to connect to. In this case, the IP address I used here is the INTERNAL IP of the server you are connecting to via VPN on it's own internal network. "test" is the name of the shared folder I am connecting to. Click the Connect button.

connect to server dialog

You will see a dialog while the system negotiates with the server to find this folder.

connecting to server dialog

Enter your UserName and Password (probably the same as your Username and Password you used for your VPN)to connect to this network shared folder. You can also choose to "Remember this password in my keychain" which will allow Mac to store the password so you don't have to keep entering it everytime you relog into the VPN. Click Connect.

enter your user name and password to access the file server

If all was entered correctly, you should see the Finder open to your folder and the files on your VPN server in this shared folder will be displayed. You can now drag and drop files and use it just like a local folder over your VPN connection.

finder shared folder

If you have trouble connecting to your folder share, you may be experiencing a problem with the way passwords are handled in Mac vs. Windows authentication. You may find this link helpful which describes how to edit your network configuration to allow Mac to connect to the server:

http://support.apple.com/kb/TS1564?viewlocale=en_US

To disconnect, you can use the context menu in the system preferences and choose the "Disconnect" option.

Hi Ben - this was very

Hi Ben - this was very helpful.

Question for you. I have the "Send all traffic over VPN" unchecked. Do the green send/receive bars indicate that my traffic in fact is going over the VPN or does this indicate something else?

They flash every once in awhile, usually when I go to a new URL.

Thanks.

Green traffic bars

Yes, these should flash when traffic is occurring over your VPN connection. Sounds like you have things configured correctly.

Green traffic bars

I don't want local web traffic to go over the VPN that's why I have the box UNchecked.

But if the green bars are flashing does this mean my traffic is going through the VPN? They only flash on the first instance of a new URL but do not flash again if I visit other pages within that domain.

Thanks.

Not sure

I am not sure about that. I don't know a lot about the flashing traffic bars. With the box unchecked, local traffic should not pass over your VPN but I don't know if that correlates to the way the bars flash or not. This might be a question for the Apple forums.