Skip to content

Instantly share code, notes, and snippets.

@artithw
artithw / iptables-cheatsheet.md
Created January 15, 2024 08:20 — forked from mcastelino/iptables-cheatsheet.md
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal
@artithw
artithw / pve-restart-service-command
Created July 8, 2022 05:31
Proxmox reload services
root@pve:~# service pve-cluster restart && service pvedaemon restart && service pvestatd restart && service pveproxy restart
@artithw
artithw / google-chrome-lxc.sh
Created March 2, 2021 07:59 — forked from Roadmaster/google-chrome-lxc.sh
Set up an lxc container with google chrome so it runs confined but displays on localhost.
#!/bin/bash
# Set up an lxc container with google chrome so it runs confined but displayed on the
# localhost.
# Adapted from https://blog.simos.info/how-to-run-graphics-accelerated-gui-apps-in-lxd-containers-on-your-ubuntu-desktop/
# Assume setguid/setid for root is properly setup
# root:1000:1
# Assume aptcache profile exists, see https://gist.github.com/Roadmaster/754110f3f49fef19ec89ae29f29edd11
LXC_NAME=chrome-container
@artithw
artithw / fix-wordpress-permissions.sh
Created September 22, 2020 08:40 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
apt-get -y autoremove
apt-get -y update
apt-get -y upgrade
# Some Utils
apt-get install -y curl vim-nox
# PJSIP
@artithw
artithw / install_container_service.sh
Created October 10, 2018 07:35 — forked from carlosedp/install_container_service.sh
Install Container services (Docker/Kubernetes) on Debian/Ubuntu
#!/bin/bash
echo "Container Linux installation script"
echo "This will install:"
echo " - Docker Community Edition"
echo " - Docker Compose"
echo " - Kubernetes: kubeadm, kubelet and kubectl"
echo ""
set -xeo pipefail
@artithw
artithw / zabbix-alert-smtp.sh
Created April 30, 2018 02:15 — forked from maprangzth/zabbix-alert-smtp.sh
Zabbix SMTP Alert script for gmail
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header
@artithw
artithw / .MOVED.md
Created September 22, 2016 03:07 — forked from hwdsl2/.MOVED.md
IPsec VPN Server Auto Setup Script for Ubuntu and Debian