Skip to content

Instantly share code, notes, and snippets.

@kenshin17
kenshin17 / install-ndppd-active-ipv6-subnet.sh
Last active October 9, 2024 11:27
Script install NDP Proxy Daemon, active full subnet ipv6.
#!/bin/bash
# Author: kenshin17
# OS: Centos 7
# Description: Script install NDP Proxy Daemon, active full subnet ipv6.
IPv6SUBNET="xxxx:xxxx:xxxx:xxxx::/64"
echo "######################## CONFIG SYSCTL #########################"
echo "net.ipv6.conf.all.accept_ra = 2" >> /etc/sysctl.conf
echo "net.ipv6.conf.eth0.accept_ra = 2" >> /etc/sysctl.conf
@kenshin17
kenshin17 / ssl.conf
Created March 12, 2018 10:17 — forked from VirtuBox/ssl.conf
Nginx SSL/TLS configuration with TLSv1.2 and TLSv1.3 - ECDHE and strong ciphers suite
##
# SSL Settings
##
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+AESGCM';
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 15m;
ssl_session_tickets off;
@kenshin17
kenshin17 / Documentation.md
Last active March 2, 2018 05:08 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@kenshin17
kenshin17 / 1. Install Redis
Created December 21, 2017 09:47 — forked from pbolduc/1. Install Redis
Install redis on CentOS 7
# see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/
# --- Compiling ---
$ yum install gcc make tcl
$ REDIS_VER=3.2.3
$ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz
$ tar xzvf redis-$REDIS_VER.tar.gz
$ cd redis-$REDIS_VER
$ make
$ make test
@kenshin17
kenshin17 / rules-both.iptables
Created September 13, 2017 06:11 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <[email protected]>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@kenshin17
kenshin17 / elasticsearch-alterting.md
Created August 19, 2017 02:01 — forked from daniellavoie/elasticsearch-alterting.md
Alerting for Elasticsearch
@kenshin17
kenshin17 / Mina WordPress deploy
Created June 14, 2017 02:57 — forked from schikulski/Mina WordPress deploy
Mina WordPress deploy config
require 'mina/git' # Require mina/git
set :term_mode, nil # Bug in OS X that makes the password promp kinda fishy...
set :domain, 'example.com' # The web servers SSH domain
set :deploy_to, '/home/user/my-site' # Full path to where you want Mina to deploy
set :repository, 'https://[email protected]/USERNAME/REPOSITORY.git' # The git repository Mina shall use
set :branch, 'master' # What git branch Mina should get
set :user, 'username' # What username to connect with through SSH
set :current_path, 'www' # What file should be the current version. Probably 'www', 'public_html' or perhaps 'current'.

install kubernetes 1.6 on centos 7.3

Install kubelet, kubeadm, docker, kubectl and kubernetes-cni

1. Install Yum Repo

cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
@kenshin17
kenshin17 / eternalblue7_exploit.py
Created May 19, 2017 02:35 — forked from worawit/eternalblue7_exploit.py
Eternalblue exploit for Windows 7/2008
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit for Windows 7/2008 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@kenshin17
kenshin17 / nmap-cmdline
Created May 15, 2017 09:26 — forked from Neo23x0/nmap-cmdline
Nmap Scan Params for CVE-2017-0143 MS17-010 Scanning
# Scan for CVE-2017-0143 MS17-010
# The vulnerability used by WannaCry Ransomware
#
# 1. Use @calderpwn's script
# http://seclists.org/nmap-dev/2017/q2/79
#
# 2. Save it to Nmap NSE script directory
# Linux - /usr/share/nmap/scripts/ or /usr/local/share/nmap/scripts/
# OSX - /opt/local/share/nmap/scripts/
#