ipsec: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/sbin/ipsec - from package: libreswan
/usr/sbin/ipsec - from package: openswan

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/sbin/ipsec - from package: strongswan-starter

You may install the required package with command apt-get install {package}
Error in other languages:
ipsec: bevel nie gevind nie
ipsec: comandă negăsită
ipsec: comando não encontrado
ipsec: commande introuvable
ipsec: command not found
ipsec: käsku ei ole
ipsec: không tìm thấy lệnh
ipsec: komanda nerasta
ipsec: Kommando nicht gefunden.
ipsec: kommandot finns inte
ipsec: komut yok
ipsec: nie znaleziono polecenia
ipsec: níor aimsíodh an t-ordú
ipsec: no se encontró la orden
ipsec: no s'ha trobat l'ordre
ipsec: opdracht niet gevonden
ipsec: parancs nem található
ipsec: perintah tidak ditemukan
ipsec: príkaz nenájdený
ipsec: příkaz nenalezen
ipsec: команда не найдена
ipsec: командата не е открита
ipsec: 命令找不到
ipsec: コマンドが見つかりません