Cisco IPSec VPN Automatic Routing Table
What’s wrong?
In PPTP/L2TP world:
/etc/ppp/ip-upwill be run on VPN startup/etc/ppp/ip-downwill be run on VPN shutdown
But Cisco IPSec just ignore these files, why?
After doing some Googling, I figured out the difference:
- PPTP/L2TP managed by pppd
- Cisco IPSec managed by racoon
And, here is the solution
Base environment configure
sudo cp /etc/racoon/racoon.conf{,.bak}sudo mkdir /etc/racoon/remotesudo sh -c 'echo "include \"/etc/racoon/remote/*.conf\" ;" >> /etc/racoon/racoon.conf'sudo cp /var/run/racoon/YOUR_VPN_SERVER_IP.conf /etc/racoon/remote/script "/etc/ppp/ip-up" phase1_up;
script "/etc/ppp/ip-down" phase1_down;