This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
technical:ipsec:ipsec-tools [2023/03/27 15:02] – created jc | technical:ipsec:ipsec-tools [2023/03/27 15:23] (current) – jc | ||
---|---|---|---|
Line 8: | Line 8: | ||
``` | ``` | ||
# Configure Tunnel | # Configure Tunnel | ||
+ | ``` | ||
+ | ip tunnel add gre0 mode gre remote < | ||
+ | ip link set gre0 up | ||
+ | ip address < | ||
+ | ``` | ||
# Configure ipsec.conf | # Configure ipsec.conf | ||
+ | Create / | ||
+ | ``` | ||
+ | spdflush; | ||
+ | spdadd 0.0.0.0/0 0.0.0.0/0 gre -P out ipsec esp/ | ||
+ | spdadd 0.0.0.0/0 0.0.0.0/0 gre -P in ipsec esp/ | ||
+ | ``` | ||
# Configure racoon.conf | # Configure racoon.conf | ||
+ | Make racoon directory. | ||
``` | ``` | ||
mkdir /etc/racoon | mkdir /etc/racoon | ||
+ | ``` | ||
+ | Create racoon.conf file. | ||
+ | ``` | ||
+ | path certificate "/ | ||
+ | remote anonymous { | ||
+ | exchange_mode main; | ||
+ | lifetime time 2 hour; | ||
+ | certificate_type x509 "/ | ||
+ | ca_type x509 "/ | ||
+ | my_identifier asn1dn; | ||
+ | nat_traversal on; | ||
+ | script "/ | ||
+ | dpd_delay 120; | ||
+ | proposal { | ||
+ | encryption_algorithm aes 256; | ||
+ | hash_algorithm sha1; | ||
+ | authentication_method rsasig; | ||
+ | dh_group modp4096; | ||
+ | } | ||
+ | proposal { | ||
+ | encryption_algorithm aes 256; | ||
+ | hash_algorithm sha1; | ||
+ | authentication_method rsasig; | ||
+ | dh_group 2; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | sainfo anonymous { | ||
+ | pfs_group 2; | ||
+ | lifetime time 2 hour; | ||
+ | encryption_algorithm aes 256; | ||
+ | authentication_algorithm hmac_sha1; | ||
+ | compression_algorithm deflate; | ||
+ | } | ||
``` | ``` | ||
# Copy Certificates and Key | # Copy Certificates and Key | ||
``` | ``` | ||
- | scp {ca.pem, | + | scp {ca.pem, |
``` | ``` | ||
# Enable the IPsec Service | # Enable the IPsec Service |