blob: cff3b8eaf4e3e10121ba30844341e9b669f4cf10 [file] [log] [blame]
developera0baee32021-07-13 14:50:26 +08001--- a/feeds/packages/net/strongswan/files/ipsec.conf
2+++ b/feeds/packages/net/strongswan/files/ipsec.conf
3@@ -0,0 +1,28 @@
4+config 'ipsec'
5+
6+config 'remote' 'TEST'
7+ option 'enabled' '1'
8+ option 'gateway' '10.10.20.253'
9+ option 'authentication_method' 'psk'
10+ option 'pre_shared_key' '123456789'
11+ list 'crypto_proposal' 'phase_1_settings'
12+ list 'tunnel' 'TUNNEL'
13+
14+config 'crypto_proposal' 'phase_1_settings'
15+ option 'encryption_algorithm' 'aes128'
16+ option 'hash_algorithm' 'sha1'
17+ option 'dh_group' 'modp768'
18+
19+config 'tunnel' 'TUNNEL'
20+ option 'mode' 'add'
21+ option 'local_subnet' '192.168.1.0/24'
22+ option 'remote_subnet' '192.168.2.0/24'
23+ option 'crypto_proposal' 'phase_2_settings'
24+ option 'keyexchange' 'ikev2'
25+ option 'ikelifetime' '10800'
26+ option 'lifetime' '3600'
27+
28+config 'crypto_proposal' 'phase_2_settings'
29+ option 'encryption_algorithm' 'aes128'
30+ option 'hash_algorithm' 'sha1'
31+ option 'dh_group' 'modp768'
32--- a/feeds/packages/net/strongswan/Makefile
33+++ b/feeds/packages/net/strongswan/Makefile
34@@ -505,6 +505,8 @@
35 $(INSTALL_CONF) ./files/ipsec.user $(1)/etc/
36 $(INSTALL_DIR) $(1)/etc/init.d
37 $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
38+ $(INSTALL_DIR) $(1)/etc/config
39+ $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/config/ipsec
40 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec $(1)/usr/sbin/
41 endef
42