diff --git a/en_US.ISO8859-1/books/handbook/security/chapter.sgml b/en_US.ISO8859-1/books/handbook/security/chapter.sgml
index 64747fde86..f13ba66626 100644
--- a/en_US.ISO8859-1/books/handbook/security/chapter.sgml
+++ b/en_US.ISO8859-1/books/handbook/security/chapter.sgml
@@ -2875,13 +2875,11 @@ options IPSEC_ESP #IP security (crypto; define w/IPSEC)Now, let us setup security association. Execute &man.setkey.8;
on both HOST A and B:
-
-&prompt.root; setkey -c
-add 10.2.3.4 10.6.7.8 ah-old 1000 -m transport -A keyed-md5 "MYSECRETMYSECRET" ;
-add 10.6.7.8 10.2.3.4 ah 2000 -m transport -A hmac-sha1 "KAMEKAMEKAMEKAMEKAME" ;
-add 10.6.7.8 10.2.3.4 esp 3000 -m transport -E des-cbc "PASSWORD" ;
-^D
-
+ &prompt.root; setkey -c
+ add 10.2.3.4 10.6.7.8 ah-old 1000 -m transport -A keyed-md5 "MYSECRETMYSECRET" ;
+ add 10.6.7.8 10.2.3.4 ah 2000 -m transport -A hmac-sha1 "KAMEKAMEKAMEKAMEKAME" ;
+ add 10.6.7.8 10.2.3.4 esp 3000 -m transport -E des-cbc "PASSWORD" ;
+ ^D
Actually, IPsec communication does not process until security policy
entries are defined. In this case, you must setup each host.
@@ -2890,18 +2888,18 @@ add 10.6.7.8 10.2.3.4 esp 3000 -m transport -E des-cbc "PASSWORD" ;
At A:
&prompt.root; setkey -c
-spdadd 10.2.3.4 10.6.7.8 any -P out ipsec
+ spdadd 10.2.3.4 10.6.7.8 any -P out ipsec
ah/transport/10.2.3.4-10.6.7.8/require ;
-^D
+ ^D
At B:
&prompt.root; setkey -c
-spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
+ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
esp/transport/10.6.7.8-10.2.3.4/require ;
-spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
+ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
ah/transport/10.6.7.8-10.2.3.4/require ;
-^D
+ ^D
HOST A --------------------------------------> HOST E
@@ -2934,38 +2932,35 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
whose key is this is the test key
.
Configuration at Host-A:
-
- &prompt.root; setkey -c <<EOF
- spdadd fec0::10[any] fec0::11[110] tcp -P out ipsec
- esp/transport/fec0::10-fec0::11/use ;
- spdadd fec0::11[110] fec0::10[any] tcp -P in ipsec
- esp/transport/fec0::11-fec0::10/use ;
- add fec0::10 fec0::11 esp 0x10001
- -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- add fec0::11 fec0::10 esp 0x10002
- -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- EOF
-
+ &prompt.root; setkey -c <<EOF
+ spdadd fec0::10[any] fec0::11[110] tcp -P out ipsec
+ esp/transport/fec0::10-fec0::11/use ;
+ spdadd fec0::11[110] fec0::10[any] tcp -P in ipsec
+ esp/transport/fec0::11-fec0::10/use ;
+ add fec0::10 fec0::11 esp 0x10001
+ -m transport
+ -E blowfish-cbc "kamekame"
+ -A hmac-sha1 "this is the test key" ;
+ add fec0::11 fec0::10 esp 0x10002
+ -m transport
+ -E blowfish-cbc "kamekame"
+ -A hmac-sha1 "this is the test key" ;
+ EOF
and at Host-B:
&prompt.root; setkey -c <<EOF
- spdadd fec0::11[110] fec0::10[any] tcp -P out ipsec
- esp/transport/fec0::11-fec0::10/use ;
- spdadd fec0::10[any] fec0::11[110] tcp -P in ipsec
- esp/transport/fec0::10-fec0::11/use ;
- add fec0::10 fec0::11 esp 0x10001 -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- add fec0::11 fec0::10 esp 0x10002 -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- EOF
-
+ spdadd fec0::11[110] fec0::10[any] tcp -P out ipsec
+ esp/transport/fec0::11-fec0::10/use ;
+ spdadd fec0::10[any] fec0::11[110] tcp -P in ipsec
+ esp/transport/fec0::10-fec0::11/use ;
+ add fec0::10 fec0::11 esp 0x10001 -m transport
+ -E blowfish-cbc "kamekame"
+ -A hmac-sha1 "this is the test key" ;
+ add fec0::11 fec0::10 esp 0x10002 -m transport
+ -E blowfish-cbc "kamekame"
+ -A hmac-sha1 "this is the test key" ;
+ EOF
Note the direction of SP.
@@ -2988,19 +2983,17 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
Configuration at Gateway-A:
-
- &prompt.root; setkey -c <<EOF
- spdadd 10.0.1.0/24 10.0.2.0/24 any -P out ipsec
- ah/tunnel/172.16.0.1-172.16.0.2/require ;
- spdadd 10.0.2.0/24 10.0.1.0/24 any -P in ipsec
- ah/tunnel/172.16.0.2-172.16.0.1/require ;
- add 172.16.0.1 172.16.0.2 ah-old 0x10003 -m any
- -A keyed-md5 "this is the test" ;
- add 172.16.0.2 172.16.0.1 ah-old 0x10004 -m any
- -A keyed-md5 "this is the test" ;
+ &prompt.root; setkey -c <<EOF
+ spdadd 10.0.1.0/24 10.0.2.0/24 any -P out ipsec
+ ah/tunnel/172.16.0.1-172.16.0.2/require ;
+ spdadd 10.0.2.0/24 10.0.1.0/24 any -P in ipsec
+ ah/tunnel/172.16.0.2-172.16.0.1/require ;
+ add 172.16.0.1 172.16.0.2 ah-old 0x10003 -m any
+ -A keyed-md5 "this is the test" ;
+ add 172.16.0.2 172.16.0.1 ah-old 0x10004 -m any
+ -A keyed-md5 "this is the test" ;
- EOF
-
+EOF
If the port number field is omitted such as above then
[any] is employed. -m
@@ -3010,19 +3003,17 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
and at Gateway-B:
-
- &prompt.root; setkey -c <<EOF
- spdadd 10.0.2.0/24 10.0.1.0/24 any -P out ipsec
- ah/tunnel/172.16.0.2-172.16.0.1/require ;
- spdadd 10.0.1.0/24 10.0.2.0/24 any -P in ipsec
- ah/tunnel/172.16.0.1-172.16.0.2/require ;
- add 172.16.0.1 172.16.0.2 ah-old 0x10003 -m any
- -A keyed-md5 "this is the test" ;
- add 172.16.0.2 172.16.0.1 ah-old 0x10004 -m any
- -A keyed-md5 "this is the test" ;
+ &prompt.root; setkey -c <<EOF
+ spdadd 10.0.2.0/24 10.0.1.0/24 any -P out ipsec
+ ah/tunnel/172.16.0.2-172.16.0.1/require ;
+ spdadd 10.0.1.0/24 10.0.2.0/24 any -P in ipsec
+ ah/tunnel/172.16.0.1-172.16.0.2/require ;
+ add 172.16.0.1 172.16.0.2 ah-old 0x10003 -m any
+ -A keyed-md5 "this is the test" ;
+ add 172.16.0.2 172.16.0.1 ah-old 0x10004 -m any
+ -A keyed-md5 "this is the test" ;
- EOF
-
+EOF
Making SA bundle between two security gateways
@@ -3046,27 +3037,25 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
for ESP is hmac-sha1. Authentication algorithm for AH is hmac-md5.
Configuration at Gateway-A:
-
- &prompt.root; setkey -c <<EOF
- spdadd fec0:0:0:1::/64 fec0:0:0:2::/64 any -P out ipsec
- esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require
- ah/transport/fec0:0:0:1::1-fec0:0:0:2::1/require ;
- spdadd fec0:0:0:2::/64 fec0:0:0:1::/64 any -P in ipsec
- esp/tunnel/fec0:0:0:2::1-fec0:0:0:1::1/require
- ah/transport/fec0:0:0:2::1-fec0:0:0:1::1/require ;
- add fec0:0:0:1::1 fec0:0:0:2::1 esp 0x10001 -m tunnel
- -E 3des-cbc "kamekame12341234kame1234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:1::1 fec0:0:0:2::1 ah 0x10001 -m transport
- -A hmac-md5 "this is the test" ;
- add fec0:0:0:2::1 fec0:0:0:1::1 esp 0x10001 -m tunnel
- -E 3des-cbc "kamekame12341234kame1234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:2::1 fec0:0:0:1::1 ah 0x10001 -m transport
- -A hmac-md5 "this is the test" ;
+ &prompt.root; setkey -c <<EOF
+ spdadd fec0:0:0:1::/64 fec0:0:0:2::/64 any -P out ipsec
+ esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require
+ ah/transport/fec0:0:0:1::1-fec0:0:0:2::1/require ;
+ spdadd fec0:0:0:2::/64 fec0:0:0:1::/64 any -P in ipsec
+ esp/tunnel/fec0:0:0:2::1-fec0:0:0:1::1/require
+ ah/transport/fec0:0:0:2::1-fec0:0:0:1::1/require ;
+ add fec0:0:0:1::1 fec0:0:0:2::1 esp 0x10001 -m tunnel
+ -E 3des-cbc "kamekame12341234kame1234"
+ -A hmac-sha1 "this is the test key" ;
+ add fec0:0:0:1::1 fec0:0:0:2::1 ah 0x10001 -m transport
+ -A hmac-md5 "this is the test" ;
+ add fec0:0:0:2::1 fec0:0:0:1::1 esp 0x10001 -m tunnel
+ -E 3des-cbc "kamekame12341234kame1234"
+ -A hmac-sha1 "this is the test key" ;
+ add fec0:0:0:2::1 fec0:0:0:1::1 ah 0x10001 -m transport
+ -A hmac-md5 "this is the test" ;
- EOF
-
+ EOF
Making SAs with the different end
@@ -3086,31 +3075,29 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
Configuration at Host-A:
-
- &prompt.root; setkey -c <<EOF
- spdadd fec0:0:0:1::1[any] fec0:0:0:2::2[80] tcp -P out ipsec
- esp/transport/fec0:0:0:1::1-fec0:0:0:2::2/use
- esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require ;
- spdadd fec0:0:0:2::1[80] fec0:0:0:1::1[any] tcp -P in ipsec
- esp/transport/fec0:0:0:2::2-fec0:0:0:l::1/use
- esp/tunnel/fec0:0:0:2::1-fec0:0:0:1::1/require ;
- add fec0:0:0:1::1 fec0:0:0:2::2 esp 0x10001
- -m transport
- -E cast128-cbc "12341234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:1::1 fec0:0:0:2::1 esp 0x10002
- -E rc5-cbc "kamekame"
- -A hmac-md5 "this is the test" ;
- add fec0:0:0:2::2 fec0:0:0:1::1 esp 0x10003
- -m transport
- -E cast128-cbc "12341234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:2::1 fec0:0:0:1::1 esp 0x10004
- -E rc5-cbc "kamekame"
- -A hmac-md5 "this is the test" ;
+ &prompt.root; setkey -c <<EOF
+ spdadd fec0:0:0:1::1[any] fec0:0:0:2::2[80] tcp -P out ipsec
+ esp/transport/fec0:0:0:1::1-fec0:0:0:2::2/use
+ esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require ;
+ spdadd fec0:0:0:2::1[80] fec0:0:0:1::1[any] tcp -P in ipsec
+ esp/transport/fec0:0:0:2::2-fec0:0:0:l::1/use
+ esp/tunnel/fec0:0:0:2::1-fec0:0:0:1::1/require ;
+ add fec0:0:0:1::1 fec0:0:0:2::2 esp 0x10001
+ -m transport
+ -E cast128-cbc "12341234"
+ -A hmac-sha1 "this is the test key" ;
+ add fec0:0:0:1::1 fec0:0:0:2::1 esp 0x10002
+ -E rc5-cbc "kamekame"
+ -A hmac-md5 "this is the test" ;
+ add fec0:0:0:2::2 fec0:0:0:1::1 esp 0x10003
+ -m transport
+ -E cast128-cbc "12341234"
+ -A hmac-sha1 "this is the test key" ;
+ add fec0:0:0:2::1 fec0:0:0:1::1 esp 0x10004
+ -E rc5-cbc "kamekame"
+ -A hmac-md5 "this is the test" ;
- EOF
-
+ EOF