Step by Step Configure Router Vyata 6.5.59
Step by Step Configure Router Vyata 6.5.59
NOTE You must make sure that, between the remote client and the VPN server, nothing is
blocking packets with protocol GRE or TCP port 1723. (Check firewall settings, home gateway,
DSL modem, ISP, and so on.)
Step Command
vyatta@R1# set vpn ipsec ipsec‐interfaces interface
Define the interface used for wan1
IPsec; in this case, wan1.
Enable NAT traversal. This is vyatta@R1# set vpn ipsec nat‐traversal enable
mandatory.
Set the allowed subnet. vyatta@R1# set vpn ipsec nat‐networks allowed‐network
192.168.100.0/24
Bind the L2TP server to the vyatta@R1# set vpn l2tp remote‐access outside‐address
external address. 12.34.56.78
Set the nexthop address. vyatta@R1# set vpn l2tp remote‐access outside‐nexthop
12.34.56.254
vyatta@R1# set vpn l2tp remote‐access client‐ip‐pool
Set up the pool of IP addresses start
that remote VPN connections 192.168.100.101
vyatta@R1# set vpn l2tp remote‐access client‐ip‐pool
will assume. In this case we stop
make 10 addresses available 192.168.100.110
(from .101 to .110) on subnet
192.168.100.0/24. Note that we
do not use the subnet on the
LAN.
Set the pre‐shared secret. vyatta@R1# set vpn l2tp remote‐access ipsec‐settings
authentication pre‐shared‐secret !secrettext!
vyatta@R1# set vpn l2tp remote‐access authentication
Set the L2TP remote access mode
authentication mode to local. local
Set theL2TP remote access vyatta@R1# set vpn l2tp remote‐access authentication
username and password. local‐users username testuser password testpassword
Show the l2tp remote access vyatta@R1# show vpn l2tp remote‐access
configuration. authentication {
local‐users {
username testuser {
password testpassword
}
}
mode local
}
client‐ip‐pool {
start 192.168.100.101
stop 192.168.100.110
}
ipsec‐settings {
authentication {
mode pre‐shared‐secret
pre‐shared‐secret !secrettext!
}
}
outside‐address 12.34.56.78
outside‐nexthop 12.34.56.254
The next step is to configure the L2TP/IPsec VPN client on a Windows XP SP2
system (the remote user in the example). You can use the Windows “New
Connection Wizard” as follows.
1 Select Start > Control Panel > Network Connections.
2 Click “Create a new connection”. The New Connection Wizard launches. Click
Next.
3 Select “Connect to the network at my workplace”. Click Next.
4 Select “Virtual Private Network connection”. Click Next.
5 Enter a name for the connection; for example “Vyatta-L2TP.” Click Next.
NOTE If the CA can combine the windows.crt and windows.key files and export a PKCS #12 file
(for example, windows.p12), it will save a step later on.
Once the X.509-related files have been generated or acquired, the next step is to
configure R1 as an L2TP/IPsec–based VPN server.
Step Command
vyatta@R1# set vpn ipsec ipsec‐interfaces interface
Define the interface used for wan1
IPsec; in this case, wan1.
Enable NAT traversal. This is vyatta@R1# set vpn ipsec nat‐traversal enable
mandatory.
Set the allowed subnet. vyatta@R1# set vpn ipsec nat‐networks allowed‐network
192.168.100.0/24
Bind the L2TP server to the vyatta@R1# set vpn l2tp remote‐access outside‐address
external address. 12.34.56.78
Set the nexthop address. vyatta@R1# set vpn l2tp remote‐access outside‐nexthop
12.34.56.254
vyatta@R1# set vpn l2tp remote‐access client‐ip‐pool
Set up the pool of IP addresses start
that remote VPN connections 192.168.100.101
vyatta@R1# set vpn l2tp remote‐access client‐ip‐pool
will assume. In this case we stop
make 10 addresses available 192.168.100.110
(from .101 to .110) on subnet
192.168.100.0/24. Note that we
do not use the subnet on the
LAN.
Set the IPsec authentication vyatta@R1# set vpn l2tp remote‐access ipsec‐settings
mode to x509. authentication mode x509
Specify the location of the CA vyatta@R1# set vpn l2tp remote‐access ipsec‐settings
certificate. authentication x509 ca‐cert‐file /config/auth/ca.crt
Specify the location of the vyatta@R1# set vpn l2tp remote‐access ipsec‐settings
server key file. authentication x509 server‐key‐file /config/auth/R1.key
Specify the password for the vyatta@R1# set vpn l2tp remote‐access ipsec‐settings
server key file. authentication x509 server‐key‐password testpwd‐R1
vyatta@R1# set vpn l2tp remote‐access authentication
Set the L2TP remote access mode
authentication mode to local. local
Set theL2TP remote access vyatta@R1# set vpn l2tp remote‐access authentication
username and password. local‐users username testuser password testpassword
Show the l2tp remote access vyatta@R1# show vpn l2tp remote‐access
configuration. authentication {
local‐users {
username testuser {
password testpassword
}
}
mode local
}
client‐ip‐pool {
start 192.168.100.101
stop 192.168.100.110
}
ipsec‐settings {
authentication {
mode x509
x509 {
ca‐cert‐file /config/auth/ca.crt
server‐cert‐file /config/auth/R1.crt
server‐key‐file /config/auth/R1.key
server‐key‐password testpwd‐R1
}
}
}
outside‐address 12.34.56.78
outside‐nexthop 12.34.56.254
VPN 6.5R1 v01 Vyatta