Step by Step Configure Router Vyata 6.5.32
Step by Step Configure Router Vyata 6.5.32
Set the encryption cipher for vyatta@EAST# set vpn ipsec esp‐group ESP‐1E proposal 2
proposal 2. This also creates the encryption 3des
configuration node for
proposal 2 of ESP group ESP‐1E.
Set the hash algorithm for vyatta@EAST# set vpn ipsec esp‐group ESP‐1E proposal 2 hash
proposal 2. md5
Set the lifetime for the whole vyatta@EAST# set vpn ipsec esp‐group ESP‐1E lifetime 1800
ESP group.
View the configuration for the vyatta@EAST# show vpn ipsec esp‐group ESP‐1E
ESP group. Don’t commit yet. > proposal 1 {
> encryption aes256
> hash sha1
> }
> proposal 2 {
> encryption 3des
> hash md5
> }
> lifetime 1800
Step Command
Create the node for WEST and vyatta@EAST# set vpn ipsec site‐to‐site peer
set the authentication mode 192.0.2.1 authentication mode pre‐shared‐secret
Navigate to the node for the vyatta@EAST# edit vpn ipsec site‐to‐site peer 192.0.2.1
peer for easier editing [edit vpn ipsec site‐to‐site peer 192.0.2.1]
Provide the string that will be vyatta@EAST# set authentication pre‐shared‐secret test_key_1
used to generate encryption [edit vpn ipsec site‐to‐site peer 192.0.2.1]
keys.
Specify the default ESP group for vyatta@EAST# set default‐esp‐group ESP‐1E
all tunnels. [edit vpn ipsec site‐to‐site peer 192.0.2.1]
Provide the remote subnet for vyatta@EAST# set tunnel 1 remote prefix 192.168.40.0/24
the tunnel. [edit vpn ipsec site‐to‐site peer 192.0.2.1]
View the configuration for the vyatta@EAST# show vpn ipsec site‐to‐site peer 192.0.2.1
site‐to‐site connection. authentication
mode pre‐shared‐secret
pre‐shared‐secret test_key_1
}
default‐esp‐group ESP‐1E
ike‐group IKE‐1E
local‐address 192.0.2.33
tunnel 1 {
local {
prefix 192.168.60.0/24
}
remote {
prefix 192.168.40.0/24
}
}
Step Command
The system warns you that the A local RSA key file already exists and will be overwritten
existing RSA key file will be <CTRL>C to exit: 8
overwritten. You have the
opportunity to exit the key
generation process by pressing
<Ctrl>+c.
The system displays the public Your new local RSA key has been generated
portion of the generated key. The public portion of the key is:
By default, this key (including
the private portion of the key) is 0sAQPEOQvukvkv1ofuO8gEKp7IFFZz4lQqMZyVMInoQKUU/T0iKSK/0NSH9
stored in Ldrr8yQUFayzKag6wM7ASXWXKyt0LS1Gn8tJVsjKGaOkFgLREtVJD3pRzoc
/config/ipsec.d/rsa‐keys/ 7DSUOBViCD6f/TloTkPepRUtW1bmYev2H7tajSO0K0
localhost.key rqu+7nlocZI0ppMAyF6CS+Wd5W1JBpVGL+EkKfyEl9RagKxRW82XJbgY4LG
77K2YDN90Wd2GgMY3kf+YJLIzFEt/xRbh2/380FMpdaUYcbY31o/5PedUut
JCK5RMwl+IJGaxrKf1OmCQfzXlkM09ijZx8kzPIlBk
5hulZrbUWjzBJdFcwFAyPM3yCuv3+ndFX00t3ZLfKu+/wX595J
vyatta@WEST>
Step Command
The system warns you that the A local RSA key file already exists and will be overwritten
existing RSA key file will be <CTRL>C to exit: 5
overwritten. You have the
opportunity to exit the key
generation process by pressing
<Ctrl>+c.
vyatta@EAST>
If you are in operational mode on WEST, enter configuration mode now and perform the
following steps:
Example 2‐11 Record EAST’s public key on WEST
Step Command
Specify a name for EAST’s public vyatta@WEST# set vpn rsa‐keys rsa‐key‐name EAST‐key rsa‐key
key and paste EAST’s public key 0sAQOVBIJL+rIkpTuwh8FPeceAF0bhgLr++W51bOAIjFb
into the configuration. RDbR8gX3Vlz6wiUbMgGwQxWlYQiqsCeacicsfZx/amlEn9PkSE4e7tqK/JQ
o40L5C7gcNM24mup1d+0WmN3zLb9Qhmq5q3pNJxEwnVbPPQeIdZMJxnb1+l
A8DPC3SIxJM/3at1/KrwqCAhX3QNFY/zNmOtFogELCeyl4+d54wQljA+3dw
FAQ4bboJ7YIDs+rqORxWd3l3I7IajT/pLrwr5eZ8OA9NtAedbMiCwxyuyUb
znxXZ8Z/MAi3xjL1pjYyWjNNiOij82QJfMOrjoXVCfcPn96ZN+Jqk+KknoV
eNDwzpoahFOseJREeXzkw3/lkMN9N1
vyatta@WEST#
Step Command
Remove the pre‐shared key. vyatta@WEST# delete vpn ipsec site‐to‐site peer
192.0.2.33 authentication pre‐shared‐secret
Provide the identifier for EAST’s vyatta@WEST# set vpn ipsec site‐to‐site peer 192.0.2.33
digital signature. authentication rsa‐key‐name EAST‐key
View the modified configuration vyatta@WEST# show vpn ipsec site‐to‐site peer 192.0.2.33
for the site‐to‐site connection. authentication {
mode rsa
rsa‐key‐name EAST‐key
}
default‐esp‐group ESP‐1W
ike‐group IKE‐1W
local‐address 192.0.2.1
tunnel 1 {
local {
prefix 192.168.40.0/24
}
remote {
prefix 192.168.60.0/24
}
}
View Ethernet interface eth1 vyatta@WEST# show interfaces ethernet eth1 address
address configuration. address 192.0.2.1/27
local‐address is set to this
address.
If you are in operational mode on EAST, enter configuration mode now and perform the
following steps:
Example 2‐13 Record WEST’s public key on EAST
Step Command
Specify a name for WEST’s vyatta@EAST# set vpn rsa‐keys rsa‐key‐name WEST‐key rsa‐key
public key and paste WEST’s 0sAQPEOQvukvkv1ofuO8gEKp7IFFZz4lQqMZyVMIno
public key into the QKUU/T0iKSK/0NSH9Ldrr8yQUFayzKag6wM7ASXWXKyt0LS1Gn8tJVsjKGa
configuration. OkFgLREtVJD3pRzoc7DSUOBViCD6f/TloTkPepRUtW1bmYev2H7tajSO0K0
rqu+7nlocZI0ppMAyF6CS+Wd5W1JBpVGL+EkKfyEl9RagKxRW82XJbgY4LG
77K2YDN90Wd2GgMY3kf+YJLIzFEt/xRbh2/380FMpdaUYcbY31o/5PedUut
JCK5RMwl+IJGaxrKf1OmCQfzXlkM09ijZx8kzPIlBk
5hulZrbUWjzBJdFcwFAyPM3yCuv3+ndFX00t3ZLfKu+/wX595J
vyatta@EAST#
Step Command
Remove the pre‐shared key. vyatta@EAST# delete vpn ipsec site‐to‐site peer 192.0.2.1
authentication pre‐shared‐secret
Change the authentication vyatta@EAST# set vpn ipsec site‐to‐site peer 192.0.2.1
mode authentication mode rsa
Provide the identifier for WEST’s vyatta@EAST# set vpn ipsec site‐to‐site peer 192.0.2.1
digital signature. authentication rsa‐key‐name WEST‐key
View the modified configuration vyatta@EAST# show vpn ipsec site‐to‐site peer 192.0.2.1
for the site‐to‐site connection. authentication {
mode rsa
rsa‐key WEST‐key
}
default‐esp‐group ESP‐1E
ike‐group IKE‐1E
local‐address 192.0.2.33
tunnel 1 {
local {
prefix 192.168.60.0/24
}
remote {
prefix 192.168.40.0/24
}
}
View Ethernet interface eth0 vyatta@EAST# show interfaces ethernet eth0 address
address configuration. address 192.0.2.33/27
local‐address is set to this
address.
In this set of examples, you modify the VPN connection configured in the basic set of
examples between WEST and EAST (“Configuring a Basic Site-to-Site Connection” on
page 20). The site-to-site connection created in that set of examples used pre-shared keys
for authentication. This set of examples modifies the configuration to use X.509
certificates for authentication.
In general, the procedure for obtaining the files required to authenticate using X.509
certificates is as follows:
1 Generate the private key and a certificate signing request (CSR) (based on the public
key). This can be accomplished using generate vpn x509 key-pair <name> (for
example, generate vpn x509 key-pair west, where west.key is the private key and
west.csr is the certificate signing request file—both created in /config/auth).
2 Send the CSR file (for example, west.csr) to the certificate authority (CA) and
receive back a server certificate (for example, west.crt), the CA certificate (for
example, ca.crt), and potentially, a certificate revocation list (CRL) file. This
procedure varies according to the CA being used.
At this point the configuration can be modified to use these files.
Step Command
Remove the pre‐shared key. vyatta@WEST# delete vpn ipsec site‐to‐site peer 192.0.2.33
authentication pre‐shared‐secret
Change the authentication vyatta@WEST# set vpn ipsec site‐to‐site peer 192.0.2.33
mode. authentication mode x509
Specify the ‘distinguished name’ vyatta@WEST# set vpn ipsec site‐to‐site peer 192.0.2.33
of the certificate for the peer. authentication remote‐id “C=US, ST=CA, O=ABC Company,
CN=east, [email protected]”
VPN 6.5R1 v01
Vyatta