aboutsummaryrefslogtreecommitdiffstats
path: root/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel
blob: eebf307ae50b1ff93c896ba213a3233641420b18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/sbin/setkey -f
#
#
# Example ESP Tunnel for VPN.
# 
# 			          ========= ESP =========
# 			          |                     |
# 	   Network-A          Gateway-A             Gateway-B           Network-B
# 	  192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
# 
# 	  ====== 83xx board A ======                  ===== 83xx board B =====
#	  |                        |                  |                      |
#	  eth0                  eth1                  eth1                eth0
#	192.168.1.130         200.200.200.10          200.200.200.20      192.168.2.130         
# 
# 
# Board B setup
# Flush the SAD and SPD
flush;
spdflush;

# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
#
# Security policies

spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
       esp/tunnel/200.200.200.20-200.200.200.10/require;

spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
       esp/tunnel/200.200.200.10-200.200.200.20/require;