skgm BIT Basics Cloud,BIT Basics Linux AWS VPC mittels Strongswan anbinden

AWS VPC mittels Strongswan anbinden

Die rechte Seite ist in diesem Fall AWS.
IP Adressen und Keys sind frei erfunden. AWS wirft die passenden Daten bei der Config des VPC Gateways aus.

cat /etc/ipsec.conf
conn vpc
       mobike=no
       type=tunnel
       compress=no
       keyexchange=ikev1
       ike=aes128-sha1-modp1024!
       ikelifetime=28800s
       esp=aes128-sha1-modp1024!
       lifetime=3600s
       rekeymargin=3m
       keyingtries=%forever
       installpolicy=yes
       dpdaction=restart
       authby=psk
       left=%defaultroute
       leftid=92.130.68.245
       closeaction=restart

conn vpc1
       also=vpc
       auto=start
       right=18.185.150.247
       leftsubnet=10.143.200.0/24
       rightsubnet=10.143.32.0/24

conn vpc1a
       also=vpc
       auto=start
       right=35.156.204.66
       leftsubnet=10.143.200.0/24
       rightsubnet=10.143.32.0/24

Die folgende Datei nicht vergessen, sonst klappt die Verbindung nicht obwohl man regelmäßige Aufbauversuche sieht.

cat /etc/ipsec.secrets
# This file holds shared secrets or RSA private keys for authentication.

# RSA private key for this host, authenticating it to any other host
# which knows the public part.
92.130.68.245 18.185.150.247 : PSK "4T660xcvP0myllnGn9eBVKdIUKBbBr6L"
92.130.68.245 35.156.204.66 : PSK "WKejn_raZF1wxcvAw4SD5AwuC1onJn76"

Related Post