Easy way to make IPSec tunnel from FreeBSD to Cisco
Let's start with the fact that in the manus, where Racoon is recommended to install, racoon1 is mentioned, which in FreeBSD 7.x is now called ipsec-toos.
so
portinstall ipsec-tools ')
Do not forget to compile the kernel with ipsec support:
device crypto
option IPSEC
attention, with 7.x IPSEC_ESP do not need to specify!
create ipsec.conf
cat> /etc/ipsec.conf
flush; spdflush; spdadd 192.168.50.0/24 192.168.0.0/24 any -P out ipsec esp / tunnel / 83.170.247.74-84.204.32.202 / unique; spdadd 192.168.0.0/24 192.168.50.0/24 any -P in ipsec esp / tunnel / 84.204.32.202-83.170.247.74 / unique;
Note, in these sections, the important parameters are encryption_algorithm and authenticaton_algorythm, they must match the parameters in the remote system.
cat> /usr/local/etc/racoon/psk.txt
84.204.32.202 mysuperpass
ctrl + d
and we add start in rc.conf
cat >> / etc / rc.conf
racoon_enable = "yes"
ctrl + d
everything!
You can check the performance of the tunnel like this:
ping -S 192.168.50.1 192.168.0.1
the ping should go and the setkey -D command should show the established tunnels