SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
Vyos Unbreable VPN
Fig: 1
The device used here is VyOS (version 1.1.7) which is a fork from Vyatta community edition. It has Juniper like
command set. The community edition lacks both the system config sync and GUI based configuration management and
are available only in subscribed editions. The other features supported by this device are DMVPN (using NHRP, mGRE,
and IPSEC) which is a Cisco propreitary technology, zone-based or interface-based firewalling, routing protocols like
RIP, OSPF, and BGP, NAT and VLANs.
The diagram (Fig: 1) helps in configuring the lab to attain IPSEC tunnel between the two sites ‘A’ and ‘B’. Both sites are
connected over public IP addresses via an ISP. Instead of BGP since this is a lab inside VirtualBox OSPF is used for
dynamic routing purposes between the sites. There are redundant firewalls used for clustering purposes in both sites.
The cluster public IP on both sides are used for building IPSEC tunnel with revertive high availability configuration.
Revertive high availability is a technique by which the secondary member in the cluster fails back to the primary once it
is available, that is failover is made false ad failback is made true. In the cluster the internal IP is monitored over
10.x.x.2/29 and internal cluster IP 10.x.x.1/29 is used. The same way the public IP is monitored over x01.1.2.4/29 and
external cluster IP x01.1.2.1/29 is used. Both these cluster IPs are used to build the IPSEC peers. Virtual interfaces (vif)
are used to create VLANs for internal and exeternal IP ranges on both sites. Either the firewall or the interface
(primary firewall) malfunctions the secondary firewall takes over and the cluster IP moves to the vif of the secondary
firewall and the IPSEC tunnel regains. Once the primary functions properly the secondary failback to the primary
making the primary responsible for the connectivity always. The cluster dead-interval has to more than twice the value
of keepalive-interval.
The management subnet is 192.168.56.x/24. SSH service is used to login to the devices. The host and domain names are
configured accordingly on all the devices.
The virtual environment is facilitated by VirtualBox (version 5.x). All devices in it has the host only interface which is
used for its management over SSH from the host device. The second interface is internal (intnet) which is used in the
device for VLAN (vif) purposes. The environment details are funished after the configuration details.
Configuration Details
Common Configuration
System/Service
set service ssh port '22'
set system config-management commit-revisions '20'
set system console device ttyS0 speed '9600'
set system login user vyos authentication encrypted-password '$1$HR42KG7n$Ynpv5D8LEnJiOZPX85Wt.1'
set system login user vyos authentication plaintext-password ''
set system login user vyos level 'admin'
set system ntp server '0.pool.ntp.org'
set system ntp server '1.pool.ntp.org'
set system ntp server '2.pool.ntp.org'
set system time-zone 'UTC'
set system package auto-sync '1'
set system package repository community components 'main'
set system package repository community distribution 'helium'
set system package repository community password ''
set system package repository community url 'http://packages.vyos.net/vyos'
set system package repository community username ''
set system syslog global facility all level 'notice'
set system syslog global facility protocols level 'debug'
IPSEC
set vpn ipsec esp-group MyESP compression 'disable'
set vpn ipsec esp-group MyESP lifetime '3600'
set vpn ipsec esp-group MyESP mode 'tunnel'
set vpn ipsec esp-group MyESP pfs 'enable'
set vpn ipsec esp-group MyESP proposal 1 encryption 'aes256'
set vpn ipsec esp-group MyESP proposal 1 hash 'sha256'
set vpn ipsec ike-group MyIKE ikev2-reauth 'no'
set vpn ipsec ike-group MyIKE key-exchange 'ikev1'
set vpn ipsec ike-group MyIKE lifetime '28800'
set vpn ipsec ike-group MyIKE proposal 1 dh-group '2'
set vpn ipsec ike-group MyIKE proposal 1 encryption 'aes256'
set vpn ipsec ike-group MyIKE proposal 1 hash 'sha256'
Cluster
set cluster dead-interval '10000'
set cluster group cluster1 auto-failback 'true'
set cluster group cluster1 service 'ipsec'
set cluster keepalive-interval '2000'
set cluster monitor-dead-interval '20000'
set cluster pre-shared-secret 'Ma2754ni'
Site A
Router 1
set interfaces ethernet eth0 address '192.168.56.111/24'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:4a:97:c7'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:9a:a2:44'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 10 address '10.1.3.2/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:78:ce:27'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:24:b3:d6'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces loopback 'lo'
set protocols static route 0.0.0.0/0 next-hop '10.1.3.1'
set service ssh listen-address '192.168.56.111'
set system domain-name 'aattu.com'
set system host-name 'rtr01'
Router 2
set interfaces dummy dum1 address '101.0.0.1/32'
set interfaces ethernet eth1 address '192.168.56.112/24'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:2e:a8:db'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:84:bc:9a'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth2 vif 101 address '101.1.2.4/29'
set interfaces ethernet eth2 vif 111 address '111.1.2.3/29'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:12:6f:7d'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces ethernet eth4 duplex 'auto'
set interfaces ethernet eth4 hw-id '08:00:27:ea:7d:c5'
set interfaces ethernet eth4 smp_affinity 'auto'
set interfaces ethernet eth4 speed 'auto'
set interfaces loopback 'lo'
set protocols ospf area 10 network '101.1.2.0/29'
set protocols ospf area 10 network '111.1.2.0/29'
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '101.0.0.1'
set service ssh listen-address '192.168.56.112'
set system domain-name 'aattu.com'
set system host-name 'rtr02'
Firewall 1
set cluster group cluster1 monitor '101.1.2.4'
set cluster group cluster1 monitor '10.1.3.2'
set cluster group cluster1 primary 'fwl01'
set cluster group cluster1 secondary 'fwl02'
set cluster group cluster1 service '10.1.3.1/29/eth1.10'
set cluster group cluster1 service '101.1.2.1/29/eth1.101'
set cluster interface 'eth1.10'
set cluster interface 'eth1.101'
set interfaces dummy dum1 address '101.0.0.2/32'
set interfaces ethernet eth0 address '192.168.56.113/24'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:3d:0d:98'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:fa:33:5f'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 10 address '10.1.3.3/29'
set interfaces ethernet eth1 vif 101 address '101.1.2.2/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:0b:08:80'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:c1:ce:b1'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces loopback 'lo'
set protocols ospf area 10 network '101.1.2.0/29'
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '101.1.2.2'
set service ssh listen-address '192.168.56.113'
set system domain-name 'aattu.com'
set system host-name 'fwl01'
set vpn ipsec ipsec-interfaces interface 'eth1.101'
set vpn ipsec site-to-site peer 201.1.2.1 authentication mode 'pre-shared-secret'
set vpn ipsec site-to-site peer 201.1.2.1 authentication pre-shared-secret 'Ma2754ni'
set vpn ipsec site-to-site peer 201.1.2.1 connection-type 'initiate'
set vpn ipsec site-to-site peer 201.1.2.1 default-esp-group 'MyESP'
set vpn ipsec site-to-site peer 201.1.2.1 ike-group 'MyIKE'
set vpn ipsec site-to-site peer 201.1.2.1 ikev2-reauth 'inherit'
set vpn ipsec site-to-site peer 201.1.2.1 local-address '101.1.2.1'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-nat-networks 'disable'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-public-networks 'disable'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 local prefix '10.1.3.0/29'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 remote prefix '10.3.4.0/29'
Firewall 2
set cluster group cluster1 monitor '10.1.3.2'
set cluster group cluster1 monitor '101.1.2.4'
set cluster group cluster1 primary 'fwl01'
set cluster group cluster1 secondary 'fwl02'
set cluster group cluster1 service '10.1.3.1/29/eth1.10'
set cluster group cluster1 service '101.1.2.1/29/eth1.101'
set cluster interface 'eth1.10'
set cluster interface 'eth1.101'
set interfaces dummy dum1 address '101.0.0.4/32'
set interfaces ethernet eth0 address '192.168.56.114/24'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:76:a9:82'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:7f:da:5c'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 10 address '10.1.3.4/29'
set interfaces ethernet eth1 vif 101 address '101.1.2.3/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:7a:75:9e'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:1b:df:6e'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces loopback 'lo'
set protocols ospf area 10 network '101.1.2.0/29'
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '101.0.0.4'
set service ssh listen-address '192.168.56.114'
set system domain-name 'aattu.com'
set system host-name 'fwl02'
set vpn ipsec ipsec-interfaces interface 'eth1.101'
set vpn ipsec site-to-site peer 201.1.2.1 authentication mode 'pre-shared-secret'
set vpn ipsec site-to-site peer 201.1.2.1 authentication pre-shared-secret 'Ma2754ni'
set vpn ipsec site-to-site peer 201.1.2.1 connection-type 'initiate'
set vpn ipsec site-to-site peer 201.1.2.1 default-esp-group 'MyESP'
set vpn ipsec site-to-site peer 201.1.2.1 ike-group 'MyIKE'
set vpn ipsec site-to-site peer 201.1.2.1 ikev2-reauth 'inherit'
set vpn ipsec site-to-site peer 201.1.2.1 local-address '101.1.2.1'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-nat-networks 'disable'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-public-networks 'disable'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 local prefix '10.1.3.0/29'
set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 remote prefix '10.3.4.0/29'
ISP01
Router 1
set interfaces dummy dum1 address '110.0.0.1/32'
set interfaces ethernet eth0 address '192.168.56.101/24'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:ff:e4:3a'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:58:6b:cc'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 111 address '111.1.2.2/29'
set interfaces ethernet eth1 vif 211 address '211.1.2.2/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:b2:fe:d5'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:4f:96:d3'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces loopback 'lo'
set protocols ospf area 0 network '110.0.0.1/32'
set protocols ospf area 10 network '111.1.2.0/29'
set protocols ospf area 10 network '211.1.2.0/29'
set service ssh listen-address '192.168.56.101'
set system domain-name 'isp01.com'
set system host-name 'rtr01'
Site B
Router 1
set interfaces ethernet eth0 address '192.168.56.221/24'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:3c:61:46'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:8b:f6:b5'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 20 address '10.3.4.2/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:58:2d:eb'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:5a:1d:dc'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces loopback 'lo'
set protocols static route 0.0.0.0/0 next-hop '10.3.4.1'
set service ssh listen-address '192.168.56.221'
set system domain-name 'abc.com'
set system host-name 'rtr01'
Router 2
set interfaces dummy dum1 address '201.0.0.1/32'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:d1:93:20'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 201 address '201.1.2.4/29'
set interfaces ethernet eth1 vif 211 address '211.1.2.3/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:f5:5a:fd'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:4f:26:39'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces ethernet eth4 address '192.168.56.222/24'
set interfaces ethernet eth4 duplex 'auto'
set interfaces ethernet eth4 hw-id '08:00:27:a7:bc:c1'
set interfaces ethernet eth4 smp_affinity 'auto'
set interfaces ethernet eth4 speed 'auto'
set interfaces loopback 'lo'
set protocols ospf area 10 network '201.1.2.0/29'
set protocols ospf area 10 network '211.1.2.0/29'
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '201.0.0.1'
set service ssh listen-address '192.168.56.222'
set system domain-name 'abc.com'
set system host-name 'rtr02'
Firewall 1
set cluster group cluster1 monitor '201.1.2.4'
set cluster group cluster1 monitor '10.3.4.2'
set cluster group cluster1 primary 'fwl01'
set cluster group cluster1 secondary 'fwl02'
set cluster group cluster1 service '10.3.4.1/29/eth1.20'
set cluster group cluster1 service '201.1.2.1/29/eth1.201'
set cluster interface 'eth1.20'
set cluster interface 'eth1.201'
set interfaces dummy dum1 address '201.0.0.2/32'
set interfaces ethernet eth0 address '192.168.56.223/24'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:99:5e:57'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:94:67:64'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 20 address '10.3.4.3/29'
set interfaces ethernet eth1 vif 201 address '201.1.2.2/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:d1:22:ce'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:79:04:f4'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces loopback 'lo'
set protocols ospf area 10 network '201.1.2.0/29'
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '201.0.0.2'
set service ssh listen-address '192.168.56.223'
set system domain-name 'abc.com'
set system host-name 'fwl01'
set vpn ipsec ipsec-interfaces interface 'eth1.201'
set vpn ipsec site-to-site peer 101.1.2.1 authentication mode 'pre-shared-secret'
set vpn ipsec site-to-site peer 101.1.2.1 authentication pre-shared-secret 'Ma2754ni'
set vpn ipsec site-to-site peer 101.1.2.1 connection-type 'initiate'
set vpn ipsec site-to-site peer 101.1.2.1 default-esp-group 'MyESP'
set vpn ipsec site-to-site peer 101.1.2.1 ike-group 'MyIKE'
set vpn ipsec site-to-site peer 101.1.2.1 ikev2-reauth 'inherit'
set vpn ipsec site-to-site peer 101.1.2.1 local-address '201.1.2.1'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-nat-networks 'disable'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-public-networks 'disable'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 local prefix '10.3.4.0/29'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 remote prefix '10.1.3.0/29'
Firewall 2
set cluster group cluster1 monitor '201.1.2.4'
set cluster group cluster1 monitor '10.3.4.2'
set cluster group cluster1 primary 'fwl01'
set cluster group cluster1 secondary 'fwl02'
set cluster group cluster1 service '10.3.4.1/29/eth1.20'
set cluster group cluster1 service '201.1.2.1/29/eth1.201'
set cluster interface 'eth1.20'
set cluster interface 'eth1.201'
set interfaces dummy dum1 address '201.0.0.3/32'
set interfaces ethernet eth0 address '192.168.56.224/24'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '08:00:27:14:70:76'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '08:00:27:06:01:2c'
set interfaces ethernet eth1 smp_affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 20 address '10.3.4.4/29'
set interfaces ethernet eth1 vif 201 address '201.1.2.3/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '08:00:27:de:60:ff'
set interfaces ethernet eth2 smp_affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth3 duplex 'auto'
set interfaces ethernet eth3 hw-id '08:00:27:1f:8e:fb'
set interfaces ethernet eth3 smp_affinity 'auto'
set interfaces ethernet eth3 speed 'auto'
set interfaces loopback 'lo'
set protocols ospf area 10 network '201.1.2.0/29'
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '201.0.0.3'
set service ssh listen-address '192.168.56.224'
set system domain-name 'abc.com'
set system host-name 'fwl02'
set vpn ipsec ipsec-interfaces interface 'eth1.201'
set vpn ipsec site-to-site peer 101.1.2.1 authentication mode 'pre-shared-secret'
set vpn ipsec site-to-site peer 101.1.2.1 authentication pre-shared-secret 'Ma2754ni'
set vpn ipsec site-to-site peer 101.1.2.1 connection-type 'initiate'
set vpn ipsec site-to-site peer 101.1.2.1 default-esp-group 'MyESP'
set vpn ipsec site-to-site peer 101.1.2.1 ike-group 'MyIKE'
set vpn ipsec site-to-site peer 101.1.2.1 ikev2-reauth 'inherit'
set vpn ipsec site-to-site peer 101.1.2.1 local-address '201.1.2.1'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-nat-networks 'disable'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-public-networks 'disable'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 local prefix '10.3.4.0/29'
set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 remote prefix '10.1.3.0/29'
Virtual Environment Details
VirtualBox Configuration
Vyos
Memory: 512 MB
Operating system: Linux 2.6, 64 bit, Debian
NIC1: Intel PRO/1000 MT Desktop (Host-Only Adapter, ‘vboxnet0’)
NIC2: el PRO/1000 MT Desktop (Internal Network, ‘intnet’)
Virutalization Parameters: VT-x/AMD-V, Nested Paging, PAE/NX, KVM Paravirtualization
Boot Order: Optical Disk, HDD
Host Configuration
Memory: 12 GB
Operating system: Ubuntu 16.04 LTS
Virtual Environment: VirtualBox 5.1.6
Disclaimer:
All of the above details in this document are only for lab environment purposes and to promote interests within the
networking/virtualization/IT Security enthusiasts. There is no intend to violate any copyrights. All the devices (host and virtual)
used here are based on the open source environment.

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Red Hat OpenStack 17 저자직강+스터디그룹_5주차
Red Hat OpenStack 17 저자직강+스터디그룹_5주차Red Hat OpenStack 17 저자직강+스터디그룹_5주차
Red Hat OpenStack 17 저자직강+스터디그룹_5주차
 
Deeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay NetworksDeeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay Networks
 
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStackMeetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStack
 
ACI Netflow 구성 가이드
ACI Netflow 구성 가이드ACI Netflow 구성 가이드
ACI Netflow 구성 가이드
 
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
 
ACI DHCP Config Guide
ACI DHCP Config GuideACI DHCP Config Guide
ACI DHCP Config Guide
 
OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27
 
CCNA CheatSheet
CCNA CheatSheetCCNA CheatSheet
CCNA CheatSheet
 
分散仮想ストレージシステム紹介
分散仮想ストレージシステム紹介分散仮想ストレージシステム紹介
分散仮想ストレージシステム紹介
 
TripleOの光と闇
TripleOの光と闇TripleOの光と闇
TripleOの光と闇
 
Configuring InterVLAN Routing on Cisco Router
Configuring InterVLAN Routing on Cisco RouterConfiguring InterVLAN Routing on Cisco Router
Configuring InterVLAN Routing on Cisco Router
 
Cisco switch commands cheat sheet
Cisco switch commands cheat sheetCisco switch commands cheat sheet
Cisco switch commands cheat sheet
 
eBPF Workshop
eBPF WorkshopeBPF Workshop
eBPF Workshop
 
Huawei S5700 Basic Configuration Command
Huawei S5700 Basic Configuration CommandHuawei S5700 Basic Configuration Command
Huawei S5700 Basic Configuration Command
 
Ccnp workbook network bulls
Ccnp workbook network bullsCcnp workbook network bulls
Ccnp workbook network bulls
 
MENOG-Segment Routing Introduction
MENOG-Segment Routing IntroductionMENOG-Segment Routing Introduction
MENOG-Segment Routing Introduction
 
CCNA Lab Guide
CCNA Lab GuideCCNA Lab Guide
CCNA Lab Guide
 
[234] toast cloud open stack sdn 전략-박성우
[234] toast cloud open stack sdn 전략-박성우[234] toast cloud open stack sdn 전략-박성우
[234] toast cloud open stack sdn 전략-박성우
 
Containerd + buildkit breakout
Containerd + buildkit breakoutContainerd + buildkit breakout
Containerd + buildkit breakout
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @Cloudflare
 

Similar a Vyos clustering ipsec

FlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLEFlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLE
Tariq Sheikh
 

Similar a Vyos clustering ipsec (20)

SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)
 
See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting
 
IPv4 over IPv6 Tunneling with IPSec [DRAFT]
IPv4 over IPv6 Tunneling with IPSec [DRAFT]IPv4 over IPv6 Tunneling with IPSec [DRAFT]
IPv4 over IPv6 Tunneling with IPSec [DRAFT]
 
Understanding Open vSwitch
Understanding Open vSwitch Understanding Open vSwitch
Understanding Open vSwitch
 
LF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and GotchasLF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and Gotchas
 
Vpn(4)
Vpn(4)Vpn(4)
Vpn(4)
 
Linux router
Linux routerLinux router
Linux router
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
 
SAS (Secure Active Switch)
SAS (Secure Active Switch)SAS (Secure Active Switch)
SAS (Secure Active Switch)
 
FlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLEFlexVPNLabHandbook-SAMPLE
FlexVPNLabHandbook-SAMPLE
 
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/StableSR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
 
Integrating Linux routing with FusionCLI™
Integrating Linux routing with FusionCLI™Integrating Linux routing with FusionCLI™
Integrating Linux routing with FusionCLI™
 
Securing the network for VMs or Containers
Securing the network for VMs or ContainersSecuring the network for VMs or Containers
Securing the network for VMs or Containers
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Important cisco-chow-commands
Important cisco-chow-commandsImportant cisco-chow-commands
Important cisco-chow-commands
 

Último

audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
lolsDocherty
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
ChloeMeadows1
 

Último (16)

I’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 ShirtI’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 Shirt
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
Premier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfPremier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdf
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
 
Development Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appsDevelopment Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of apps
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's Guide
 
Topology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdfTopology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdf
 
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
 
Reggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirts
 
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresenceCyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
 
Thank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsThank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirts
 
Statistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfStatistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdf
 

Vyos clustering ipsec

  • 1. Vyos Unbreable VPN Fig: 1 The device used here is VyOS (version 1.1.7) which is a fork from Vyatta community edition. It has Juniper like command set. The community edition lacks both the system config sync and GUI based configuration management and are available only in subscribed editions. The other features supported by this device are DMVPN (using NHRP, mGRE, and IPSEC) which is a Cisco propreitary technology, zone-based or interface-based firewalling, routing protocols like RIP, OSPF, and BGP, NAT and VLANs. The diagram (Fig: 1) helps in configuring the lab to attain IPSEC tunnel between the two sites ‘A’ and ‘B’. Both sites are connected over public IP addresses via an ISP. Instead of BGP since this is a lab inside VirtualBox OSPF is used for dynamic routing purposes between the sites. There are redundant firewalls used for clustering purposes in both sites. The cluster public IP on both sides are used for building IPSEC tunnel with revertive high availability configuration. Revertive high availability is a technique by which the secondary member in the cluster fails back to the primary once it is available, that is failover is made false ad failback is made true. In the cluster the internal IP is monitored over 10.x.x.2/29 and internal cluster IP 10.x.x.1/29 is used. The same way the public IP is monitored over x01.1.2.4/29 and external cluster IP x01.1.2.1/29 is used. Both these cluster IPs are used to build the IPSEC peers. Virtual interfaces (vif) are used to create VLANs for internal and exeternal IP ranges on both sites. Either the firewall or the interface (primary firewall) malfunctions the secondary firewall takes over and the cluster IP moves to the vif of the secondary firewall and the IPSEC tunnel regains. Once the primary functions properly the secondary failback to the primary making the primary responsible for the connectivity always. The cluster dead-interval has to more than twice the value of keepalive-interval. The management subnet is 192.168.56.x/24. SSH service is used to login to the devices. The host and domain names are configured accordingly on all the devices. The virtual environment is facilitated by VirtualBox (version 5.x). All devices in it has the host only interface which is used for its management over SSH from the host device. The second interface is internal (intnet) which is used in the device for VLAN (vif) purposes. The environment details are funished after the configuration details.
  • 2. Configuration Details Common Configuration System/Service set service ssh port '22' set system config-management commit-revisions '20' set system console device ttyS0 speed '9600' set system login user vyos authentication encrypted-password '$1$HR42KG7n$Ynpv5D8LEnJiOZPX85Wt.1' set system login user vyos authentication plaintext-password '' set system login user vyos level 'admin' set system ntp server '0.pool.ntp.org' set system ntp server '1.pool.ntp.org' set system ntp server '2.pool.ntp.org' set system time-zone 'UTC' set system package auto-sync '1' set system package repository community components 'main' set system package repository community distribution 'helium' set system package repository community password '' set system package repository community url 'http://packages.vyos.net/vyos' set system package repository community username '' set system syslog global facility all level 'notice' set system syslog global facility protocols level 'debug' IPSEC set vpn ipsec esp-group MyESP compression 'disable' set vpn ipsec esp-group MyESP lifetime '3600' set vpn ipsec esp-group MyESP mode 'tunnel' set vpn ipsec esp-group MyESP pfs 'enable' set vpn ipsec esp-group MyESP proposal 1 encryption 'aes256' set vpn ipsec esp-group MyESP proposal 1 hash 'sha256' set vpn ipsec ike-group MyIKE ikev2-reauth 'no' set vpn ipsec ike-group MyIKE key-exchange 'ikev1' set vpn ipsec ike-group MyIKE lifetime '28800' set vpn ipsec ike-group MyIKE proposal 1 dh-group '2' set vpn ipsec ike-group MyIKE proposal 1 encryption 'aes256' set vpn ipsec ike-group MyIKE proposal 1 hash 'sha256' Cluster set cluster dead-interval '10000' set cluster group cluster1 auto-failback 'true' set cluster group cluster1 service 'ipsec' set cluster keepalive-interval '2000' set cluster monitor-dead-interval '20000' set cluster pre-shared-secret 'Ma2754ni' Site A
  • 3. Router 1 set interfaces ethernet eth0 address '192.168.56.111/24' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:4a:97:c7' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:9a:a2:44' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 10 address '10.1.3.2/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:78:ce:27' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:24:b3:d6' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces loopback 'lo' set protocols static route 0.0.0.0/0 next-hop '10.1.3.1' set service ssh listen-address '192.168.56.111' set system domain-name 'aattu.com' set system host-name 'rtr01' Router 2 set interfaces dummy dum1 address '101.0.0.1/32' set interfaces ethernet eth1 address '192.168.56.112/24' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:2e:a8:db' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:84:bc:9a' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth2 vif 101 address '101.1.2.4/29' set interfaces ethernet eth2 vif 111 address '111.1.2.3/29' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:12:6f:7d' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces ethernet eth4 duplex 'auto' set interfaces ethernet eth4 hw-id '08:00:27:ea:7d:c5' set interfaces ethernet eth4 smp_affinity 'auto' set interfaces ethernet eth4 speed 'auto' set interfaces loopback 'lo' set protocols ospf area 10 network '101.1.2.0/29' set protocols ospf area 10 network '111.1.2.0/29' set protocols ospf parameters abr-type 'cisco' set protocols ospf parameters router-id '101.0.0.1' set service ssh listen-address '192.168.56.112' set system domain-name 'aattu.com'
  • 4. set system host-name 'rtr02' Firewall 1 set cluster group cluster1 monitor '101.1.2.4' set cluster group cluster1 monitor '10.1.3.2' set cluster group cluster1 primary 'fwl01' set cluster group cluster1 secondary 'fwl02' set cluster group cluster1 service '10.1.3.1/29/eth1.10' set cluster group cluster1 service '101.1.2.1/29/eth1.101' set cluster interface 'eth1.10' set cluster interface 'eth1.101' set interfaces dummy dum1 address '101.0.0.2/32' set interfaces ethernet eth0 address '192.168.56.113/24' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:3d:0d:98' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:fa:33:5f' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 10 address '10.1.3.3/29' set interfaces ethernet eth1 vif 101 address '101.1.2.2/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:0b:08:80' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:c1:ce:b1' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces loopback 'lo' set protocols ospf area 10 network '101.1.2.0/29' set protocols ospf parameters abr-type 'cisco' set protocols ospf parameters router-id '101.1.2.2' set service ssh listen-address '192.168.56.113' set system domain-name 'aattu.com' set system host-name 'fwl01' set vpn ipsec ipsec-interfaces interface 'eth1.101' set vpn ipsec site-to-site peer 201.1.2.1 authentication mode 'pre-shared-secret' set vpn ipsec site-to-site peer 201.1.2.1 authentication pre-shared-secret 'Ma2754ni' set vpn ipsec site-to-site peer 201.1.2.1 connection-type 'initiate' set vpn ipsec site-to-site peer 201.1.2.1 default-esp-group 'MyESP' set vpn ipsec site-to-site peer 201.1.2.1 ike-group 'MyIKE' set vpn ipsec site-to-site peer 201.1.2.1 ikev2-reauth 'inherit' set vpn ipsec site-to-site peer 201.1.2.1 local-address '101.1.2.1' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-nat-networks 'disable' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-public-networks 'disable' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 local prefix '10.1.3.0/29' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 remote prefix '10.3.4.0/29' Firewall 2 set cluster group cluster1 monitor '10.1.3.2' set cluster group cluster1 monitor '101.1.2.4'
  • 5. set cluster group cluster1 primary 'fwl01' set cluster group cluster1 secondary 'fwl02' set cluster group cluster1 service '10.1.3.1/29/eth1.10' set cluster group cluster1 service '101.1.2.1/29/eth1.101' set cluster interface 'eth1.10' set cluster interface 'eth1.101' set interfaces dummy dum1 address '101.0.0.4/32' set interfaces ethernet eth0 address '192.168.56.114/24' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:76:a9:82' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:7f:da:5c' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 10 address '10.1.3.4/29' set interfaces ethernet eth1 vif 101 address '101.1.2.3/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:7a:75:9e' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:1b:df:6e' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces loopback 'lo' set protocols ospf area 10 network '101.1.2.0/29' set protocols ospf parameters abr-type 'cisco' set protocols ospf parameters router-id '101.0.0.4' set service ssh listen-address '192.168.56.114' set system domain-name 'aattu.com' set system host-name 'fwl02' set vpn ipsec ipsec-interfaces interface 'eth1.101' set vpn ipsec site-to-site peer 201.1.2.1 authentication mode 'pre-shared-secret' set vpn ipsec site-to-site peer 201.1.2.1 authentication pre-shared-secret 'Ma2754ni' set vpn ipsec site-to-site peer 201.1.2.1 connection-type 'initiate' set vpn ipsec site-to-site peer 201.1.2.1 default-esp-group 'MyESP' set vpn ipsec site-to-site peer 201.1.2.1 ike-group 'MyIKE' set vpn ipsec site-to-site peer 201.1.2.1 ikev2-reauth 'inherit' set vpn ipsec site-to-site peer 201.1.2.1 local-address '101.1.2.1' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-nat-networks 'disable' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 allow-public-networks 'disable' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 local prefix '10.1.3.0/29' set vpn ipsec site-to-site peer 201.1.2.1 tunnel 101 remote prefix '10.3.4.0/29' ISP01 Router 1 set interfaces dummy dum1 address '110.0.0.1/32' set interfaces ethernet eth0 address '192.168.56.101/24' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:ff:e4:3a' set interfaces ethernet eth0 smp_affinity 'auto'
  • 6. set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:58:6b:cc' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 111 address '111.1.2.2/29' set interfaces ethernet eth1 vif 211 address '211.1.2.2/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:b2:fe:d5' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:4f:96:d3' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces loopback 'lo' set protocols ospf area 0 network '110.0.0.1/32' set protocols ospf area 10 network '111.1.2.0/29' set protocols ospf area 10 network '211.1.2.0/29' set service ssh listen-address '192.168.56.101' set system domain-name 'isp01.com' set system host-name 'rtr01' Site B Router 1 set interfaces ethernet eth0 address '192.168.56.221/24' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:3c:61:46' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:8b:f6:b5' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 20 address '10.3.4.2/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:58:2d:eb' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:5a:1d:dc' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces loopback 'lo' set protocols static route 0.0.0.0/0 next-hop '10.3.4.1' set service ssh listen-address '192.168.56.221' set system domain-name 'abc.com' set system host-name 'rtr01' Router 2 set interfaces dummy dum1 address '201.0.0.1/32'
  • 7. set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:d1:93:20' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 201 address '201.1.2.4/29' set interfaces ethernet eth1 vif 211 address '211.1.2.3/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:f5:5a:fd' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:4f:26:39' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces ethernet eth4 address '192.168.56.222/24' set interfaces ethernet eth4 duplex 'auto' set interfaces ethernet eth4 hw-id '08:00:27:a7:bc:c1' set interfaces ethernet eth4 smp_affinity 'auto' set interfaces ethernet eth4 speed 'auto' set interfaces loopback 'lo' set protocols ospf area 10 network '201.1.2.0/29' set protocols ospf area 10 network '211.1.2.0/29' set protocols ospf parameters abr-type 'cisco' set protocols ospf parameters router-id '201.0.0.1' set service ssh listen-address '192.168.56.222' set system domain-name 'abc.com' set system host-name 'rtr02' Firewall 1 set cluster group cluster1 monitor '201.1.2.4' set cluster group cluster1 monitor '10.3.4.2' set cluster group cluster1 primary 'fwl01' set cluster group cluster1 secondary 'fwl02' set cluster group cluster1 service '10.3.4.1/29/eth1.20' set cluster group cluster1 service '201.1.2.1/29/eth1.201' set cluster interface 'eth1.20' set cluster interface 'eth1.201' set interfaces dummy dum1 address '201.0.0.2/32' set interfaces ethernet eth0 address '192.168.56.223/24' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:99:5e:57' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:94:67:64' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 20 address '10.3.4.3/29' set interfaces ethernet eth1 vif 201 address '201.1.2.2/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:d1:22:ce' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:79:04:f4' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces loopback 'lo'
  • 8. set protocols ospf area 10 network '201.1.2.0/29' set protocols ospf parameters abr-type 'cisco' set protocols ospf parameters router-id '201.0.0.2' set service ssh listen-address '192.168.56.223' set system domain-name 'abc.com' set system host-name 'fwl01' set vpn ipsec ipsec-interfaces interface 'eth1.201' set vpn ipsec site-to-site peer 101.1.2.1 authentication mode 'pre-shared-secret' set vpn ipsec site-to-site peer 101.1.2.1 authentication pre-shared-secret 'Ma2754ni' set vpn ipsec site-to-site peer 101.1.2.1 connection-type 'initiate' set vpn ipsec site-to-site peer 101.1.2.1 default-esp-group 'MyESP' set vpn ipsec site-to-site peer 101.1.2.1 ike-group 'MyIKE' set vpn ipsec site-to-site peer 101.1.2.1 ikev2-reauth 'inherit' set vpn ipsec site-to-site peer 101.1.2.1 local-address '201.1.2.1' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-nat-networks 'disable' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-public-networks 'disable' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 local prefix '10.3.4.0/29' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 remote prefix '10.1.3.0/29' Firewall 2 set cluster group cluster1 monitor '201.1.2.4' set cluster group cluster1 monitor '10.3.4.2' set cluster group cluster1 primary 'fwl01' set cluster group cluster1 secondary 'fwl02' set cluster group cluster1 service '10.3.4.1/29/eth1.20' set cluster group cluster1 service '201.1.2.1/29/eth1.201' set cluster interface 'eth1.20' set cluster interface 'eth1.201' set interfaces dummy dum1 address '201.0.0.3/32' set interfaces ethernet eth0 address '192.168.56.224/24' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:14:70:76' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 duplex 'auto' set interfaces ethernet eth1 hw-id '08:00:27:06:01:2c' set interfaces ethernet eth1 smp_affinity 'auto' set interfaces ethernet eth1 speed 'auto' set interfaces ethernet eth1 vif 20 address '10.3.4.4/29' set interfaces ethernet eth1 vif 201 address '201.1.2.3/29' set interfaces ethernet eth2 duplex 'auto' set interfaces ethernet eth2 hw-id '08:00:27:de:60:ff' set interfaces ethernet eth2 smp_affinity 'auto' set interfaces ethernet eth2 speed 'auto' set interfaces ethernet eth3 duplex 'auto' set interfaces ethernet eth3 hw-id '08:00:27:1f:8e:fb' set interfaces ethernet eth3 smp_affinity 'auto' set interfaces ethernet eth3 speed 'auto' set interfaces loopback 'lo' set protocols ospf area 10 network '201.1.2.0/29' set protocols ospf parameters abr-type 'cisco' set protocols ospf parameters router-id '201.0.0.3' set service ssh listen-address '192.168.56.224'
  • 9. set system domain-name 'abc.com' set system host-name 'fwl02' set vpn ipsec ipsec-interfaces interface 'eth1.201' set vpn ipsec site-to-site peer 101.1.2.1 authentication mode 'pre-shared-secret' set vpn ipsec site-to-site peer 101.1.2.1 authentication pre-shared-secret 'Ma2754ni' set vpn ipsec site-to-site peer 101.1.2.1 connection-type 'initiate' set vpn ipsec site-to-site peer 101.1.2.1 default-esp-group 'MyESP' set vpn ipsec site-to-site peer 101.1.2.1 ike-group 'MyIKE' set vpn ipsec site-to-site peer 101.1.2.1 ikev2-reauth 'inherit' set vpn ipsec site-to-site peer 101.1.2.1 local-address '201.1.2.1' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-nat-networks 'disable' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 allow-public-networks 'disable' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 local prefix '10.3.4.0/29' set vpn ipsec site-to-site peer 101.1.2.1 tunnel 201 remote prefix '10.1.3.0/29' Virtual Environment Details VirtualBox Configuration Vyos Memory: 512 MB Operating system: Linux 2.6, 64 bit, Debian NIC1: Intel PRO/1000 MT Desktop (Host-Only Adapter, ‘vboxnet0’) NIC2: el PRO/1000 MT Desktop (Internal Network, ‘intnet’) Virutalization Parameters: VT-x/AMD-V, Nested Paging, PAE/NX, KVM Paravirtualization Boot Order: Optical Disk, HDD Host Configuration Memory: 12 GB Operating system: Ubuntu 16.04 LTS Virtual Environment: VirtualBox 5.1.6 Disclaimer: All of the above details in this document are only for lab environment purposes and to promote interests within the networking/virtualization/IT Security enthusiasts. There is no intend to violate any copyrights. All the devices (host and virtual) used here are based on the open source environment.