Skip to content

Instantly share code, notes, and snippets.

@margusmaki
margusmaki / README
Created January 14, 2019 17:18 — forked from xbb/README
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
#!/bin/bash
#
# This script is used to setup netbox on a server running CentOS.
# Details at http://www.opentechshed.com/deploying-netbox-digital-ocean
#
### User Modifiable Variables ###
LOGFILE="/tmp/netbox-install.log"
PGCONF="/var/lib/pgsql/10/data/pg_hba.conf"
DBPASS=`date +%s | sha256sum | base64 | head -c 32`
NBADMIN='admin'
@margusmaki
margusmaki / NETBOX
Created October 4, 2018 18:45
CentOS7
#prepare host with CentOS 7
sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
#TEST ONLY iptables -F
yum install -y epel-release
yum update -y
reboot
yum install -y git gcc wget python-psycopg2 python-devel libxml2-devel libxslt libffi-devel graphviz openssl-devel libxslt-devel httpd python-pip supervisor
#install and config PostgreSQL
yum install https://download.postgresql.or...
@margusmaki
margusmaki / netboxInstall.sh
Created October 4, 2018 18:45 — forked from maldonadojuan/netboxInstall.sh
NetBoxInstallonUbuntu1604
###NetBox Install###
#update repos
sudo apt-get update
#install postgresql
sudo apt-get install -y postgresql libpq-dev
#go into sql with user postgres
sudo -u postgres psql
@margusmaki
margusmaki / deploy_jenkins.sh
Created April 6, 2018 05:15 — forked from chaturanga50/deploy_jenkins.sh
Jenkins Installation with Ansible roles,
#!/bin/bash
#Detect OS
if grep -q Ubuntu /proc/version; then
version=$(cat /etc/issue)
echo "You are running on $version"
else
echo "This script is only supported on Ubuntu."
exit 1
fi
@margusmaki
margusmaki / logstash.conf
Created April 5, 2018 21:50 — forked from dvas0004/logstash.conf
Logstash config for receiving OSSIM logs
input {
tcp {
port => 5142
type => "ossim-events"
codec => json {
charset => "CP1252"
}
@margusmaki
margusmaki / example.png
Created April 5, 2018 21:31 — forked from rogierslag/example.png
Kibana dashboards
example.png
@margusmaki
margusmaki / join.sh
Created April 5, 2018 21:24
Shell Script to join Debian 8 to an AD Domain
#!/bin/bash
# This script should join Debian Jessie (8) to an Active Directory domain.
echo "Please authenticate with your sudo password"
sudo -v
if ! $(sudo which realmd 2>/dev/null); then
sudo aptitude install realmd adcli sssd
fi
#!/bin/bash
## Integrar Ubuntu 16.04 32/64Bits no Windows Active Directory Domain – Fullest Integration
### Primeira Etapa ----------------------------------------------------------------------------
## Voce precisa mudar a linha abaixo
MY_DOMAIN="mydomain.local"
GET_ARCH=$(getconf LONG_BIT)
@margusmaki
margusmaki / letsencrypt_2017.md
Created April 4, 2018 06:55 — forked from athiwatp/letsencrypt_2017.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.