This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config setup | |
# strictcrlpolicy=yes | |
# uniqueids = no | |
conn myconn | |
authby=psk | |
auto=start | |
dpdaction=restart | |
esp=aes128-sha1! | |
forceencaps=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit these to match your project and setup | |
PROJECT=Your-VPN-project-name-comes-here | |
NETWORK=main-gateway | |
GATEWAY_NAME=vpn-gateway | |
TEST_INSTANCE_NAME=client-1 | |
TARGET_NETWORK="10.150.0.0/16" | |
MACHINE_TYPE=n1-standard-1 | |
ZONE="us-central1-a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm | |
sudo yum install -y lsof man strongswan rng-tools | |
sudo sed -e 's/EXTRAOPTIONS=""/EXTRAOPTIONS="-r \/dev\/urandom"/' -i /etc/sysconfig/rngd | |
sudo ln -s /usr/sbin/strongswan /usr/sbin/ipsec | |
sudo service rngd start | |
sudo service ipsec start | |
sudo service strongswan start | |
sudo chkconfig rngd on | |
sudo chkconfig strongswan on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config setup | |
conn myconn | |
authby=psk | |
auto=start | |
dpdaction=restart | |
esp=aes128-sha1! | |
forceencaps=yes | |
ike=aes128-sha1-modp2048! | |
keyexchange=ikev2 | |
mobike=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm <-- This might be changed... So check it on Fedora site | |
sudo yum install -y lsof man strongswan rng-tools | |
sudo vi /etc/sysconfig/rngd; EXTRAOPTIONS="-r /dev/urandom"; | |
sudo ln -s /usr/sbin/strongswan /usr/sbin/ipsec | |
sudo service rngd start | |
sudo service ipsec start | |
sudo service strongswan start | |
sudo chkconfig rngd on | |
sudo chkconfig strongswan on | |
echo "%any : PSK \"<secret-key>\"" | sudo tee /etc/strongswan/ipsec.secrets > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "%any : PSK \"<secret-key>\"" | sudo tee /etc/strongswan/ipsec.secrets > /dev/null | |
sudo cp ipsec.conf /etc/strongswan | |
sudo ipsec restart | |
sudo ipsec up myconn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo route add -net 10.240.0.0/16 eth1 | |
sudo route add -net 10.250.0.0/16 eth1 | |
sudo ifconfig eth1 mtu 1300 up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Edit these to match your project and setup | |
PROJECT=vpn-lab | |
NETWORK=gce-network | |
GATEWAY_NAME=vpn-gateway-1 | |
TEST_INSTANCE_NAME=povm-1 | |
TARGET_NETWORK="10.150.0.0/16" | |
MACHINE_TYPE=n1-standard-1 | |
ZONE="us-central1-a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function blogMonitor() { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[2]; | |
var curUrl = sheet.getRange("B1").getValue(); | |
var curStatus = sheet.getRange("B3").getValue(); | |
// monitorObj contain the url we are checking and its status (200 or 503 or any other HTML return code). | |
var monitorObj = {url: curUrl, status: curStatus}; | |
// We will start as if the blog is down and hope for the best. | |
var code = 503; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// The main logic to check the site and do a quick 2nd check in case we | |
// did not get 200 as return code | |
// | |
function checkAndNotify(monitorObj, curCode) { | |
var status = monitorObj.status; | |
if (curCode === 200) { | |
if (status === 503) { | |
// Site was down previously but up on second check | |
logToSheet(monitorObj.url, "The site is Up"); |
OlderNewer