Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

80 total results found

Let's Encrypt & Certbot

Linux

Installation Ubunutu add-apt-repository ppa:certbot/certbot apt-get update && apt-get install python-certbot CentOS yum install epel-release yum install python-certbot certbot Certbot You must stop anything on port 443/80 before starting certbo...

DRBD + Pacemaker & Corosync MySQL Cluster Centos7

Linux MySQL

On Both Nodes Host file vim /etc/hosts 10.1.2.114 db1 db1.localdomain.com10.1.2.115 db2 db2.localdomain.com Corosync will not work if you add something like this: 127.0.0.1 db1 db2.localdomain.com - however you do not need to delete 127.0.0.1 localho...

Cisco ASA Site to Site

Networking

Verification: NAT or transparent mode Value should return ( Firewall mode: Router ) show firewall Always do a backup!!! copy running-config disk0:/running-config-backup-DDMMYYYY ACL / No NAT Rules Change net-local and and remote for local and remote ...

IPv4 Subnet Mask Cheat Sheet

Networking

CIDR Subnet Mask Total IPs Usable IPs /32 255.255.255.255 1 1 /31 255.255.255.254 2 2* /30 255.255.255.252 4 2 /29 255.255.255.248 8 6 /28 255.255.255.240 16 14 /27 255.255.255.224 32 30 /26 255.255...

DB's and Users

Linux MySQL

Create a DB CREATE DATABASE new_database; Drop a DB DROP DATABASE new_database; Create a new user with all prems CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'local...

Innodb recovery

Linux MySQL

What we will need to do for the recovery is to stop mysql and put it in innodb_force_recovery to attempt to backup all databases. service mysqld stop mkdir /root/mysqlbak cp -rp /var/lib/mysql/ib* /root/mysqlbak vim /etc/my.cnf You can start from 1 to 4, ...

MySQL Replication

Linux MySQL

*** TESTED FOR CENTOS 7 *** NEED TO HAVE PORT 3306 OPENED! -- MASTER = 10.1.2.117, SLAVE = 10.1.2.118 Master: vi /etc/my.cnf [mysqld]bind-address = 10.1.2.117server-id = 1log_bin = /var/lib/mysql/mysql-bin.logbinlog-do-db=mydbdatadir=/var/lib/mysqlsocket=/...

Regular expressions

Linux

SED Character Description ^ Matches the beginning of the line $ Matches the end of the line . Matches any single character * Will match zero or more occurrences of the previous character [ ] Matches all the characters inside the [ ] ...

Linux Routing

Networking

Routing View routes ip route ip route Adding a route ip addr add 192.168.1.100/24 dev eth0 Add a gateway ip route add default via 192.168.1.1 dev eth0 Add a route of a subnet to a gateway ip route add 10.1.2.0/24 via 10.1.2.1 dev eth0 null route (bla...

SSL .htaccess

Other

WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # BEGIN WordPress RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f Rewri...

rdiff-backup

Linux

#!/bin/bash SERVEURS="HOSTNAME.SEVER.COM 127.0.0.1" RDIFFEXCLUSIONS="--exclude /mnt --exclude /media --exclude /proc --exclude /dev --exclude /sys --exclude /var/lib/lxcfs --exclude-sockets" RDIFFOPTS="--print-statistics" DATE=`date +%Y-%m-%d` echo ...

Docker

Linux

Docker hub https://hub.docker.com/ Searching an Image docker search <img-name> Pull a Image docker pull <image>:<version> Run a Container docker run -it <img-name> /bin/bash Run a Container with ports + volume -v = volume, -p =...

Juniper Cli

Networking

Display Show Display configuration show configuration | display set Show display detail configuration show configuration | display detail show arp macs show ethernet-switching table File To navigate the file system you can do file list /? Backup Bac...

Firewall iptables script

Linux Firewall

# Interfaces WAN="ens3" LAN="ens9" #ifconfig $LAN up #ifconfig $LAN 192.168.1.1 netmask 255.255.255.0 echo 1 > /proc/sys/net/ipv4/ip_forward sysctl -w net.ipv4.ip_forward=1 iptables -F iptables -t nat -F iptables -t mangle -F iptables -X ...

named

Linux

/etc/named.conf options { listen-on port 53 { any; }; listen-on-v6 { none; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats....

cPanel Notes

Linux cPanel

Useful scripts Restart ssh from URL http://11.22.33.44:2086/scripts2/doautofixer?autofix=safesshrestart To setup nat The /var/cpanel/cpnat file acts as a flag file for NAT mode. If the installer mistakenly detects a NAT-configured network, delete the/v...

Ansible

Linux

This Wiki page is a list of examples based of this project i created, for the full project details go to the link below http://git.myhypervisor.ca/dave/grafana_ansible Directory Structure playbook ├── ansible.cfg ├── playbook-example.yml ├── group_vars ...

Adding Adapter on vSwitch

Windows Hyper-V

List Adapter Get-VMNetworkAdapterVlan -ManagementOS Adding Adapter Add-VMNetworkAdapter -ManagementOS -Name "Lan" -SwitchName "vSwitch" Add-VMNetworkAdapter -ManagementOS -Name "Wan" -SwitchName "vSwitch" Tagging vlan on Adapter Set-VMNetworkAdapterVlan...

Git

Linux

Tags git tag -a v0.1 -m "tagname"git tag v0.1Deletegit tag -d v0.1 Branch Create branchgit branch stageCheck what branch you are ingit statusgit log --oneline --decorategit branch -aSwitch branches or restore working tree files.git checkout stagepush change...

OpenSSL

Linux

Check SSL On domain openssl s_client -connect www.domain.com:443 Check a Certificate Signing Request (CSR) openssl req -text -noout -verify -in CSR.csr Check a private key openssl rsa -in privateKey.key -check Check a certificate (crt or pem) openssl x...