Skip to content

Instantly share code, notes, and snippets.

@Shaked
Last active August 13, 2019 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shaked/4adc6a68e455e6ba589f374d63d3a489 to your computer and use it in GitHub Desktop.
Save Shaked/4adc6a68e455e6ba589f374d63d3a489 to your computer and use it in GitHub Desktop.
$ lsb_release  -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

$ dpkg -l | grep strongswan
ii  libstrongswan                       5.6.2-1ubuntu2.4                            amd64        strongSwan utility and crypto library
ii  libstrongswan-extra-plugins         5.6.2-1ubuntu2.4                            amd64        strongSwan utility and crypto library (extra plugins)
ii  libstrongswan-standard-plugins      5.6.2-1ubuntu2.4                            amd64        strongSwan utility and crypto library (standard plugins)
ii  strongswan                          5.6.2-1ubuntu2.4                            all          IPsec VPN solution metapackage
ii  strongswan-charon                   5.6.2-1ubuntu2.4                            amd64        strongSwan Internet Key Exchange daemon
ii  strongswan-libcharon                5.6.2-1ubuntu2.4                            amd64        strongSwan charon library
ii  strongswan-pki                      5.6.2-1ubuntu2.4                            amd64        strongSwan IPsec client, pki command
ii  strongswan-starter                  5.6.2-1ubuntu2.4                            amd64        strongSwan daemon starter and configuration file parser
ii  strongswan-swanctl                  5.6.2-1ubuntu2.4                            amd64        strongSwan IPsec client, swanctl command
ii  strongswan-tnc-base                 5.6.2-1ubuntu2.4                            amd64        strongSwan Trusted Network Connect's (TNC) - base files
## Version 1
$ sudo cat /etc/ipsec.conf
conn azure
keyexchange=ikev2
type=tunnel
leftfirewall=yes
left=%any
leftauth=eap-tls
leftid=%client # use the DNS alternative name prefixed with the %
right=azuregateway-UUID.vpn.azure.com
rightid=%azuregateway-UUID.vpn.azure.com
rightsubnet=192.168.1.0/24
leftsourceip=%config
auto=route #start=automaticalliy on boot, add=manually use ipsec up azure
dpdaction=clear
dpddelay=60s
dpdtimeout=300s
ikelifetime=24h
lifetime=1h
## Version 2
$ sudo cat /etc/ipsec.conf
conn azure
keyexchange=ikev2
type=tunnel
leftfirewall=yes
left=%any
leftauth=eap-tls
leftid=%client # use the DNS alternative name prefixed with the %
right=azuregateway-UUID.vpn.azure.com
rightid=%azuregateway-UUID.vpn.azure.com
rightsubnet=192.168.1.0/24
leftsourceip=%config
auto=start #start=automaticalliy on boot, add=manually use ipsec up azure
dpdaction=restart
dpddelay=60s
dpdtimeout=300s
ikelifetime=24h
lifetime=1h
## Version 3
$ sudo cat /etc/ipsec.conf
conn azure
keyexchange=ikev2
type=tunnel
leftfirewall=yes
left=%any
leftauth=eap-tls
leftid=%client # use the DNS alternative name prefixed with the %
right=azuregateway-UUID.vpn.azure.com
rightid=%azuregateway-UUID.vpn.azure.com
rightsubnet=192.168.1.0/24
leftsourceip=%config
auto=start #start=automaticalliy on boot, add=manually use ipsec up azure
dpdaction=restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment