SlideShare a Scribd company logo
1 of 21
Download to read offline
Mise en place d’un client
VPNL2TPIPSEC sousDocker
AUTEUR : NICOLAS TRAUWAEN
Qui est ikoula ?
Création : 1998
8 000 VM en
production
Effectif : 47 employés
5 000 serveurs
physiques
2 Datacenters en
France et présence
sur 3 continents
Un peu d’histoire
Pourquoi un client VPN
dans un conteneur docker ?
 Gestion simplifiée
 Facilité de déploiement
 Le même conteneur quelque soit l’OS parent
(même Windows)
 Simplification de la configuration
(à l’image des configuration clients VPN Windows 8+ et OS X)
Comment ça marche ?
Base Ubuntu Trusty
Xl2tp
StrongSwan
Dockerfile
FROM ubuntu:trusty
MAINTAINER Joaquim Dos Santos <jdossantos@ikoula.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y curl xl2tpd supervisor libnss3-dev libnspr4-dev pkg-config libpam0g-dev
libcap-ng-dev libcap-ng-utils libselinux1-dev libcurl4-nss-dev libgmp3-dev flex bison gcc make
libunbound-dev libnss3-tools iptables strongswan lsof
COPY ipsec.conf /etc/ipsec.conf
COPY ipsec.secrets /etc/ipsec.secrets
COPY xl2tpd.conf /etc/xl2tpd/xl2tpd.conf
COPY chap-secrets /etc/ppp/chap-secrets
COPY options.xl2tpd /etc/ppp/options.xl2tpd
COPY ipsec-assist.sh /etc/init.d/ipsec-assist
COPY start_vpn.sh /usr/bin/start_vpn.sh
EXPOSE 500/udp 4500/udp 1701/udp
CMD /usr/bin/start_vpn.sh
StrongSwan
version 2.0
config setup
strictcrlpolicy=yes
uniqueids = no
conn l2tp-psk-client
authby=secret
rekey=yes
keyexchange=ikev1
keyingtries=3
ikelifetime=3600
esp=aes256-sha1,3des-sha1!
type=tunnel
left={VPN_CLIENT_IP}
leftid={VPN_CLIENT_IP}
leftprotoport=17/1701
right={VPN_REMOTE_SERVER}
rightprotoport=17/1701
auto=add
%any {VPN_REMOTE_SERVER} : PSK "{PSK}"
IPSEC.CONF
iptables --table nat --append POSTROUTING --
jump MASQUERADE
ipsec start
/usr/sbin/service xl2tpd start
echo "Launching connexion"
ipsec up {CONNEXION_NAME}
IPSEC.SECRET
IPSEC-ASSIST.SH
xl2tp
[global]
debug state = yes
debug tunnel = yes
[lac l2tp-psk-client]
lns = {VPN_REMOTE_SERVER}
refuse pap = yes
require authentication = no
name = {ACCOUNT_NAME}
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
# user server password ip
{ACCOUNT_NAME} * {PASSWORD} *
ipcp-accept-local
ipcp-accept-remote
ms-dns 8.8.8.8
ms-dns 8.8.4.4
noccp
crtscts
idle 1800
mtu 1280
mru 1280
lock
lcp-echo-failure 10
lcp-echo-interval 60
connect-delay 5000
XL2TPD.CONF OPTIONS.XL2TPD
CHAP-SECRETS
#!/bin/sh
IP_ADDRESS=`/sbin/ip -o -f inet a sh eth0 | awk '{print $4}' | cut -d "/" -f1`
: ${CONNEXION_NAME=l2tp-psk-client}
: ${VPN_REMOTE_SERVER=$VPN_SERVER_IP}
: ${PSKEY=$PSK}
: ${ACCOUNT_NAME=$USER}
: ${PASSWORD=$PASS}
sed -i "s/{VPN_CLIENT_IP}/$IP_ADDRESS/g" /etc/ipsec.conf
sed -i "s/{VPN_REMOTE_SERVER}/$VPN_REMOTE_SERVER/g" /etc/ipsec.conf /etc/ipsec.secrets
/etc/xl2tpd/xl2tpd.conf
sed -i "s/{PSK}/$PSKEY/g" /etc/ipsec.secrets
sed -i "s/{ACCOUNT_NAME}/$ACCOUNT_NAME/g" /etc/ppp/chap-secrets /etc/xl2tpd/xl2tpd.conf
sed -i "s/{PASSWORD}/$PASSWORD/g" /etc/ppp/chap-secrets
sed -i "s/{CONNEXION_NAME}/$CONNEXION_NAME/g" /etc/init.d/ipsec-assist
echo "Disabling the XL2TP auto start..."
/usr/sbin/service xl2tpd stop
update-rc.d -f xl2tpd remove
echo "Adding the new auto start..."
update-rc.d ipsec-assist defaults
echo "Starting up the VPN..."
/usr/sbin/service ipsec-assist start
echo "Done."
tail -f /dev/null
START_VPN.SH
VPN_SERVER_IP=<IPv4 of your VPN server>
PSK=<pre shared key>
USER=<USERNAME>
PASS=<PASSWORD>
VPN.ENV
Comment on l’utilise ?
--cad-add NET-ADMIN
pour manipuler iptables
/usr/bin/docker run 
--name docker-l2tp-ipsec-client

--cap-add NET_ADMIN 
-d 
--env-file ./vpn.env 
-p 500:500/udp 
-p 4500:4500/udp 
-p 1701:1701/udp 
-v /lib/modules:/lib/modules 
ikoula/docker-l2tp-ipsec-vpn
root@dev:~# docker exec -it docker-l2tp-ipsec-client ipsec status
Security Associations (1 up, 0 connecting):
l2tp-psk-client[1]: ESTABLISHED 5 minutes ago,
172.17.0.2[172.17.0.2]...10.0.100.143[10.0.100.143]
l2tp-psk-client{1}: INSTALLED, TUNNEL, ESP in UDP SPIs: cf5aab0e_i c43af68f_o
l2tp-psk-client{1}: 172.17.0.2/32[udp/l2f] === 10.0.100.143/32[udp/l2f]
Lancement du VPN
Vérification de son état
Et après…
 Réduire la taille de l’image
 Améliorer le lancement du service, pour éviter l’appel « tail –f
/dev/null »
 Joindre un script iptables pour router le trafic de l’host à travers
le tunnel VPN/
Axes d’évolution
 https://github.com/ikoula/docker-l2tp-ipsec-vpn
 https://hub.docker.com/r/ikoula/docker-l2tp-ipsec-vpn/
 https://www.ikoula-blog.com
 https://fr.ikoula.wiki/
Ressources
@ikoula ou @ikoula_EN
Ikoula Hosting Services
Ikoula
Ikoula
Gardez le contact !
AUTEUR : NICOLAS TRAUWAEN

More Related Content

What's hot

Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guidejasembo
 
OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728
OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728
OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728jieun kim
 
FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)Xavier Mertens
 
FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018Xavier Mertens
 
CKA Certified Kubernetes Administrator Notes
CKA Certified Kubernetes Administrator Notes CKA Certified Kubernetes Administrator Notes
CKA Certified Kubernetes Administrator Notes Adnan Rashid
 
Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...wensheng wei
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server13bcs0012
 
Mesos DC/OS on opensuse
Mesos DC/OS on opensuseMesos DC/OS on opensuse
Mesos DC/OS on opensuseMasayuki Igawa
 
OSSEC @ ISSA Jan 21st 2010
OSSEC @ ISSA Jan 21st 2010OSSEC @ ISSA Jan 21st 2010
OSSEC @ ISSA Jan 21st 2010wremes
 
Squid Caching for Web Content Accerlation
Squid Caching for Web Content AccerlationSquid Caching for Web Content Accerlation
Squid Caching for Web Content Accerlationrahul8590
 
How to secure nginx server using fail2ban on Centos-7
How to secure nginx server using fail2ban on Centos-7How to secure nginx server using fail2ban on Centos-7
How to secure nginx server using fail2ban on Centos-7Bhadreshsinh Gohil
 
17) 11 (may, 2003) squid master this proxy server
17) 11 (may, 2003)   squid master this proxy server17) 11 (may, 2003)   squid master this proxy server
17) 11 (may, 2003) squid master this proxy serverswarup1435
 
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA ArchitectureRed Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA ArchitectureEtsuji Nakai
 
PuppetConf 2016: Nano Server, Puppet, and DSC
PuppetConf 2016: Nano Server, Puppet, and DSCPuppetConf 2016: Nano Server, Puppet, and DSC
PuppetConf 2016: Nano Server, Puppet, and DSCMichael Smith
 
Robert collins openstack on openstack 201304162
Robert collins   openstack on openstack 201304162Robert collins   openstack on openstack 201304162
Robert collins openstack on openstack 201304162OpenStack Foundation
 

What's hot (20)

Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guide
 
OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728
OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728
OpenStack Korea 2015 상반기스터디(devops) 스크립트로 오픈스택 설치하기 20150728
 
FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)
 
Restricting unix users
Restricting unix usersRestricting unix users
Restricting unix users
 
FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018
 
Squid Server
Squid ServerSquid Server
Squid Server
 
CKA Certified Kubernetes Administrator Notes
CKA Certified Kubernetes Administrator Notes CKA Certified Kubernetes Administrator Notes
CKA Certified Kubernetes Administrator Notes
 
Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server
 
Mesos DC/OS on opensuse
Mesos DC/OS on opensuseMesos DC/OS on opensuse
Mesos DC/OS on opensuse
 
OSSEC @ ISSA Jan 21st 2010
OSSEC @ ISSA Jan 21st 2010OSSEC @ ISSA Jan 21st 2010
OSSEC @ ISSA Jan 21st 2010
 
Squid Caching for Web Content Accerlation
Squid Caching for Web Content AccerlationSquid Caching for Web Content Accerlation
Squid Caching for Web Content Accerlation
 
How to secure nginx server using fail2ban on Centos-7
How to secure nginx server using fail2ban on Centos-7How to secure nginx server using fail2ban on Centos-7
How to secure nginx server using fail2ban on Centos-7
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Freeradius edir
Freeradius edirFreeradius edir
Freeradius edir
 
17) 11 (may, 2003) squid master this proxy server
17) 11 (may, 2003)   squid master this proxy server17) 11 (may, 2003)   squid master this proxy server
17) 11 (may, 2003) squid master this proxy server
 
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA ArchitectureRed Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
 
SecurityPI - Hardening your IoT endpoints in Home.
SecurityPI - Hardening your IoT endpoints in Home. SecurityPI - Hardening your IoT endpoints in Home.
SecurityPI - Hardening your IoT endpoints in Home.
 
PuppetConf 2016: Nano Server, Puppet, and DSC
PuppetConf 2016: Nano Server, Puppet, and DSCPuppetConf 2016: Nano Server, Puppet, and DSC
PuppetConf 2016: Nano Server, Puppet, and DSC
 
Robert collins openstack on openstack 201304162
Robert collins   openstack on openstack 201304162Robert collins   openstack on openstack 201304162
Robert collins openstack on openstack 201304162
 

Similar to Présentation Ikoula au Meet-up Docker à l'école 42

Velocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackVelocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackCosimo Streppone
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_trainingvideos
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVROpenStack Korea Community
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPFIvan Babrou
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stablejuet-y
 
Automating the Network
Automating the NetworkAutomating the Network
Automating the NetworkPuppet
 
Configuring wifi in open embedded builds
Configuring wifi in open embedded buildsConfiguring wifi in open embedded builds
Configuring wifi in open embedded buildsMender.io
 
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/Stablejuet-y
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversBrent Salisbury
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksLaurent Bernaille
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopLorin Hochstein
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...
EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...
EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...Jisc
 
Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019Giorgio Bernardi
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloudNUTC, imac
 
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features雄也 日下部
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22Yuya Takei
 

Similar to Présentation Ikoula au Meet-up Docker à l'école 42 (20)

Velocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackVelocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attack
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPF
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
dotCloud and go
dotCloud and godotCloud and go
dotCloud and go
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
Automating the Network
Automating the NetworkAutomating the Network
Automating the Network
 
Configuring wifi in open embedded builds
Configuring wifi in open embedded buildsConfiguring wifi in open embedded builds
Configuring wifi in open embedded builds
 
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
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Simple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE LabSimple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE Lab
 
EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...
EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...
EAP TLS, the Rolls-Royce of extensible authentication protocol (EAP) methods ...
 
Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloud
 
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features20141102 VyOS 1.1.0 and NIFTY Cloud New Features
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22
 

More from Ikoula

Évolution de la supervision chez Ikoula
Évolution de la supervision chez IkoulaÉvolution de la supervision chez Ikoula
Évolution de la supervision chez IkoulaIkoula
 
Présentation Ansible Ikoula
Présentation Ansible IkoulaPrésentation Ansible Ikoula
Présentation Ansible IkoulaIkoula
 
Pres démo drupal_ikoula
Pres démo drupal_ikoulaPres démo drupal_ikoula
Pres démo drupal_ikoulaIkoula
 
Webinar Cloud Hybrid Toolbox
Webinar Cloud Hybrid ToolboxWebinar Cloud Hybrid Toolbox
Webinar Cloud Hybrid ToolboxIkoula
 
Webinar cloud hybrid toolbox
Webinar cloud hybrid toolboxWebinar cloud hybrid toolbox
Webinar cloud hybrid toolboxIkoula
 
Service Provider Show Case "Public Clouds"
Service Provider Show Case "Public Clouds"Service Provider Show Case "Public Clouds"
Service Provider Show Case "Public Clouds"Ikoula
 
Presentation cloud&drinks
Presentation cloud&drinksPresentation cloud&drinks
Presentation cloud&drinksIkoula
 
Catalogue Express
Catalogue Express Catalogue Express
Catalogue Express Ikoula
 
Fiche CloudStack by Ikoula
Fiche CloudStack by IkoulaFiche CloudStack by Ikoula
Fiche CloudStack by IkoulaIkoula
 
Flyer Flex Server HA
Flyer Flex Server HAFlyer Flex Server HA
Flyer Flex Server HAIkoula
 
Flyer Flex Entreprise
Flyer Flex EntrepriseFlyer Flex Entreprise
Flyer Flex EntrepriseIkoula
 
Flyer infogérance
Flyer infogéranceFlyer infogérance
Flyer infogéranceIkoula
 
Web Presence Builder
Web Presence Builder Web Presence Builder
Web Presence Builder Ikoula
 
Présentation ikoula et LSF Interactive 28 mai
Présentation ikoula et LSF Interactive 28 maiPrésentation ikoula et LSF Interactive 28 mai
Présentation ikoula et LSF Interactive 28 maiIkoula
 
Présentation CloudStack by Ikoula pour les Start-up @ La Cantine
Présentation CloudStack by Ikoula pour les Start-up @ La CantinePrésentation CloudStack by Ikoula pour les Start-up @ La Cantine
Présentation CloudStack by Ikoula pour les Start-up @ La CantineIkoula
 
CloudStack by Ikoula
CloudStack by IkoulaCloudStack by Ikoula
CloudStack by IkoulaIkoula
 
Le cloud en toute confiance
Le cloud en toute confianceLe cloud en toute confiance
Le cloud en toute confianceIkoula
 
Flex server 2011
Flex server 2011Flex server 2011
Flex server 2011Ikoula
 
Exchange 2010
Exchange 2010Exchange 2010
Exchange 2010Ikoula
 
Vm à 1€
Vm à 1€Vm à 1€
Vm à 1€Ikoula
 

More from Ikoula (20)

Évolution de la supervision chez Ikoula
Évolution de la supervision chez IkoulaÉvolution de la supervision chez Ikoula
Évolution de la supervision chez Ikoula
 
Présentation Ansible Ikoula
Présentation Ansible IkoulaPrésentation Ansible Ikoula
Présentation Ansible Ikoula
 
Pres démo drupal_ikoula
Pres démo drupal_ikoulaPres démo drupal_ikoula
Pres démo drupal_ikoula
 
Webinar Cloud Hybrid Toolbox
Webinar Cloud Hybrid ToolboxWebinar Cloud Hybrid Toolbox
Webinar Cloud Hybrid Toolbox
 
Webinar cloud hybrid toolbox
Webinar cloud hybrid toolboxWebinar cloud hybrid toolbox
Webinar cloud hybrid toolbox
 
Service Provider Show Case "Public Clouds"
Service Provider Show Case "Public Clouds"Service Provider Show Case "Public Clouds"
Service Provider Show Case "Public Clouds"
 
Presentation cloud&drinks
Presentation cloud&drinksPresentation cloud&drinks
Presentation cloud&drinks
 
Catalogue Express
Catalogue Express Catalogue Express
Catalogue Express
 
Fiche CloudStack by Ikoula
Fiche CloudStack by IkoulaFiche CloudStack by Ikoula
Fiche CloudStack by Ikoula
 
Flyer Flex Server HA
Flyer Flex Server HAFlyer Flex Server HA
Flyer Flex Server HA
 
Flyer Flex Entreprise
Flyer Flex EntrepriseFlyer Flex Entreprise
Flyer Flex Entreprise
 
Flyer infogérance
Flyer infogéranceFlyer infogérance
Flyer infogérance
 
Web Presence Builder
Web Presence Builder Web Presence Builder
Web Presence Builder
 
Présentation ikoula et LSF Interactive 28 mai
Présentation ikoula et LSF Interactive 28 maiPrésentation ikoula et LSF Interactive 28 mai
Présentation ikoula et LSF Interactive 28 mai
 
Présentation CloudStack by Ikoula pour les Start-up @ La Cantine
Présentation CloudStack by Ikoula pour les Start-up @ La CantinePrésentation CloudStack by Ikoula pour les Start-up @ La Cantine
Présentation CloudStack by Ikoula pour les Start-up @ La Cantine
 
CloudStack by Ikoula
CloudStack by IkoulaCloudStack by Ikoula
CloudStack by Ikoula
 
Le cloud en toute confiance
Le cloud en toute confianceLe cloud en toute confiance
Le cloud en toute confiance
 
Flex server 2011
Flex server 2011Flex server 2011
Flex server 2011
 
Exchange 2010
Exchange 2010Exchange 2010
Exchange 2010
 
Vm à 1€
Vm à 1€Vm à 1€
Vm à 1€
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Présentation Ikoula au Meet-up Docker à l'école 42

  • 1. Mise en place d’un client VPNL2TPIPSEC sousDocker AUTEUR : NICOLAS TRAUWAEN
  • 2. Qui est ikoula ? Création : 1998 8 000 VM en production Effectif : 47 employés 5 000 serveurs physiques 2 Datacenters en France et présence sur 3 continents
  • 4. Pourquoi un client VPN dans un conteneur docker ?
  • 5.  Gestion simplifiée  Facilité de déploiement  Le même conteneur quelque soit l’OS parent (même Windows)  Simplification de la configuration (à l’image des configuration clients VPN Windows 8+ et OS X)
  • 9. FROM ubuntu:trusty MAINTAINER Joaquim Dos Santos <jdossantos@ikoula.com> ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get upgrade -y RUN apt-get install -y curl xl2tpd supervisor libnss3-dev libnspr4-dev pkg-config libpam0g-dev libcap-ng-dev libcap-ng-utils libselinux1-dev libcurl4-nss-dev libgmp3-dev flex bison gcc make libunbound-dev libnss3-tools iptables strongswan lsof COPY ipsec.conf /etc/ipsec.conf COPY ipsec.secrets /etc/ipsec.secrets COPY xl2tpd.conf /etc/xl2tpd/xl2tpd.conf COPY chap-secrets /etc/ppp/chap-secrets COPY options.xl2tpd /etc/ppp/options.xl2tpd COPY ipsec-assist.sh /etc/init.d/ipsec-assist COPY start_vpn.sh /usr/bin/start_vpn.sh EXPOSE 500/udp 4500/udp 1701/udp CMD /usr/bin/start_vpn.sh
  • 11. version 2.0 config setup strictcrlpolicy=yes uniqueids = no conn l2tp-psk-client authby=secret rekey=yes keyexchange=ikev1 keyingtries=3 ikelifetime=3600 esp=aes256-sha1,3des-sha1! type=tunnel left={VPN_CLIENT_IP} leftid={VPN_CLIENT_IP} leftprotoport=17/1701 right={VPN_REMOTE_SERVER} rightprotoport=17/1701 auto=add %any {VPN_REMOTE_SERVER} : PSK "{PSK}" IPSEC.CONF iptables --table nat --append POSTROUTING -- jump MASQUERADE ipsec start /usr/sbin/service xl2tpd start echo "Launching connexion" ipsec up {CONNEXION_NAME} IPSEC.SECRET IPSEC-ASSIST.SH
  • 12. xl2tp
  • 13. [global] debug state = yes debug tunnel = yes [lac l2tp-psk-client] lns = {VPN_REMOTE_SERVER} refuse pap = yes require authentication = no name = {ACCOUNT_NAME} ppp debug = yes pppoptfile = /etc/ppp/options.xl2tpd length bit = yes # user server password ip {ACCOUNT_NAME} * {PASSWORD} * ipcp-accept-local ipcp-accept-remote ms-dns 8.8.8.8 ms-dns 8.8.4.4 noccp crtscts idle 1800 mtu 1280 mru 1280 lock lcp-echo-failure 10 lcp-echo-interval 60 connect-delay 5000 XL2TPD.CONF OPTIONS.XL2TPD CHAP-SECRETS
  • 14. #!/bin/sh IP_ADDRESS=`/sbin/ip -o -f inet a sh eth0 | awk '{print $4}' | cut -d "/" -f1` : ${CONNEXION_NAME=l2tp-psk-client} : ${VPN_REMOTE_SERVER=$VPN_SERVER_IP} : ${PSKEY=$PSK} : ${ACCOUNT_NAME=$USER} : ${PASSWORD=$PASS} sed -i "s/{VPN_CLIENT_IP}/$IP_ADDRESS/g" /etc/ipsec.conf sed -i "s/{VPN_REMOTE_SERVER}/$VPN_REMOTE_SERVER/g" /etc/ipsec.conf /etc/ipsec.secrets /etc/xl2tpd/xl2tpd.conf sed -i "s/{PSK}/$PSKEY/g" /etc/ipsec.secrets sed -i "s/{ACCOUNT_NAME}/$ACCOUNT_NAME/g" /etc/ppp/chap-secrets /etc/xl2tpd/xl2tpd.conf sed -i "s/{PASSWORD}/$PASSWORD/g" /etc/ppp/chap-secrets sed -i "s/{CONNEXION_NAME}/$CONNEXION_NAME/g" /etc/init.d/ipsec-assist echo "Disabling the XL2TP auto start..." /usr/sbin/service xl2tpd stop update-rc.d -f xl2tpd remove echo "Adding the new auto start..." update-rc.d ipsec-assist defaults echo "Starting up the VPN..." /usr/sbin/service ipsec-assist start echo "Done." tail -f /dev/null START_VPN.SH
  • 15. VPN_SERVER_IP=<IPv4 of your VPN server> PSK=<pre shared key> USER=<USERNAME> PASS=<PASSWORD> VPN.ENV
  • 17. --cad-add NET-ADMIN pour manipuler iptables /usr/bin/docker run --name docker-l2tp-ipsec-client --cap-add NET_ADMIN -d --env-file ./vpn.env -p 500:500/udp -p 4500:4500/udp -p 1701:1701/udp -v /lib/modules:/lib/modules ikoula/docker-l2tp-ipsec-vpn root@dev:~# docker exec -it docker-l2tp-ipsec-client ipsec status Security Associations (1 up, 0 connecting): l2tp-psk-client[1]: ESTABLISHED 5 minutes ago, 172.17.0.2[172.17.0.2]...10.0.100.143[10.0.100.143] l2tp-psk-client{1}: INSTALLED, TUNNEL, ESP in UDP SPIs: cf5aab0e_i c43af68f_o l2tp-psk-client{1}: 172.17.0.2/32[udp/l2f] === 10.0.100.143/32[udp/l2f] Lancement du VPN Vérification de son état
  • 19.  Réduire la taille de l’image  Améliorer le lancement du service, pour éviter l’appel « tail –f /dev/null »  Joindre un script iptables pour router le trafic de l’host à travers le tunnel VPN/ Axes d’évolution
  • 21. @ikoula ou @ikoula_EN Ikoula Hosting Services Ikoula Ikoula Gardez le contact ! AUTEUR : NICOLAS TRAUWAEN