unix.macintosh

How to setting up your PPTP VPN under Mac OS X 10.4 (Tiger)

Setting up VPN access under Mac OS X 10.4 is simple. The following instructions go step-by-step through the creation process.

...and eventually help for troubleshooting





System Requirements

Before setting up the VPN, be sure your installation is up-to-date by running Software Update. Now the latest Mac OS X version is 10.4.11.

Open Internet Connect

Then, open the ‘Applications’ folder by going to the Finder then scroll down until you see the “Internet Connect” icon.

01_open_internet_connect
Double–click on the “Internet Connect” icon. You should see a window like the one below. Your ‘Network’ and ‘Base Station ID’ will probably be different.

02_internet_connect

Create a New VPN Connection

Next, go to the ‘File’ menu and select “New VPN Connection Window.”


03_new_vpn_from_menu

You should see a the following screen. Click for exemple ‘PPTP,’ then click ‘Continue.’

04_choose_pptp

Set the Connection Information

The next screen will look like this:

05_new_config

Ensure 'Show VPN Status in menu bar' option is checked then
Click on the 'Configuration' ComboBox and select ’Edit Configurations…’

06_select_configs

You should see the following screen, which is where you create new VPN configurations.

07_new_config2

The 'Description' box is the name for the VPN configuration. Type whatever you want.

In the Server Address box, enter  the DNS name or the IP address of the server of  your VPN service.

In the Account Name box, enter your username as provided by tour VPN services. You usually created this username on the VPN provider website.

In the User Authentication box, enter the password the VPN provider gave you. You usually created this password on the VPN provider website to.

’Enable VPN on demand’ should be unchecked, and ’Encryption’ should be set to ’Automatic’.

Then click the ’OK’ button. back to previous screen you can see your configuration is saved

Now your done, and you’re ready to connect! (or not...)

When you want to connect

When you want to connect to your VPN, double–click on “Internet Connect,” click on “VPN (PPTP)”, then click the ‘Connect’ button

Or use VPN small icon inside menu bar.

12_titlebar_connect

When Connection fails...

==> Double-check your connection credential then retry.<==

 If it definitely not connect,
...Obviously, don't forget to patch your Router and/or your Modem!

It is not unusual to meet  Linksys, Belkin, or 'whatever' modem/router that badly handle PPTP protocol :

08_fw_update


When connection works but ...

Your VPN seems to be authenticated since Mac OS says it is, but you can't do anything (or few things)!
Safari and FireFox hang when loading URL!

09_not_connected_to_the_internet

Using Terminal.app try to ping... let's say 'google.com'

10_ping_google

If ping works, congratulation! your VPN is working, it is just mis-configured.
Your problem probably lays in hidden config parameters MTU/MRU (Maximum Transfert Unit/ Maximum Receive Unit) :

Mac OS X Graphical interface drive a well known VPN client called 'pppd'
let's go back to Terminal.app an type 'ps aux | grep pppd'

11_grep_pppd

The command line helps you to identifiy the GUID Mac OS gave to your VPN connection (the number next to 'serviceid')

Now you shall open well protected file '/Library/Preferences/SystemConfiguration/preferences.plist'

You shall find a section named with GUID previously found.
Under this section, there is a sub-section named 'PPP'.
You may insert in that last section the folowing two new entry :

<key>LCPMRU</key>
  <integer>1300</integer>
<key>LCPMTU</key>
  <integer>1300</integer>

The system needs to be restarted in order to take your modifications into account.

!!! WARNING !!!
You shall modify file 'preferences.plist' with caution! If you dammage it, your system might not restart.




When it still not works


It's up to you to troubleshoot !

First try to look at default MacOsX ppp log file located at '/var/log/ppp.log'

Then you can use the following sample command to manually connect to your VPN service using Terminal application.
By trickering parameters, you might find a solution to your problem(s) :

sudo pppd serviceid 2 debug logfile /var/log/ppp.log \
plugin PPTP.ppp remoteaddress MyVPNProvider.com redialcount 1 redialtimer 5 \
idle 1800 mru 1300 mtu 1300 receive-all novj 0:0 noipdefault \
ipcp-accept-local ipcp-accept-remote noauth refuse-pap refuse-chap-md5 \
user MYLOGIN password MYPASSWORD hide-password \
updetach mppe-stateless mppe-128 looplocal defaultroute

After pppd command has been started, you can disconnect your VPN connection by exiting pppd process. You just have to find its process PID using previously seen'ps aux | grep pppd' command, then force to exit the found process using 'kill -15' command :

13_kill_pppd