SlideShare uma empresa Scribd logo
1 de 6
Baixar para ler offline
Layer 3 IPSEC-VPN Manual
1. Introdaction
IPSec is a network protocol used in creating secure network connection known as
VPN (Virtual Private Network). IPSEC-VPN uses a family of protocols that
provide authentication, key exchange, and encryption. Authentication protocol
supports various ways that facilitate the usage of PSK (Pre-Shared Key), X.509
Certificates, Encrypted Tokens, and Smart Cards.
Key exchange protocol is known as IKE (Internet Key Exchange), IKE is
implemented in its two published updated versions IKE-v1, and IKE-v2). there are
many softwares provide IPSec protocol like Strongswan and Openswan, in this
tutorial used Strongswan, and apply three methods of authentication with IKE v2,
and using XCA software for creating certificates and keys.
2. Requirements
2.1. Software
a) Strongswan
b) XCA
2.2. Hardware
a) Feitian ePass 2003 Token
3. Step Strongswan on Ubuntu 12.04
#apt-get update
#apt-get install curl
#apt-get build-dep strongswan
Get last version of Strongswan from http://www.strongswan.org/download.html
Uncompressed it using
#tar -xvzf strongswan-5.x.x.tar.gz or
#tar -xvjf strongswan-5.x.x.tar.bz2
#./configure --prefix=/usr --sysconfdir=/etc --enable-curl --enable-pkcs11
--enable-openssl --enable-gcrypt
#make
#make install
4. Configure Strongswan
all configuration in 3 files ipsec.conf, ipsec.secrets, strongswan.conf at /etc/
ipsec.secrets we must create it
#touch /etc/ipsec.secrets
There are 3 scenarios
1- PSK Pre-shared Key
2- Using Certificates
3- Using Tokens
in all scenarios
left node, user1, node1 ip =192.168.0.1
right node, user2, node2 ip =192.168.0.2
First you should read CA Tutorial First before Certificates and Tokens scenarios
configuration
4.1. PSK Pre-shared Key
ipsec.conf should by like
config setup
charondebug=[4]
strictcrlpolicy=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn host-host  connection name
left=192.168.0.1  this PC ip address
leftsubnet=192.168.0.0/24
leftid=192.168.0.2
leftfirewall=yes
right=192.168.0.2  other PC ip address
rightsubnet=192.168.0.0/24
rightid=192.168.0.2
authby=psk
auto=add
ipsec.secrets should by like
left node ip : PSK “{key as plain text}”
Ex: 192.168.0.1 : PSK "12345"
strongswan.conf won't change
4.2. Using Certificates
Put Root CA Public key in /etc/ipsec.d/cacert
user public key in /etc/ipsec.d/certs
user private key in /etc/ipsec.d/private
ipsec.conf should by like
config setup
charondebug=[4]
strictcrlpolicy=no
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn host-host  connection name
left=192.168.0.1  this PC ip address
leftid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user1,
E=user1@iwf.com"
leftcert=user1Cert.der  user public key certificate file
leftfirewall=yes
right=192.168.0.2  other PC ip address
rightid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user2,
E=user2@iwf.com"
auto=add
ipsec.secrets should by like
left-node-CN right-node-CN : key_generation_algorithm user_Private_keyfile.der
Ex: user1 user2: RSA user1Key.der
strongswan.conf won't change
4.3. Using Tokens
ipsec.conf should by like
config setup
strictcrlpolicy=no
charondebug=4
conn %default
ikelifetime=60m
keylife=20m
rekeymargin=3m
keyingtries=1
keyexchange=ikev2
conn host-host  connection name
left=192.168.0.1  this PC ip address
leftid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user1,
E=user1@iwf.com"
leftcert=%smartcard:00
leftfirewall=yes
right=192.168.0.2  other PC ip address
rightid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user2,
E=user2@iwf.mil"
auto=add
ipsec.secrets should by like
: PIN %smartcard: {user key on token id from command pkcs15-tool -k} “{ Token
PIN}”
Ex: : PIN %smartcard:ddc2b4e4d299a72972fbff880847b21e94860310 "12345678"
strongswan.conf we will add red lines inside libstrongswan{} block
libstrongswan {
# set to no, the DH exponent size is optimized
# dh_exponent_ansi_x9_42 = no
plugins {
pkcs11 {
modules {
my-xy-module {
path = /usr/lib/opensc-pkcs11.so
}
}
}
}
}
5. Test Connection
Start VPN service
#ipsec start
using this command to up your connection
#ipsec up {connection name}
#ipsec up host-host
using this command to get status of connection
#ipsec statusall
Finish
Good Luck 
Abdallah Abuouf
http://abuouf.me

Mais conteúdo relacionado

Mais procurados (20)

IPsec
IPsecIPsec
IPsec
 
Ipsec
IpsecIpsec
Ipsec
 
ip security
ip securityip security
ip security
 
IPSec | Computer Network
IPSec | Computer NetworkIPSec | Computer Network
IPSec | Computer Network
 
I psec
I psecI psec
I psec
 
Ipsec 2
Ipsec 2Ipsec 2
Ipsec 2
 
IP Security in Network Security NS6
IP Security in Network Security NS6IP Security in Network Security NS6
IP Security in Network Security NS6
 
IP Security
IP SecurityIP Security
IP Security
 
Ip security
Ip security Ip security
Ip security
 
Overview of ip_security by JetArvind kumar Madhukar
Overview of ip_security by JetArvind kumar Madhukar Overview of ip_security by JetArvind kumar Madhukar
Overview of ip_security by JetArvind kumar Madhukar
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and ssl
 
Ip sec talk
Ip sec talkIp sec talk
Ip sec talk
 
IPSec Overview
IPSec OverviewIPSec Overview
IPSec Overview
 
Ip security
Ip securityIp security
Ip security
 
IP Security
IP SecurityIP Security
IP Security
 
IP security
IP securityIP security
IP security
 
Ip security
Ip security Ip security
Ip security
 
IP security Part 1
IP security   Part 1IP security   Part 1
IP security Part 1
 
Ipsecurity
IpsecurityIpsecurity
Ipsecurity
 
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERSSITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS
 

Destaque

Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)Vanitha Joshi
 
Crypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configurationCrypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configurationdborsan
 
Sample network engineer resume
Sample network engineer resumeSample network engineer resume
Sample network engineer resumeAmbuj Rai
 
Top 8 senior network engineer resume samples
Top 8 senior network engineer resume samplesTop 8 senior network engineer resume samples
Top 8 senior network engineer resume samplesgedihutes
 

Destaque (6)

Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
 
Crypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configurationCrypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configuration
 
Zigbee
ZigbeeZigbee
Zigbee
 
IPv6 theoryfinalx
IPv6 theoryfinalxIPv6 theoryfinalx
IPv6 theoryfinalx
 
Sample network engineer resume
Sample network engineer resumeSample network engineer resume
Sample network engineer resume
 
Top 8 senior network engineer resume samples
Top 8 senior network engineer resume samplesTop 8 senior network engineer resume samples
Top 8 senior network engineer resume samples
 

Semelhante a IPSec VPN Tutorial Part1

Shutdown that bastion host!
Shutdown that bastion host!Shutdown that bastion host!
Shutdown that bastion host!MichaelLudvig
 
cryptography.pptx
cryptography.pptxcryptography.pptx
cryptography.pptxMvidhya9
 
Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Max Kleiner
 
Server hardening
Server hardeningServer hardening
Server hardeningTeja Babu
 
5.3.1.2 packet tracer skills integration challenge instructions
5.3.1.2 packet tracer   skills integration challenge instructions5.3.1.2 packet tracer   skills integration challenge instructions
5.3.1.2 packet tracer skills integration challenge instructionsJose Luis Heredia
 
RAVPN EAP-IKEv2 VPN.pptx
RAVPN EAP-IKEv2 VPN.pptxRAVPN EAP-IKEv2 VPN.pptx
RAVPN EAP-IKEv2 VPN.pptxDhruv Sharma
 
Shutdown agent for_v_mware_esx
Shutdown agent for_v_mware_esxShutdown agent for_v_mware_esx
Shutdown agent for_v_mware_esxmoy725
 
Strongswan ipsec vpn_linux_strongswan_ip
Strongswan ipsec vpn_linux_strongswan_ipStrongswan ipsec vpn_linux_strongswan_ip
Strongswan ipsec vpn_linux_strongswan_ipHary HarysMatta
 
Securing the tunnel with Raccoon
Securing the tunnel with RaccoonSecuring the tunnel with Raccoon
Securing the tunnel with RaccoonGloria Stoilova
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsSlawomir Jasek
 
Building basic public key infrastucture (PKI)
Building basic public key infrastucture (PKI)Building basic public key infrastucture (PKI)
Building basic public key infrastucture (PKI)Ismail Rachdaoui
 
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform EnviornmentNagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform EnviornmentNagios
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Netwax Lab
 
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCPKonfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCPWalid Umar
 

Semelhante a IPSec VPN Tutorial Part1 (20)

Shutdown that bastion host!
Shutdown that bastion host!Shutdown that bastion host!
Shutdown that bastion host!
 
Vyos clustering ipsec
Vyos clustering ipsecVyos clustering ipsec
Vyos clustering ipsec
 
cryptography.pptx
cryptography.pptxcryptography.pptx
cryptography.pptx
 
Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21
 
RemoteAdmin.pptx
RemoteAdmin.pptxRemoteAdmin.pptx
RemoteAdmin.pptx
 
Server hardening
Server hardeningServer hardening
Server hardening
 
VPN presentation - moeshesh
VPN presentation - moesheshVPN presentation - moeshesh
VPN presentation - moeshesh
 
5.3.1.2 packet tracer skills integration challenge instructions
5.3.1.2 packet tracer   skills integration challenge instructions5.3.1.2 packet tracer   skills integration challenge instructions
5.3.1.2 packet tracer skills integration challenge instructions
 
RAVPN EAP-IKEv2 VPN.pptx
RAVPN EAP-IKEv2 VPN.pptxRAVPN EAP-IKEv2 VPN.pptx
RAVPN EAP-IKEv2 VPN.pptx
 
Lan to lan vpn
Lan to lan vpnLan to lan vpn
Lan to lan vpn
 
Shutdown agent for_v_mware_esx
Shutdown agent for_v_mware_esxShutdown agent for_v_mware_esx
Shutdown agent for_v_mware_esx
 
Strongswan ipsec vpn_linux_strongswan_ip
Strongswan ipsec vpn_linux_strongswan_ipStrongswan ipsec vpn_linux_strongswan_ip
Strongswan ipsec vpn_linux_strongswan_ip
 
Securing the tunnel with Raccoon
Securing the tunnel with RaccoonSecuring the tunnel with Raccoon
Securing the tunnel with Raccoon
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocols
 
Building basic public key infrastucture (PKI)
Building basic public key infrastucture (PKI)Building basic public key infrastucture (PKI)
Building basic public key infrastucture (PKI)
 
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform EnviornmentNagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)
 
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCPKonfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
 
InSpec Keynote at ChefConf
InSpec Keynote at ChefConfInSpec Keynote at ChefConf
InSpec Keynote at ChefConf
 
Netmiko library
Netmiko libraryNetmiko library
Netmiko library
 

Último

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 

Último (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 

IPSec VPN Tutorial Part1

  • 1. Layer 3 IPSEC-VPN Manual 1. Introdaction IPSec is a network protocol used in creating secure network connection known as VPN (Virtual Private Network). IPSEC-VPN uses a family of protocols that provide authentication, key exchange, and encryption. Authentication protocol supports various ways that facilitate the usage of PSK (Pre-Shared Key), X.509 Certificates, Encrypted Tokens, and Smart Cards. Key exchange protocol is known as IKE (Internet Key Exchange), IKE is implemented in its two published updated versions IKE-v1, and IKE-v2). there are many softwares provide IPSec protocol like Strongswan and Openswan, in this tutorial used Strongswan, and apply three methods of authentication with IKE v2, and using XCA software for creating certificates and keys. 2. Requirements 2.1. Software a) Strongswan b) XCA 2.2. Hardware a) Feitian ePass 2003 Token
  • 2. 3. Step Strongswan on Ubuntu 12.04 #apt-get update #apt-get install curl #apt-get build-dep strongswan Get last version of Strongswan from http://www.strongswan.org/download.html Uncompressed it using #tar -xvzf strongswan-5.x.x.tar.gz or #tar -xvjf strongswan-5.x.x.tar.bz2 #./configure --prefix=/usr --sysconfdir=/etc --enable-curl --enable-pkcs11 --enable-openssl --enable-gcrypt #make #make install 4. Configure Strongswan all configuration in 3 files ipsec.conf, ipsec.secrets, strongswan.conf at /etc/ ipsec.secrets we must create it #touch /etc/ipsec.secrets There are 3 scenarios 1- PSK Pre-shared Key 2- Using Certificates 3- Using Tokens in all scenarios left node, user1, node1 ip =192.168.0.1 right node, user2, node2 ip =192.168.0.2 First you should read CA Tutorial First before Certificates and Tokens scenarios configuration
  • 3. 4.1. PSK Pre-shared Key ipsec.conf should by like config setup charondebug=[4] strictcrlpolicy=no conn %default ikelifetime=60m keylife=20m rekeymargin=3m keyingtries=1 keyexchange=ikev2 conn host-host  connection name left=192.168.0.1  this PC ip address leftsubnet=192.168.0.0/24 leftid=192.168.0.2 leftfirewall=yes right=192.168.0.2  other PC ip address rightsubnet=192.168.0.0/24 rightid=192.168.0.2 authby=psk auto=add ipsec.secrets should by like left node ip : PSK “{key as plain text}” Ex: 192.168.0.1 : PSK "12345" strongswan.conf won't change
  • 4. 4.2. Using Certificates Put Root CA Public key in /etc/ipsec.d/cacert user public key in /etc/ipsec.d/certs user private key in /etc/ipsec.d/private ipsec.conf should by like config setup charondebug=[4] strictcrlpolicy=no conn %default ikelifetime=60m keylife=20m rekeymargin=3m keyingtries=1 keyexchange=ikev2 conn host-host  connection name left=192.168.0.1  this PC ip address leftid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user1, E=user1@iwf.com" leftcert=user1Cert.der  user public key certificate file leftfirewall=yes right=192.168.0.2  other PC ip address rightid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user2, E=user2@iwf.com" auto=add ipsec.secrets should by like left-node-CN right-node-CN : key_generation_algorithm user_Private_keyfile.der Ex: user1 user2: RSA user1Key.der strongswan.conf won't change
  • 5. 4.3. Using Tokens ipsec.conf should by like config setup strictcrlpolicy=no charondebug=4 conn %default ikelifetime=60m keylife=20m rekeymargin=3m keyingtries=1 keyexchange=ikev2 conn host-host  connection name left=192.168.0.1  this PC ip address leftid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user1, E=user1@iwf.com" leftcert=%smartcard:00 leftfirewall=yes right=192.168.0.2  other PC ip address rightid="C=eg, ST=Cairo, L=Cairo, O=IWF, OU=IWF_OU, CN=user2, E=user2@iwf.mil" auto=add ipsec.secrets should by like : PIN %smartcard: {user key on token id from command pkcs15-tool -k} “{ Token PIN}” Ex: : PIN %smartcard:ddc2b4e4d299a72972fbff880847b21e94860310 "12345678"
  • 6. strongswan.conf we will add red lines inside libstrongswan{} block libstrongswan { # set to no, the DH exponent size is optimized # dh_exponent_ansi_x9_42 = no plugins { pkcs11 { modules { my-xy-module { path = /usr/lib/opensc-pkcs11.so } } } } } 5. Test Connection Start VPN service #ipsec start using this command to up your connection #ipsec up {connection name} #ipsec up host-host using this command to get status of connection #ipsec statusall Finish Good Luck  Abdallah Abuouf http://abuouf.me