Tuesday, February 5, 2008

Restarting Pluto [OpenSWAN]

If you've suffered the same fate as I have...the inability to locate solutions on restarting pluto aside from the infamous RTM this post if for you.

First we'll make sure pluto is running and get the PID

user@machine ~> sudo ipsec setup --status
IPsec running - pluto pid: 8794
pluto pid 8794
No tunnels up


Now we restart everything related to ipsec

user@machine ~> sudo /etc/init.d/ipsec restart
ipsec_setup: Stopping Openswan IPsec...
ipsec_setup: Starting Openswan IPsec 2.4.6...
ipsec_setup: insmod /lib/modules/2.6.22-14-generic/kernel/net/key/af_key.ko
ipsec_setup: insmod /lib/modules/2.6.22-14-generic/kernel/net/ipv4/xfrm4_tunnel.ko
ipsec_setup: insmod /lib/modules/2.6.22-14-generic/kernel/net/xfrm/xfrm_user.ko


Last but not lease lets make sure pluto restarted and has a new PID

user@machine ~> ipsec setup --status
IPsec running - pluto pid: 9193
pluto pid 9193
No tunnels up

There are probably other ways of accomplishing this as well however so if you know please add a comment letting everyone know.

No comments: