Skip to content

Instantly share code, notes, and snippets.

View mosesrenegade's full-sized avatar

mosesrenegade mosesrenegade

View GitHub Profile
###############################################################
## UNIT 1 #####################################################
###############################################################
cluster interface-mode individual
hostname unit1
ip local pool mgmt 192.168.1.2-192.168.1.16
ip local pool outside 192.168.2.2-192.168.2.16
ip local pool inside 192.168.3.2-192.168.3.16
@mosesrenegade
mosesrenegade / gist:4252189
Created December 10, 2012 18:03
How to appropriately work with ERB?
I am using 'Vagrant' to better develop my puppet modules. This is done because I have limited access to a real virtualization environment in the company I am in.
Given that I have a server definition like so:
manifests.pp file:
node special {
include base, include specialApp, include anotherSpecialApp
$specialAppCondition1 = "true"
}
@mosesrenegade
mosesrenegade / gist:4252113
Created December 10, 2012 17:51
Simple ERB Puppet issue
File has a configuration line like so:
Variable1 and Variable2 should be either the word true or false.
config.erb
"01": ["<%= fqdn %>","<%= ipaddress %>","<%= variable1 %>","<%= variable2 %>",]
What I'm trying to do so far in the manifest file:
hostname ciscoasa
domain-name internal.local
enable password 8Ry2YjIyt7RRXU24 encrypted
xlate per-session deny tcp any4 any4
xlate per-session deny tcp any4 any6
xlate per-session deny tcp any6 any4
xlate per-session deny tcp any6 any6
xlate per-session deny udp any4 any4 eq domain
xlate per-session deny udp any4 any6 eq domain
xlate per-session deny udp any6 any4 eq domain
oot@puppetmasterd:/etc/puppet# hiera --debug ntp::servers ::fqdn=netinfra1.core.infralabs.co
DEBUG: 2013-11-20 16:20:14 -0500: Hiera JSON backend starting
DEBUG: 2013-11-20 16:20:14 -0500: Looking up ntp::servers in JSON backend
DEBUG: 2013-11-20 16:20:14 -0500: Looking for data source node/netinfra1.core.infralabs.co
DEBUG: 2013-11-20 16:20:14 -0500: Reading data from /etc/puppet/hieradata/node/netinfra1.core.infralabs.co.json failed: JSON::ParserError: 757: unexpected token at '{
"ntp::restrict" : false,
"ntp::autoupdate" : false,
"ntp::enable" : true,
"ntp::servers" : [
"0.us.pool.ntp.org iburst",
@mosesrenegade
mosesrenegade / asa-firewall-simple.cfg
Created January 20, 2016 14:56
This is a default 5 second insecure ASA firewall config, just enough to be dangerous
enable password cisco
hostname ciscoasa
domain-name domain.local
names
!
interface GigabitEthernet1/1
nameif outside
security-level 100
no shut
!

Keybase proof

I hereby claim:

  • I am mosesrenegade on github.
  • I am mosesrenegadee (https://keybase.io/mosesrenegadee) on keybase.
  • I have a public key whose fingerprint is AB96 7A23 4C1D AAB3 D7B8 0352 0735 6FBE A3E2 BDFF

To claim this, I am signing this object:

@mosesrenegade
mosesrenegade / File-Transfer-Cheat-Sheet.txt
Created April 17, 2016 15:32
This cheat sheet is collection of oneliners that you can use for transferring files
FTP in python (external library needed):
pyftpdlib example:
Ubuntu:
#sudo apt-get install python-dev
#sudo pip install pyftpdlib
#sudo python -m pyftpdlib -p 21 -w
twisted example (limited uses):
Ubuntu:
@mosesrenegade
mosesrenegade / gist:ac14f8180b08ee5871f44bb8b469869b
Created July 17, 2016 13:28
Powershell ADCS Installation Standalone CA
Add-WindowsFeature Adcs-Cert-Authority -IncludeManagementTools
Install-AdcsCertificationAuthority –CAType StandaloneRootCA –CACommonName "OFFCA1-CA" –KeyLength 2048 –HashAlgorithm SHA256 –CryptoProviderName "RSA#Microsoft Software Key Storage Provider"
ruby -run -ehttpd . -p8000