How to clear ip addr, link
ip link delete vxlan2
ip addr del 192.168.0.55/24 dev vxlan2
VxLAN setup
Machine 1
ip link add vxlan1 type vxlan id 1 remote 192.168.18.48 dstport 4789 dev wlp2s0
ip link set vxlan1 up
ip addr add 192.168.0.6/24 dev vxlan1
Machine 2
ip link add vxlan1 type vxlan id 1 remote 192.168.18.24 dstport 4789 dev wlp3s0\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -xe | |
| # $0 host dev remote_ip | |
| # host is 1 or 2 | |
| # on vmA | |
| # ./mk-vx.sh 1 ens3 10.10.10.9 | |
| # on vmB | |
| # ./mk-vx.sh 2 ens3 10.10.10.15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Remap prefix from 'C-b' to 'C-a'. | |
| unbind C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| # Reload config file. | |
| bind-key r source-file ~/.tmux.conf\; display ' Reloaded tmux config.' | |
| # Split panes using | and -. | |
| bind-key | split-window -h -c '#{pane_current_path}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Take a backup of docker.service file. | |
| $ cp /lib/systemd/system/docker.service /lib/systemd/system/docker.service.orig | |
| 2. Modify /lib/systemd/system/docker.service to tell docker to use our own directory | |
| instead of default /var/lib/docker. In this example, I am using /p/var/lib/docker | |
| Apply below patch. | |
| $ diff -uP -N /lib/systemd/system/docker.service.orig /lib/systemd/system/docker.service | |
| --- /lib/systemd/system/docker.service.orig 2018-12-05 21:24:20.544852391 -0800 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. | |
| # I used this to connect to my university's wireless network on Arch linux. | |
| # Here's the command I used: | |
| # | |
| # wpa_supplicant -i wlan0 -c ./wpa_supplicant.conf | |
| # | |
| network={ | |
| ssid="YOUR_SSID" | |
| scan_ssid=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/busybox sh | |
| # 1) Download a prebuilt BusyBox binary here: | |
| # https://busybox.net/downloads/binaries/ | |
| # | |
| # 2) Prepare your kernel | |
| # cp /boot/vmlinuz vmlinuz | |
| # | |
| # 3) Copy the files | |
| # install -Dm0755 busybox-x86_64 initramfs/bin/busybox |
I have not been able to use ssh-keygen -e to reliably generate a private key for SSH in PEM format. This format is sometimes used by commercial products. Instead, I had to convert the key using openssl.
# generate an RSA key of size 2048 bits
ssh-keygen -t rsa -b 2048 -f jabba -C 'ronnie-jabba'
# copy key to 10.1.56.50 and add to authorized_keys