Skip to content

Instantly share code, notes, and snippets.

View linuxpld's full-sized avatar

LinuxPld linuxpld

View GitHub Profile
@linuxpld
linuxpld / IPTABLES-CHEATSHEET.md
Created August 24, 2018 23:37 — forked from davydany/IPTABLES-CHEATSHEET.md
IP Tables (iptables) Cheat Sheet

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.

@linuxpld
linuxpld / cluster_cheet.md
Created January 6, 2019 19:02 — forked from miticojo/cluster_cheet.md
Linux Cluster commands cheat sheet

Checking status of the cluster:

  • clustat
  • clustat -m -> Display status of and exit
  • clustat -s -> Display status of and exit
  • clustat -l -> Use long format for services
  • cman_tool status -> Show local record of cluster status
  • cman_tool nodes -> Show local record of cluster nodes
  • cman_tool nodes -af
  • ccs_tool lsnode -> List nodes
  • ccs_tool lsfence -> List fence devices
@linuxpld
linuxpld / git-server-centos7.md
Created December 2, 2019 22:43
Git Server CentOS 7

Configure Git Server on CentOS 7

Server

$ yum install git-core
$ sudo useradd git
$ sudo passwd git
@linuxpld
linuxpld / haproxy.cfg
Created December 6, 2019 02:54 — forked from yuezhu/haproxy.cfg
HAProxy config for HTTPS transmission web interface
global
maxconn 16384
log 127.0.0.1 len 8192 local0
log-send-hostname
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon
@linuxpld
linuxpld / ssl-transmission-nginx.conf
Created December 6, 2019 02:54 — forked from michaelkeevildown/ssl-transmission-nginx.conf
SSL Transmission Nginx Config
server {
listen 80 default_server;
server_name domain.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 default_server;
server_name domain.com;
@linuxpld
linuxpld / curl.md
Created January 17, 2020 09:16 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@linuxpld
linuxpld / WireGuard_Setup.txt
Created April 1, 2020 03:14 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@linuxpld
linuxpld / wireguard.conf
Created April 4, 2020 15:31 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@linuxpld
linuxpld / 99-network-tuning.conf
Created April 7, 2020 21:02 — forked from hrchu/99-network-tuning.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# See evil packets in your logs.
net.ipv4.conf.all.log_martians = 1
@linuxpld
linuxpld / blog20180913-01.cfg
Created July 28, 2020 17:36 — forked from haproxytechblog/blog20180913-01.cfg
Introduction to HAProxy ACLs
acl is_static path -i -m beg /static/