How to Configure a Site-To-Site IPsec VPN to the Amazon AWS VPN Gateway
If you are using the Amazon Virtual Private Cloud, you can transparently extend your local network to the cloud by connecting both networks with a site-to-site IPsec VPN tunnel. The Amazon virtual private gateway uses static routing and two parallel IPsec tunnels, of which only one tunnel is used when connecting with the Linux system.
root#sudo yum install openswan
root#sudo vi /etc/ipsec.conf
# /etc/ipsec.conf - Openswan IPsec configuration file
#
# Manual: ipsec.conf.5
#
# Please place your own config files in /etc/ipsec.d/ ending in .conf
version 2.0 # conforms to second version of ipsec.conf specification
# basic configuration
config setup
# Debug-logging controls: "none" for (almost) none, "all" for lots.
# klipsdebug=none
# plutodebug="control parsing"
# For Red Hat Enterprise Linux and Fedora, leave protostack=netkey
protostack=netkey
nat_traversal=yes
virtual_private=
oe=off
# Enable this if you see "failed to find any available worker"
# nhelpers=0
#You may put your configuration (.conf) file in the "/etc/ipsec.d/" and uncomment this.
include /etc/ipsec.d/*.conf
root#sudo vi /etc/ipsec.d/vpc1-to-vpc2.conf
conn vpc-to-asa
type=tunnel
authby=secret
left=%defaultroute
leftid=54.173.90.212 <Site A Public IP address>
leftnexthop=%defaultroute
leftsubnet=192.168.100.0/24 <Site A Private subnet>
right=52.74.103.204 <Site B Public IP address>
rightsubnet=200.3.2.0/24 <Site B Private subnet>
esp=aes192-sha1
keyexchange=ike
ike=aes192-sha1
salifetime=43200s
pfs=yes
auto=start
dpdaction=restart
root#sudo vi /etc/ipsec.d/vpc1-to-vpc2.secrets
54.173.90.212 52.74.103.204: PSK "q1w2e3r4t5y6u7i8o9p0zaxscdvfbgnh"
Ref: <Site A Public IP address> <Site B Public IP address>: PSK "Put a Preshared Key here!!"
root#sudo service ipsec start
root#sudo chkconfig ipsec on
root#sudo vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
root#sudo service network restart
[root@ip-192-168-100-248 ~]# ping 200.3.2.221
PING 200.3.2.221 (200.3.2.221) 56(84) bytes of data.
64 bytes from 200.3.2.221: icmp_seq=1 ttl=64 time=230 ms
64 bytes from 200.3.2.221: icmp_seq=2 ttl=64 time=231 ms
64 bytes from 200.3.2.221: icmp_seq=3 ttl=64 time=231 ms
Site -B (Customer Side or Office end VPC)
root#sudo yum install openswan
root#sudo vi /etc/ipsec.conf
# /etc/ipsec.conf - Openswan IPsec configuration file
#
# Manual: ipsec.conf.5
#
# Please place your own config files in /etc/ipsec.d/ ending in .conf
version 2.0 # conforms to second version of ipsec.conf specification
# basic configuration
config setup
# Debug-logging controls: "none" for (almost) none, "all" for lots.
# klipsdebug=none
# plutodebug="control parsing"
# For Red Hat Enterprise Linux and Fedora, leave protostack=netkey
protostack=netkey
nat_traversal=yes
virtual_private=
oe=off
# Enable this if you see "failed to find any available worker"
# nhelpers=0
#You may put your configuration (.conf) file in the "/etc/ipsec.d/" and uncomment this.
include /etc/ipsec.d/*.conf
root#sudo vi /etc/ipsec.d/vpc1-to-vpc2.conf
conn vpc-to-asa
type=tunnel
authby=secret
left=%defaultroute
leftid=52.74.103.204 <Site B Public IP address>
leftnexthop=%defaultroute
leftsubnet=200.3.2.0/24 <Site B Private subnet>
right=54.173.90.212 <Site A Public IP address>
rightsubnet=192.168.100.0/24 <Site A Private subnet>
esp=aes192-sha1
keyexchange=ike
ike=aes192-sha1
salifetime=43200s
pfs=yes
auto=start
dpdaction=restart
root#sudo vi /etc/ipsec.d/vpc1-to-vpc2.secrets
52.74.103.204 54.173.90.212: PSK "q1w2e3r4t5y6u7i8o9p0zaxscdvfbgnh"
Ref: <Site A Public IP address> <Site B Public IP address>: PSK "Put a Preshared Key here!!"
root#sudo service ipsec start
root#sudo chkconfig ipsec on
192.168.100.248) 56(84) bytes of data.
64 bytes from 192.168.100.248: icmp_seq=1 ttl=64 time=231 ms
64 bytes from 192.168.100.248: icmp_seq=2 ttl=64 time=231 ms
64 bytes from 192.168.100.248: icmp_seq=3 ttl=64 time=231 ms
Reference:-
https://aws.amazon.com/articles/8800869755706543
http://houseoflinux.com/vpn/vpn-site-to-site-openswan-x-asa-cisco/page-2
https://techlib.barracuda.com/bfw/configamazonvpngateway
http://houseoflinux.com/vpn/vpn-site-to-site-openswan-x-asa-cisco/page-2
https://techlib.barracuda.com/bfw/configamazonvpngateway
This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. vpn reviews
ReplyDeleteThanks Lesnar :)
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. vpn services
ReplyDeleteThanks a lot for valuable feedback.
DeleteOnline entertainment is not just fun but also profitable. great roulette online game The best online casinos at your service.
ReplyDeleteI have been searching for this blog for a long time and by now I am able to get it to read. Keep sharing more.
ReplyDeleteEnglish Courses in Chennai
English Coaching Center in Chennai
Spoken English Institutes in Chennai
Chennai Spoken English Class
Spoken English Center in Chennai
Spoken English Institute in Chennai
Spoken English Training in Chennai
Lots of information within a single blog.thats really fantastic job.Keep sharing more valuable posts.
ReplyDeleteoneplus mobile service center in chennai
oneplus mobile service center
oneplus mobile service centre in chennai
oneplus mobile service centre
oneplus service center near me
english to marathi typing
ReplyDeleteAwesome Blog and informative content...Waiting for next upddate...
ReplyDeleteDrupal Training in Chennai
Drupal Certification Training
Drupal Course in Chennai
drupal training in Thiruvanmiyur
Drupal Training in OMR
Photoshop Classes in Chennai
clinical sas training in chennai
SAS Training in Chennai
javascript training in chennai
Hibernate Training in Chennai
This comment has been removed by the author.
ReplyDeleteHi, thank you very much for new information , i learned something new. Very well written. It was so good to read and usefull to improve knowledge. Keep posting. If you are looking for any python related information please visit our website
ReplyDeletepython training in bangalore
ReplyDeleteThanks for sharing this unique information with us.Keep update like this.
DevOps Training in Velachery
DevOps Training in Anna Nagar
DevOps Training in Tambaram
DevOps Training in T Nagar
DevOps Training in Vadapalani
DevOps Training in Adyar
DevOps Training in OMR
DevOps Training in Thiruvanmiyur
DevOps Training in Porur
Thanks for sharing such a nice info.I hope you will share more information like this. please keep on sharing!
ReplyDeleteRPA Training in Chennai
RPA Training in Chennai
RPA Training in Bangalore
Robotics Classes in Coimbatore
Robotics Courses in Coimbatore
Robotics Courses in Bangalore
RPA Classes in Chennai
Yeni Perde Modelleri
ReplyDeleteSMS ONAY
türk telekom mobil ödeme bozdurma
Nft nasıl alinir
ANKARA EVDEN EVE NAKLİYAT
Trafik Sigortasi
DEDEKTOR
Web site kurma
aşk romanları