This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| technical:ipsec:ipsec-tools [2023/03/27 15:06] – [Configure Tunnel] jc | technical:ipsec:ipsec-tools [2023/03/27 15:23] (current) – jc | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| ip tunnel add gre0 mode gre remote < | ip tunnel add gre0 mode gre remote < | ||
| ip link set gre0 up | ip link set gre0 up | ||
| - | ip address < | + | 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 | ||
| Line 28: | Line 68: | ||
| racoon -f / | racoon -f / | ||
| ``` | ``` | ||
| - | </markdow | + | </markdown> |
| - | n> | + | |