To jest stara wersja strony!
Jak zestawić połączenie szyfrowane i przeroutować więcej niż jedną sieć.
Instalujemy pakiety racoon i ipsec-tools.
Plik /etc/racoon/psk.txt:
1.2.3.4 naszetajnehaslo
Plik /etc/racoon/racoon.conf:
log info;
path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";
listen {
isakmp 11.22.33.44; #nasze IP
}
remote 1.2.3.4 {
exchange_mode main;
lifetime time 8 hour;
ph1id 0;
proposal {
encryption_algorithm 3des;
hash_algorithm sha1;
authentication_method pre_shared_key;
dh_group 2;
}
}
sainfo anonymous {
pfs_group 2;
lifetime time 1 hour;
encryption_algorithm 3des;
authentication_algorithm hmac_sha1;
compression_algorithm deflate;
remoteid 0;
}
Plik :
#!/usr/sbin/setkey -f
flush;
spdflush;
spdadd 192.168.1.2/32 10.1.1.2/32 any -P out ipsec
esp/tunnel/11.22.33.44-1.2.3.4/unique;
spdadd 10.1.1.2/32 192.168.1.2/32 any -P in ipsec
esp/tunnel/1.2.3.4-11.22.33.44/unique;
spdadd 192.168.1.3/32 10.1.1.3/32 any -P out ipsec
esp/tunnel/11.22.33.44-1.2.3.4/unique;
spdadd 10.1.1.3/32 192.168.1.3/32 any -P in ipsec
esp/tunnel/1.2.3.4-11.22.33.44/unique;
Główna różnica dotycząca standardowego konfiga polega na słowie unique - domyślnie jest require.