Skip to content

Instantly share code, notes, and snippets.

@xombiemp
xombiemp / check_and_failover_NAT.sh
Created August 22, 2012 21:57 — forked from j3tm0t0/check_and_failover_NAT.sh
Script to check Internet connectivity and fail-over route table to standby
#!/bin/sh
. /home/ec2-user/.bash_profile
. /etc/profile.d/aws-apitools-common.sh
region=us-east-1
# these should be configured for each NAT instance
target1=8.8.8.8
target2=8.8.4.4
active_rt=rtb-ACTIVE
standby_rt=rtb-STANDBY