<div dir="ltr"><div class="gmail-post-text" style="margin:0px 0px 5px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:1.3;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;width:666px;word-wrap:break-word;color:rgb(36,39,41)"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;clear:both">Im using this wiki but using a newer version of strongswan: <a href="https://docs.openvpn.net/configuration/extending-vpn-connectivity-to-amazon-aws-vpc-using-aws-vpc-vpn-gateway-service/" rel="nofollow noreferrer" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(67,10,15)">https://docs.openvpn.net/configuration/extending-vpn-connectivity-to-amazon-aws-vpc-using-aws-vpc-vpn-gateway-service/</a></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;clear:both">My version uses charon. but the wiki seems to be using pluto (looking at the startup script they are using). Im assuming variables like <span style="font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px">PLUTO_CONNECTION are not valid when using charon?</span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;clear:both"><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">How do I change this script to use charon instead of pluto for routing stuff:</span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit"> </span><a href="https://docs.openvpn.net/wp-content/uploads/ipsec.sh" rel="nofollow noreferrer" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(67,10,15)">https://docs.openvpn.net/wp-content/uploads/ipsec.sh</a><br></p><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:rgb(239,240,241);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit">#!/bin/bash
# OpenVPN Access Server Appliance AWS VPC VPN Strongswan updown Script
if [[ $PLUTO_VERB == "up-client" ]]; then
if [[ $PLUTO_CONNECTION == "VPC-CUST-GW1" ]]; then
iptables -t mangle -I PREROUTING -s $PLUTO_PEER -p esp -j MARK --set-mark 0xfffe
ip xfrm policy add dir in src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/0">0.0.0.0/0</a> proto any tmpl src $PLUTO_PEER dst $PLUTO_ME proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500 mark 0xfffe
ip xfrm policy add dir fwd src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/0">0.0.0.0/0</a> proto any tmpl src $PLUTO_PEER dst $PLUTO_ME proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500
ip xfrm policy add dir out src <a href="http://0.0.0.0/0">0.0.0.0/0</a> dst $PLUTO_PEER_CLIENT proto any tmpl src $PLUTO_ME dst $PLUTO_PEER proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500
fi
if [[ $PLUTO_CONNECTION == "VPC-CUST-GW2" ]]; then
iptables -t mangle -I PREROUTING -s $PLUTO_PEER -p esp -j MARK --set-mark 0xffff
ip xfrm policy add dir in src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/0">0.0.0.0/0</a> proto any tmpl src $PLUTO_PEER dst $PLUTO_ME proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500 mark 0xffff
ip xfrm policy add dir fwd src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/1">0.0.0.0/1</a> proto any tmpl src $PLUTO_PEER dst $PLUTO_ME proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500
ip xfrm policy add dir out src <a href="http://0.0.0.0/1">0.0.0.0/1</a> dst $PLUTO_PEER_CLIENT proto any tmpl src $PLUTO_ME dst $PLUTO_PEER proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500
ip xfrm policy add dir fwd src $PLUTO_PEER_CLIENT dst <a href="http://128.0.0.0/1">128.0.0.0/1</a> proto any tmpl src $PLUTO_PEER dst $PLUTO_ME proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500
ip xfrm policy add dir out src <a href="http://128.0.0.0/1">128.0.0.0/1</a> dst $PLUTO_PEER_CLIENT proto any tmpl src $PLUTO_ME dst $PLUTO_PEER proto esp mode tunnel reqid $PLUTO_REQID level required priority 1500
fi
elif [[ $PLUTO_VERB == "down-client" ]]; then
if [[ $PLUTO_CONNECTION == "VPC-CUST-GW1" ]]; then
iptables -t mangle -D PREROUTING -s $PLUTO_PEER -p esp -j MARK --set-mark 0xfffe
ip xfrm policy del dir in src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/0">0.0.0.0/0</a> mark 0xfffe
ip xfrm policy del dir fwd src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/0">0.0.0.0/0</a>
ip xfrm policy del dir out src <a href="http://0.0.0.0/0">0.0.0.0/0</a> dst $PLUTO_PEER_CLIENT
fi
if [[ $PLUTO_CONNECTION == "VPC-CUST-GW2" ]]; then
iptables -t mangle -D PREROUTING -s $PLUTO_PEER -p esp -j MARK --set-mark 0xffff
ip xfrm policy del dir in src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/0">0.0.0.0/0</a> mark 0xffff
ip xfrm policy del dir fwd src $PLUTO_PEER_CLIENT dst <a href="http://0.0.0.0/1">0.0.0.0/1</a>
ip xfrm policy del dir out src <a href="http://0.0.0.0/1">0.0.0.0/1</a> dst $PLUTO_PEER_CLIENT
ip xfrm policy del dir fwd src $PLUTO_PEER_CLIENT dst <a href="http://128.0.0.0/1">128.0.0.0/1</a>
ip xfrm policy del dir out src <a href="http://128.0.0.0/1">128.0.0.0/1</a> dst $PLUTO_PEER_CLIENT
fi
fi
</code></pre></div><div class="gmail-post-taglist gmail-grid gmail-gs4 gmail-gsy gmail-fd-column" style="padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;display:flex;clear:both;color:rgb(36,39,41)"><br class="gmail-Apple-interchange-newline"></div></div>