Skip to content

Instantly share code, notes, and snippets.

View ivanbojer's full-sized avatar

Ivan Bojer ivanbojer

  • CROSecurityConsulting, LLC
  • San Jose, CA
View GitHub Profile
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Install Kali linux in the existing VPC / subnet",
"Parameters": {
"ServerKeyName": {
"Description": "SSH Key",
"Type": "AWS::EC2::KeyPair::KeyName"
},
"PublicSubnet": {
rulebase = pandevice.policies.Rulebase()
policies.SecurityRule.refreshall(rulebase)
def add_rule(rulebase, sec_rule, position):
if rulebase:
if not position:
rulebase.add(sec_rule)
else:
rulebase.insert(position, sec_rule)
@ivanbojer
ivanbojer / local_conf.sh
Created July 6, 2015 20:10
Create start up environment for devstack installation in 1-NIC-ubuntu-fusion server
#!/bin/bash
# Get the private IP address
export CURR_HOST_NAME=`hostname`
# AWS mode
#CURR_PRIVATE_IP=`curl http://169.254.169.254/latest/meta-data/local-ipv4`
# Ubuntu (fusion)
CURR_PRIVATE_IP=`ip addr show eth0 | grep inet | grep eth0 | awk '{print $2}' | awk -F/ '{print $1}'`
ENTRY_EXISTS=`grep $CURR_PRIVATE_IP /etc/hosts`