When using the Mac OS X (currently 10.9.4) native VPN client to connect over VPN to a Cisco device you might find it disconnects every 45 to 60 minutes without any warning and no attempt to redial to the VPN server. If you are like me and have a lot of sessions running, reconnecting them all again can be a real pain and that’s not even considering the transfers that also terminate and have to be restarted.
I was surprised to find this has been a “bug” for a while now, there does seem to be a fix but it’s designed for people that know Linux somewhat..
Here is how I solved the problem:
1. Connect to the VPN (this generates a file)
2. Copy the generated conf file to /etc/racoon
sudo cp /var/run/racoon/22.214.171.124.conf /etc/racoon
3. Edit the racoon file (I’m using vi but you could use vim or nano)
sudo vi /etc/racoon/racoon.conf
4. At the end of the file comment out the following line:
It should look like this:
# include "/var/run/racoon/*.conf";
5. Add the following line (Change 126.96.36.199 to the IP address of your VPN server)
Save and close
6. Edit the following file /etc/racoon/188.8.131.52.conf (change 184.108.40.206 to the ip address of your VPN server)
sudo vi /etc/racoon/220.127.116.11.conf
7. Disable dead peer detection by changing the value to “0”:
8. Change proposal check from “obey” to “claim”
9. Change the proposed lifetime in each proposal from 3600 to 86400 (24 hours):
lifetime time 86400;
Note: Change them all, not just one!
10. Disconnect and reconnect