b3f70260d00c3515f48c13256b857609b977a883
Home.md
... | ... | @@ -5,22 +5,25 @@ |
5 | 5 | * [vim](/software/vim) |
6 | 6 | * [git](/vcs/git) |
7 | 7 | * [tmux](/software/tmux) |
8 | -* [more...](/tech-index#everyday-tools) |
|
8 | +* [mutt](/software/mutt) |
|
9 | 9 | |
10 | 10 | ### operating systems |
11 | 11 | * [linux](linux/index) |
12 | 12 | * [openbsd](/unix/openbsd) |
13 | -* [more...](/tech-index#operating-systems) |
|
13 | +* [freebsd](/unix/freebsd) |
|
14 | +* [solaris](/unix/solaris) |
|
14 | 15 | |
15 | 16 | ### programming |
16 | -* [shell_scripts](/programming/shell_scripts) |
|
17 | 17 | * [nubbins](programming/nubbins) |
18 | -* [more...](/tech-index#programming) |
|
18 | +* [shell_scripts](/programming/shell_scripts) |
|
19 | +* [more...](/programming/index) |
|
19 | 20 | |
20 | 21 | ### other |
21 | -* [software](/tech-index#software) |
|
22 | -* [hardware](/tech-index#hardware) |
|
23 | -* [cloud_and_saas](/tech-index#cloud-and-saas) |
|
22 | +* [infrastructure-as-code](/iac/index) |
|
23 | +* [networking](/networking/index) |
|
24 | +* [software](/software/index) |
|
25 | +* [hardware](/hardware/index) |
|
26 | +* [cloud_and_saas](/cloud_saas/index.md) |
|
24 | 27 | |
25 | 28 | ## course notes |
26 | 29 | * [udmey](/udmey/index) |
... | ... | @@ -31,3 +34,5 @@ |
31 | 34 | * [longbox](/unsorted/longbox) |
32 | 35 | * [new_blog](/unsorted/new_blog) |
33 | 36 | * [pinterest_ignore](/unsorted/pinterest_ignore) |
37 | + |
|
38 | +* [glossary](/glossary) |
cloud_saas/index.md
... | ... | @@ -0,0 +1,4 @@ |
1 | +## cloud and saas |
|
2 | +* [azure](/cloud_saas/azure) |
|
3 | +* [openshift](/cloud_saas/openshift) |
|
4 | + |
filesystems/btrfs.md
... | ... | @@ -0,0 +1,7 @@ |
1 | +# btrfs |
|
2 | + |
|
3 | +## resizing partition |
|
4 | +``` |
|
5 | +sudo btrfs filesystem resize <size> <filepath> |
|
6 | +sudo btrfs filesystem resize max /var |
|
7 | +``` |
glossary.md
... | ... | @@ -0,0 +1,152 @@ |
1 | +# glossary |
|
2 | +## a |
|
3 | +* [alsa](/linux/alsa) |
|
4 | +* [android](/programming/android) |
|
5 | +* [apt_dpkg](/linux/apt_dpkg) |
|
6 | +* [arduino](/hardware/arduino) |
|
7 | +* [at](/linux/at) |
|
8 | +* [azure](/cloud_saas/azure) |
|
9 | +## b |
|
10 | +* [bash](/shells/bash) |
|
11 | +* [bin](/linux/bin) |
|
12 | +* [bluetooth](/software/bluetooth) |
|
13 | +* [borg](/software/borg) |
|
14 | +* [btrfs](filesystems/btrfs) |
|
15 | +## c |
|
16 | +* [c](/programming/c) |
|
17 | +* [certbot](/software/certbot) |
|
18 | +* [csgo](/linux/csgo) |
|
19 | +## d |
|
20 | +* [dhcpcd](/linux/dhcpcd) |
|
21 | +* [dig](/networking/dig) |
|
22 | +* [django](/software/django) |
|
23 | +* [dmidecode](/linux/dmidecode) |
|
24 | +* [docker](/virtualisation/docker) |
|
25 | +* [durdraw](/software/durdraw) |
|
26 | +## e |
|
27 | +* [envoy](/networking/envoy) |
|
28 | +* [esxi](/software/esxi) |
|
29 | +* [exim4](/software/exim4) |
|
30 | +## f |
|
31 | +* [fallout4](/linux/fallout4) |
|
32 | +* [ffmpeg](/linux/ffmpeg) |
|
33 | +* [firewalld](/networking/firewalld) |
|
34 | +* [flatpak](/linux/flatpak) |
|
35 | +* [fonts](/linux/fonts) |
|
36 | +* [freebsd](/unix/freebsd) |
|
37 | +* [ftp](/software/ftp) |
|
38 | +## g |
|
39 | +* [git](/vcs/git) |
|
40 | +* [gollum](/software/gollum) |
|
41 | +* [gopher](/software/gopher) |
|
42 | +* [gpg](/software/gpg) |
|
43 | +* [grafana](/software/grafana) |
|
44 | +## h |
|
45 | +* [haproxy](/networking/haproxy) |
|
46 | +* [httpd](/software/httpd) |
|
47 | +## i |
|
48 | +* [i3lock](/linux/i3lock) |
|
49 | +* [index](/linux/index) |
|
50 | +* [init](/linux/init) |
|
51 | +* [iptables](/networking/iptables) |
|
52 | +* [irc](/software/irc) |
|
53 | +## j |
|
54 | +* [journalctl](/linux/journalctl) |
|
55 | +## k |
|
56 | +* [k8s](/virtualisation/kubernetes) |
|
57 | +* [keymaps](/linux/keymaps) |
|
58 | +* [ksh](/shells/ksh) |
|
59 | +## l |
|
60 | +* [latex](/software/latex) |
|
61 | +* [ldap](/software/ldap) |
|
62 | +* [linux](/linux/index) |
|
63 | +* [logrotate](/linux/logrotate) |
|
64 | +* [lvm](/linux/lvm) |
|
65 | +* [lxc](/virtualisation/lxc) |
|
66 | +## m |
|
67 | +* [mail](/software/mail) |
|
68 | +* [mailstack](software/mailstack) |
|
69 | +* [man_pages](/linux/man_pages) |
|
70 | +* [mariadb](/software/mariadb) |
|
71 | +* [mastodon](/software/mastodon) |
|
72 | +* [mbox](/linux/mbox) |
|
73 | +* [mdadm](/linux/mdadm) |
|
74 | +* [mosh](/networking/mosh) |
|
75 | +* [mount](/linux/mount) |
|
76 | +* [mpd](/linux/mpd) |
|
77 | +* [mpv](/linux/mpv) |
|
78 | +## n |
|
79 | +* [nagios](/software/nagios) |
|
80 | +* [neos_smartcam](/hardware/neos_smartcam) |
|
81 | +* [nginx](/software/nginx) |
|
82 | +* [nmcli](/networking/nmcli) |
|
83 | +* [ntfy](/software/ntfy) |
|
84 | +* [nubbins](programming/nubbins) |
|
85 | +## o |
|
86 | +* [openbsd](/unix/openbsd) |
|
87 | +* [openshift](/cloud_saas/openshift) |
|
88 | +* [openssl](/software/openssl) |
|
89 | +* [openssl](/software/openssl) |
|
90 | +* [openvpn](/networking/openvpn) |
|
91 | +* [oracle](/software/oracle) |
|
92 | +## p |
|
93 | +* [pacman](/linux/pacman) |
|
94 | +* [pacmd](/linux/pacmd) |
|
95 | +* [pactl](/linux/pactl) |
|
96 | +* [pandoc](/software/pandoc) |
|
97 | +* [peertube](/software/peertube) |
|
98 | +* [pf](/networking/pf) |
|
99 | +* [postgresql](/software/postgresql) |
|
100 | +* [processes](/linux/processes) |
|
101 | +* [python](/linux/python) |
|
102 | +## q |
|
103 | +* [qemu](/virtualisation/qemu) |
|
104 | +## r |
|
105 | +* [rdp](/networking/rdp) |
|
106 | +* [ricing](/linux/ricing) |
|
107 | +* [rpm](/linux/rpm) |
|
108 | +* [rsync](/linux/rsync) |
|
109 | +* [rtv](/linux/rtv) |
|
110 | +## s |
|
111 | +* [samba](/linux/samba) |
|
112 | +* [sar](/linux/sar) |
|
113 | +* [scanning](/software/scanning) |
|
114 | +* [sed](/linux/sed) |
|
115 | +* [shell_scripts](/programming/shell_scripts) |
|
116 | +* [snmp](/software/snmp) |
|
117 | +* [solaris](/unix/solaris) |
|
118 | +* [spotifyd](/linux/spotifyd) |
|
119 | +* [ssh](/networking/ssh) |
|
120 | +* [subnet_cheatsheet](/networking/subnet_cheatsheet) |
|
121 | +* [svn](/vcs/svn) |
|
122 | +* [systemctl](/linux/systemctl) |
|
123 | +* [sysv](/linux/sysv) |
|
124 | +## t |
|
125 | +* [tcpdump](/software/tcpdump) |
|
126 | +* [tmux](/software/tmux) |
|
127 | +* [trezor](/hardware/trezor) |
|
128 | +* [truncate](/linux/truncate) |
|
129 | +## u |
|
130 | +* [usenet](/software/usenet) |
|
131 | +## v |
|
132 | +* [veracrypt](/software/veracrypt) |
|
133 | +* [vim](/software/vim) |
|
134 | +* [vimwiki](/software/vimwiki) |
|
135 | +* [virsh](virtualisation/virsh) |
|
136 | +## w |
|
137 | +* [w3m](/linux/w3m) |
|
138 | +* [wacom](/hardware/wacom) |
|
139 | +* [wagtail](/software/wagtail) |
|
140 | +* [wifi_connect](/networking/wifi_connect) |
|
141 | +## x |
|
142 | +* [xclip](/linux/xclip) |
|
143 | +* [xdotool](/linux/xdotool) |
|
144 | +* [xev](/linux/xev) |
|
145 | +* [xinput](/linux/xinput) |
|
146 | +* [xmodmap](/linux/xmodmap) |
|
147 | +* [xprop](/linux/xprop) |
|
148 | +## y |
|
149 | +## z |
|
150 | +* [zfs](filesystems/zfs) |
|
151 | +* [znc](/software/znc) |
|
152 | +* [zsh](/shells/zsh) |
hardware/index.md
... | ... | @@ -1,2 +1,6 @@ |
1 | -# hardware |
|
1 | +## hardware |
|
2 | +* [arduino](/hardware/arduino) |
|
3 | +* [trezor](/hardware/trezor) |
|
4 | +* [neos_smartcam](/hardware/neos_smartcam) |
|
5 | +* [wacom](/hardware/wacom) |
|
2 | 6 |
iac/index.md
... | ... | @@ -0,0 +1,4 @@ |
1 | +### infrastructure-as-code |
|
2 | +* [ansible](iac/ansible) |
|
3 | + |
|
4 | + |
linux/bash.md
... | ... | @@ -1,41 +0,0 @@ |
1 | -# bash |
|
2 | - |
|
3 | -use parameter of previous command ([ref 1](#ref#1)) |
|
4 | -``` |
|
5 | -mkdir test |
|
6 | -cd $_ |
|
7 | -``` |
|
8 | -or |
|
9 | -``` |
|
10 | -mkdir test |
|
11 | -cd !$ |
|
12 | -``` |
|
13 | - |
|
14 | -## `find` examples |
|
15 | -``` |
|
16 | -find . -type f -iname "*regex*" -exec rm -f {} \; |
|
17 | -``` |
|
18 | - |
|
19 | -## when was user created [ref_2](#ref#2) |
|
20 | -- if user has never logged in after account creation |
|
21 | - ``` |
|
22 | - ls -l /home/<user>/.bash_logout |
|
23 | - ``` |
|
24 | - |
|
25 | -## run bg job and log out |
|
26 | -after 'ctrl-z' |
|
27 | -``` |
|
28 | -disown -h %1 |
|
29 | -bg 1 |
|
30 | -logout |
|
31 | -``` |
|
32 | -_where 1 is the job number_ |
|
33 | - |
|
34 | -; Command 1 ; Command 2 Run command 1 first and then command 2 |
|
35 | -&& Command 1 && Command 2 Run command 2 only if command 1 ends sucessfully |
|
36 | -|| Command 1 || Command 2 Run command 2 only if command 1 fails |
|
37 | - |
|
38 | - |
|
39 | -## ref |
|
40 | -- :1: https://unix.stackexchange.com/questions/125385/combined-mkdir-and-cd |
|
41 | -- :2: https://it.toolbox.com/question/how-to-find-out-when-a-user-is-created-in-linux-030612 |
linux/btrfs.md
... | ... | @@ -1,7 +0,0 @@ |
1 | -# btrfs |
|
2 | - |
|
3 | -## resizing partition |
|
4 | -``` |
|
5 | -sudo btrfs filesystem resize <size> <filepath> |
|
6 | -sudo btrfs filesystem resize max /var |
|
7 | -``` |
linux/dig.md
... | ... | @@ -1,27 +0,0 @@ |
1 | -# dig |
|
2 | - |
|
3 | -display all information |
|
4 | -``` |
|
5 | -dig <hostname> |
|
6 | -``` |
|
7 | - |
|
8 | -add `+no<section>` to hide info |
|
9 | -* comments |
|
10 | -* authority |
|
11 | -* additional |
|
12 | -* answer |
|
13 | -* stats |
|
14 | - |
|
15 | -``` |
|
16 | -dig +nocomments +noadditional <hostname> |
|
17 | -``` |
|
18 | - |
|
19 | -use `+noall` to hide everything, but show answer |
|
20 | -``` |
|
21 | -dig +noall +answer <hostname> |
|
22 | -``` |
|
23 | - |
|
24 | -use a list |
|
25 | -``` |
|
26 | -dig -f <file> +noall +answer |
|
27 | -``` |
linux/index.md
... | ... | @@ -1,58 +1,77 @@ |
1 | 1 | # linux |
2 | - |
|
2 | +## a |
|
3 | 3 | * [alsa](/linux/alsa) |
4 | 4 | * [apt_dpkg](/linux/apt_dpkg) |
5 | 5 | * [at](/linux/at) |
6 | -* [bash](/linux/bash) |
|
6 | +## b |
|
7 | 7 | * [bin](/linux/bin) |
8 | -* [btrfs](/linux/btrfs) |
|
8 | +## c |
|
9 | 9 | * [csgo](/linux/csgo) |
10 | +## d |
|
10 | 11 | * [dhcpcd](/linux/dhcpcd) |
11 | -* [dig](/linux/dig) |
|
12 | 12 | * [dmidecode](/linux/dmidecode) |
13 | +## e |
|
14 | +## f |
|
13 | 15 | * [fallout4](/linux/fallout4) |
14 | 16 | * [ffmpeg](/linux/ffmpeg) |
15 | 17 | * [flatpak](/linux/flatpak) |
16 | 18 | * [fonts](/linux/fonts) |
19 | +## g |
|
20 | +## h |
|
21 | +## i |
|
17 | 22 | * [i3lock](/linux/i3lock) |
18 | 23 | * [index](/linux/index) |
19 | 24 | * [init](/linux/init) |
25 | +## j |
|
20 | 26 | * [journalctl](/linux/journalctl) |
27 | +## k |
|
21 | 28 | * [keymaps](/linux/keymaps) |
29 | +## l |
|
22 | 30 | * [logrotate](/linux/logrotate) |
23 | 31 | * [lvm](/linux/lvm) |
32 | +## m |
|
24 | 33 | * [man_pages](/linux/man_pages) |
25 | 34 | * [mbox](/linux/mbox) |
26 | 35 | * [mdadm](/linux/mdadm) |
27 | 36 | * [mount](/linux/mount) |
28 | 37 | * [mpd](/linux/mpd) |
29 | 38 | * [mpv](/linux/mpv) |
30 | -* [nmcli](/linux/nmcli) |
|
39 | +## n |
|
40 | +## o |
|
41 | +## p |
|
31 | 42 | * [pacman](/linux/pacman) |
32 | 43 | * [pacmd](/linux/pacmd) |
33 | 44 | * [pactl](/linux/pactl) |
34 | 45 | * [processes](/linux/processes) |
35 | 46 | * [python](/linux/python) |
36 | -* [rdp](/linux/rdp) |
|
47 | +## q |
|
48 | +## r |
|
37 | 49 | * [ricing](/linux/ricing) |
38 | 50 | * [rpm](/linux/rpm) |
39 | 51 | * [rsync](/linux/rsync) |
40 | 52 | * [rtv](/linux/rtv) |
53 | +## s |
|
41 | 54 | * [samba](/linux/samba) |
42 | 55 | * [sar](/linux/sar) |
43 | 56 | * [sed](/linux/sed) |
44 | 57 | * [spotifyd](/linux/spotifyd) |
45 | -* [ssh](/linux/ssh) |
|
46 | 58 | * [systemctl](/linux/systemctl) |
47 | 59 | * [sysv](/linux/sysv) |
60 | +## t |
|
48 | 61 | * [truncate](/linux/truncate) |
62 | +## u |
|
63 | +## v |
|
64 | +## w |
|
49 | 65 | * [w3m](/linux/w3m) |
66 | +## x |
|
50 | 67 | * [xclip](/linux/xclip) |
51 | 68 | * [xdotool](/linux/xdotool) |
52 | 69 | * [xev](/linux/xev) |
53 | 70 | * [xinput](/linux/xinput) |
54 | 71 | * [xmodmap](/linux/xmodmap) |
55 | 72 | * [xprop](/linux/xprop) |
73 | +## y |
|
74 | +## z |
|
56 | 75 | |
57 | 76 | |
58 | 77 | echo 1 > /sys/class/scsi_device/2:0:1:0/device/rescan |
linux/nmcli.md
... | ... | @@ -1 +0,0 @@ |
1 | -# nmcli |
linux/rdp.md
... | ... | @@ -1,7 +0,0 @@ |
1 | -# rdp |
|
2 | - |
|
3 | -convert windows saved rdp file to linux editable |
|
4 | -``` |
|
5 | -iconv -f utf-16 -t utf-8 <file>.rdp > <newfile>.rdp |
|
6 | -dos2unix <newfile>.rdp |
|
7 | -``` |
linux/ssh.md
... | ... | @@ -1,56 +0,0 @@ |
1 | -# ssh |
|
2 | - |
|
3 | -## tunnel |
|
4 | -[tunnel][] through jump server |
|
5 | -``` |
|
6 | -ssh -t L7070:localhost:7071 user@jumphost ssh -t -D7071 user@furtherhost |
|
7 | -``` |
|
8 | - |
|
9 | -``` |
|
10 | -ssh -A -t -l user jump-host \ |
|
11 | --L 8080:localhost:8080 \ |
|
12 | -ssh -A -t -l user webserver.dmz \ |
|
13 | --L 8080:localhost:8080 |
|
14 | -``` |
|
15 | - |
|
16 | -open [socks proxy][] on port 443 (hide as https) - requires sudo |
|
17 | -``` |
|
18 | -sudo ssh -o ServerAliveInterval=60 -D443 -l pyratebeard -i ~/lib/key/ssh_tunnel -N -C -q -t -4 -f ftp.pyratebeard.net |
|
19 | -``` |
|
20 | -- `-o ServerAliveInterval=60` - |
|
21 | -- `-D443` - |
|
22 | -- `-l pyratebeard` - |
|
23 | -- `-i ~/lib/key/ssh_tunnel` - |
|
24 | -- `-N` - do not execute remote command |
|
25 | -- `-C` - compress data |
|
26 | -- `-q` - quiet |
|
27 | -- `-t` - force pseudo-terminal |
|
28 | -- `-4` - use ipv4 only |
|
29 | -- `-f` - go to background |
|
30 | - |
|
31 | -## X11 forwarding |
|
32 | -``` |
|
33 | -ssh -X user@host |
|
34 | -``` |
|
35 | -- on server side `X11Forwarding` must be set to `yes` in '/etc/ssh/sshd_config' |
|
36 | - |
|
37 | -## ssh host fingerprint |
|
38 | -to find the fingerprint of a host |
|
39 | -``` |
|
40 | -sudo ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key |
|
41 | -sudo ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key |
|
42 | -``` |
|
43 | - |
|
44 | -## remote host id has changed |
|
45 | -if the fingerprint for the remote host has changed (and you are sure it's not |
|
46 | -a mitm attack) run the following to remove from 'known_hosts' |
|
47 | -``` |
|
48 | -ssh-keygen -f $HOME/.ssh/known_hosts -R <hostname> |
|
49 | -``` |
|
50 | - |
|
51 | -## ref |
|
52 | -[ssh][] guide |
|
53 | - |
|
54 | -[tunnel]: http://digitalcrunch.com/linux/how-to-use-an-ssh-tunnel-through-a-jump-host/ |
|
55 | -[socks proxy]: https://ma.ttias.be/socks-proxy-linux-ssh-bypass-content-filters/ |
|
56 | -[ssh]: http://lackof.org/taggart/hacking/ssh/ |
networking/dig.md
... | ... | @@ -0,0 +1,27 @@ |
1 | +# dig |
|
2 | + |
|
3 | +display all information |
|
4 | +``` |
|
5 | +dig <hostname> |
|
6 | +``` |
|
7 | + |
|
8 | +add `+no<section>` to hide info |
|
9 | +* comments |
|
10 | +* authority |
|
11 | +* additional |
|
12 | +* answer |
|
13 | +* stats |
|
14 | + |
|
15 | +``` |
|
16 | +dig +nocomments +noadditional <hostname> |
|
17 | +``` |
|
18 | + |
|
19 | +use `+noall` to hide everything, but show answer |
|
20 | +``` |
|
21 | +dig +noall +answer <hostname> |
|
22 | +``` |
|
23 | + |
|
24 | +use a list |
|
25 | +``` |
|
26 | +dig -f <file> +noall +answer |
|
27 | +``` |
networking/firewall-cmd.md
... | ... | @@ -1,15 +0,0 @@ |
1 | -# firewall-cmd |
|
2 | - |
|
3 | -## add / remove port |
|
4 | -``` |
|
5 | -firewall-cmd --permanent --add-port=<port_num>/<protocol> |
|
6 | -firewall-cmd --permanent --remove-port=<port_num>/<protocol> |
|
7 | - |
|
8 | -firewall-cmd --permanent --add-port=22/tcp |
|
9 | -firewall-cmd --permanent --remove-port=22/tcp |
|
10 | -``` |
|
11 | - |
|
12 | -## open port on specific ip |
|
13 | -[serverfault answer][] |
|
14 | - |
|
15 | -[serverfault answer]: https://serverfault.com/questions/684602/how-to-open-port-for-a-specific-ip-address-with-firewall-cmd-on-centos#684603 |
networking/firewalld.md
... | ... | @@ -0,0 +1,15 @@ |
1 | +# firewall-cmd |
|
2 | + |
|
3 | +## add / remove port |
|
4 | +``` |
|
5 | +firewall-cmd --permanent --add-port=<port_num>/<protocol> |
|
6 | +firewall-cmd --permanent --remove-port=<port_num>/<protocol> |
|
7 | + |
|
8 | +firewall-cmd --permanent --add-port=22/tcp |
|
9 | +firewall-cmd --permanent --remove-port=22/tcp |
|
10 | +``` |
|
11 | + |
|
12 | +## open port on specific ip |
|
13 | +[serverfault answer][] |
|
14 | + |
|
15 | +[serverfault answer]: https://serverfault.com/questions/684602/how-to-open-port-for-a-specific-ip-address-with-firewall-cmd-on-centos#684603 |
networking/firewalls.md
... | ... | @@ -1,6 +0,0 @@ |
1 | -# firewalls |
|
2 | - |
|
3 | -## linux |
|
4 | -- [iptables](iptables) |
|
5 | -- [firewall cmd](firewall-cmd) |
|
6 | -* [pf](pf) |
networking/index.md
... | ... | @@ -0,0 +1,23 @@ |
1 | +## networking |
|
2 | +### adminstration |
|
3 | +* [dig](/networking/dig) |
|
4 | +* [nmcli](/networking/nmcli) |
|
5 | +* [subnet_cheatsheet](/networking/subnet_cheatsheet) |
|
6 | +* [wifi_connect](/networking/wifi_connect) |
|
7 | + |
|
8 | +### connections |
|
9 | +* [mosh](/networking/mosh) |
|
10 | +* [rdp](/networking/rdp) |
|
11 | +* [ssh](/networking/ssh) |
|
12 | + |
|
13 | +### firewalls |
|
14 | +* [iptables](/networking/iptables) |
|
15 | +* [firewalld](/networking/firewalld) |
|
16 | +* [pf](/networking/pf) |
|
17 | + |
|
18 | +### proxy |
|
19 | +* [haproxy](/networking/haproxy) |
|
20 | +* [envoy](/networking/envoy) |
|
21 | + |
|
22 | +### vpn |
|
23 | +* [openvpn](/networking/openvpn) |
networking/iptables.md
... | ... | @@ -0,0 +1 @@ |
1 | +# iptables |
networking/nmcli.md
... | ... | @@ -0,0 +1 @@ |
1 | +# nmcli |
networking/rdp.md
... | ... | @@ -0,0 +1,7 @@ |
1 | +# rdp |
|
2 | + |
|
3 | +convert windows saved rdp file to linux editable |
|
4 | +``` |
|
5 | +iconv -f utf-16 -t utf-8 <file>.rdp > <newfile>.rdp |
|
6 | +dos2unix <newfile>.rdp |
|
7 | +``` |
networking/ssh.md
... | ... | @@ -0,0 +1,63 @@ |
1 | +# ssh |
|
2 | + |
|
3 | +## tunnel |
|
4 | +[tunnel][] through jump server |
|
5 | +``` |
|
6 | +ssh -t L7070:localhost:7071 user@jumphost ssh -t -D7071 user@furtherhost |
|
7 | +``` |
|
8 | + |
|
9 | +``` |
|
10 | +ssh -A -t -l user jump-host \ |
|
11 | +-L 8080:localhost:8080 \ |
|
12 | +ssh -A -t -l user webserver.dmz \ |
|
13 | +-L 8080:localhost:8080 |
|
14 | +``` |
|
15 | + |
|
16 | +open [socks proxy][] on port 443 (hide as https) - requires sudo |
|
17 | +``` |
|
18 | +sudo ssh -o ServerAliveInterval=60 -D443 -l pyratebeard -i ~/lib/key/ssh_tunnel -N -C -q -t -4 -f ftp.pyratebeard.net |
|
19 | +``` |
|
20 | +- `-o ServerAliveInterval=60` - |
|
21 | +- `-D443` - |
|
22 | +- `-l pyratebeard` - |
|
23 | +- `-i ~/lib/key/ssh_tunnel` - |
|
24 | +- `-N` - do not execute remote command |
|
25 | +- `-C` - compress data |
|
26 | +- `-q` - quiet |
|
27 | +- `-t` - force pseudo-terminal |
|
28 | +- `-4` - use ipv4 only |
|
29 | +- `-f` - go to background |
|
30 | + |
|
31 | +## X11 forwarding |
|
32 | +``` |
|
33 | +ssh -X user@host |
|
34 | +``` |
|
35 | +- on server side `X11Forwarding` must be set to `yes` in '/etc/ssh/sshd_config' |
|
36 | + |
|
37 | +## ssh host fingerprint |
|
38 | +to find the fingerprint of a host |
|
39 | +``` |
|
40 | +sudo ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key |
|
41 | +sudo ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key |
|
42 | +``` |
|
43 | + |
|
44 | +## remote host id has changed |
|
45 | +if the fingerprint for the remote host has changed (and you are sure it's not |
|
46 | +a mitm attack) run the following to remove from 'known_hosts' |
|
47 | +``` |
|
48 | +ssh-keygen -f $HOME/.ssh/known_hosts -R <hostname> |
|
49 | +``` |
|
50 | + |
|
51 | +## ref |
|
52 | +[ssh][] guide |
|
53 | + |
|
54 | +[tunnel]: http://digitalcrunch.com/linux/how-to-use-an-ssh-tunnel-through-a-jump-host/ |
|
55 | +[socks proxy]: https://ma.ttias.be/socks-proxy-linux-ssh-bypass-content-filters/ |
|
56 | +[ssh]: http://lackof.org/taggart/hacking/ssh/ |
|
57 | + |
|
58 | + |
|
59 | + |
|
60 | + |
|
61 | +* must have dns resolv on greyskull (and nublar for lxc) |
|
62 | +* must have short name in ssh/config on nublar for lxc |
|
63 | +* must have cert-auth known host on nublar for lxc |
programming/index.md
... | ... | @@ -0,0 +1,5 @@ |
1 | +## programming |
|
2 | +* [android](/programming/android) |
|
3 | +* [c](/programming/c) |
|
4 | +* [nubbins](programming/nubbins) |
|
5 | +* [shell_scripts](/programming/shell_scripts) |
shells/bash.md
... | ... | @@ -0,0 +1,41 @@ |
1 | +# bash |
|
2 | + |
|
3 | +use parameter of previous command ([ref 1](#ref#1)) |
|
4 | +``` |
|
5 | +mkdir test |
|
6 | +cd $_ |
|
7 | +``` |
|
8 | +or |
|
9 | +``` |
|
10 | +mkdir test |
|
11 | +cd !$ |
|
12 | +``` |
|
13 | + |
|
14 | +## `find` examples |
|
15 | +``` |
|
16 | +find . -type f -iname "*regex*" -exec rm -f {} \; |
|
17 | +``` |
|
18 | + |
|
19 | +## when was user created [ref_2](#ref#2) |
|
20 | +- if user has never logged in after account creation |
|
21 | + ``` |
|
22 | + ls -l /home/<user>/.bash_logout |
|
23 | + ``` |
|
24 | + |
|
25 | +## run bg job and log out |
|
26 | +after 'ctrl-z' |
|
27 | +``` |
|
28 | +disown -h %1 |
|
29 | +bg 1 |
|
30 | +logout |
|
31 | +``` |
|
32 | +_where 1 is the job number_ |
|
33 | + |
|
34 | +; Command 1 ; Command 2 Run command 1 first and then command 2 |
|
35 | +&& Command 1 && Command 2 Run command 2 only if command 1 ends sucessfully |
|
36 | +|| Command 1 || Command 2 Run command 2 only if command 1 fails |
|
37 | + |
|
38 | + |
|
39 | +## ref |
|
40 | +- :1: https://unix.stackexchange.com/questions/125385/combined-mkdir-and-cd |
|
41 | +- :2: https://it.toolbox.com/question/how-to-find-out-when-a-user-is-created-in-linux-030612 |
shells/ksh.md
... | ... | @@ -0,0 +1 @@ |
1 | +# ksh |
shells/zsh.md
... | ... | @@ -0,0 +1 @@ |
1 | +# zsh |
software/index.md
... | ... | @@ -1,2 +1,43 @@ |
1 | 1 | # software |
2 | 2 | |
3 | +* [bluetooth](bluetooth) |
|
4 | +* [borg](borg) |
|
5 | +* [certbot](certbot) |
|
6 | +* [django](django) |
|
7 | +* [durdraw](durdraw) |
|
8 | +* [esxi](esxi) |
|
9 | +* [exim4](exim4) |
|
10 | +* [ftp](ftp) |
|
11 | +* [gollum](gollum) |
|
12 | +* [gopher](gopher) |
|
13 | +* [gpg](gpg) |
|
14 | +* [grafana](grafana) |
|
15 | +* [httpd](httpd) |
|
16 | +* [index](index) |
|
17 | +* [iptables](iptables) |
|
18 | +* [irc](irc) |
|
19 | +* [latex](latex) |
|
20 | +* [ldap](ldap) |
|
21 | +* [mail](mail) |
|
22 | +* [mailstack](mailstack) |
|
23 | +* [mariadb](mariadb) |
|
24 | +* [mastodon](mastodon) |
|
25 | +* [mutt](mutt) |
|
26 | +* [nagios](nagios) |
|
27 | +* [nginx](nginx) |
|
28 | +* [ntfy](ntfy) |
|
29 | +* [openssl](openssl) |
|
30 | +* [oracle](oracle) |
|
31 | +* [pandoc](pandoc) |
|
32 | +* [peertube](peertube) |
|
33 | +* [postgresql](postgresql) |
|
34 | +* [scanning](scanning) |
|
35 | +* [snmp](snmp) |
|
36 | +* [tcpdump](tcpdump) |
|
37 | +* [tmux](tmux) |
|
38 | +* [usenet](usenet) |
|
39 | +* [veracrypt](veracrypt) |
|
40 | +* [vim](vim) |
|
41 | +* [vimwiki](vimwiki) |
|
42 | +* [wagtail](wagtail) |
|
43 | +* [znc](znc) |
software/mailstack.md
... | ... | @@ -0,0 +1,16 @@ |
1 | +# mailstack |
|
2 | + |
|
3 | +* [2.5admins 128: some value](https://2.5admins.com/2-5-admins-128/) |
|
4 | + |
|
5 | +| component | software | | |
|
6 | +| --- | --- | --- | |
|
7 | +| smtp | postfix | | |
|
8 | +| imap | dovecot | | |
|
9 | +| webmail | roundcube | | |
|
10 | +| spam filter | spam assassin | do spam filter while smtp connection open - run spamd | |
|
11 | +| glue | postprox | | |
|
12 | +| antivirus | none | don't use clamav | |
|
13 | +| domain key signing | opendkim | | |
|
14 | +| get notifications about spam | dmarc | | |
|
15 | + |
|
16 | +* https://www.bsdhowto.ch/mxpop3.html |
tech-index.md
... | ... | @@ -1,97 +0,0 @@ |
1 | -# tech |
|
2 | -## everyday tools |
|
3 | -* [vim](/software/vim) |
|
4 | -* [git](/vcs/git) |
|
5 | -* [tmux](/software/tmux) |
|
6 | -* [mutt](/software/mutt) |
|
7 | -* [vimwiki](/software/vimwiki) |
|
8 | -* [irc](/software/irc) |
|
9 | -* [mail](/software/mail) |
|
10 | - |
|
11 | -## operating systems |
|
12 | -* [linux](/linux/index) |
|
13 | -* [openbsd](/unix/openbsd) |
|
14 | -* [freebsd](/unix/freebsd) |
|
15 | - |
|
16 | -## programming |
|
17 | -* [shell_scripts](/programming/shell_scripts) |
|
18 | -* [c](/programming/c) |
|
19 | -* [android](/programming/android) |
|
20 | - |
|
21 | -## software |
|
22 | - |
|
23 | -### vcs |
|
24 | -* [svn](/vcs/svn) |
|
25 | - |
|
26 | -### containers |
|
27 | -* [lxc](/virtualisation/lxc) |
|
28 | -* [docker](/virtualisation/docker) |
|
29 | -* [k8s](/virtualisation/kubernetes) |
|
30 | - |
|
31 | -### virtual machines |
|
32 | -* [virsh](virtualisation/virsh) |
|
33 | -* [qemu](/virtualisation/qemu) |
|
34 | - |
|
35 | -### filesystems |
|
36 | -* [zfs](filesystems/zfs) |
|
37 | - |
|
38 | -### infrastructure-as-code |
|
39 | -* [ansible](iac/ansible) |
|
40 | - |
|
41 | -### firewalls |
|
42 | -* [firewalls](/networking/firewalls) |
|
43 | - |
|
44 | -* [durdraw](/software/durdraw) |
|
45 | -* [gollum](/software/gollum) |
|
46 | -* [pandoc](/software/pandoc) |
|
47 | -* [latex](/software/latex) |
|
48 | -* [scanning](/software/scanning) |
|
49 | -* [grafana](/software/grafana) |
|
50 | -* [ldap](/software/ldap) |
|
51 | -* [exim4](/software/exim4) |
|
52 | -* [ftp](/software/ftp) |
|
53 | -* [mosh](/networking/mosh) |
|
54 | -* [usenet](/software/usenet) |
|
55 | -* [znc](/software/znc) |
|
56 | -* [mariadb](/software/mariadb) |
|
57 | -* [oracle](/software/oracle) |
|
58 | -* [postgresql](/software/postgresql) |
|
59 | -* [gpg](/software/gpg) |
|
60 | -* [openssl](/software/openssl) |
|
61 | -* [veracrypt](/software/veracrypt) |
|
62 | -* [nagios](/software/nagios) |
|
63 | -* [ntfy](/software/ntfy) |
|
64 | -* [snmp](/software/snmp) |
|
65 | -* [tcpdump](/software/tcpdump) |
|
66 | -* [bluetooth](/software/bluetooth) |
|
67 | -* [haproxy](/networking/haproxy) |
|
68 | -* [openssl](/software/openssl) |
|
69 | -* [openvpn](/networking/openvpn) |
|
70 | -* [envoy](/networking/envoy) |
|
71 | -* [subnet_cheatsheet](/networking/subnet_cheatsheet) |
|
72 | -* [wifi_connect](/networking/wifi_connect) |
|
73 | -* [esxi](/software/esxi) |
|
74 | -* [certbot](/software/certbot) |
|
75 | -* [django](/software/django) |
|
76 | -* [gopher](/software/gopher) |
|
77 | -* [httpd](/software/httpd) |
|
78 | -* [mastodon](/software/mastodon) |
|
79 | -* [nginx](/software/nginx) |
|
80 | -* [peertube](/software/peertube) |
|
81 | -* [wagtail](/software/wagtail) |
|
82 | -* [borg](/software/borg) |
|
83 | - |
|
84 | -iwgetid wlp6s0 -r |
|
85 | - |
|
86 | - |
|
87 | -## hardware |
|
88 | -* [arduino](/hardware/arduino) |
|
89 | -* [trezor](/hardware/trezor) |
|
90 | -* [neos_smartcam](/hardware/neos_smartcam) |
|
91 | -* [wacom](/hardware/wacom) |
|
92 | - |
|
93 | -## cloud and saas |
|
94 | -* [azure](/cloud_saas/azure) |
|
95 | -* [openshift](/cloud_saas/openshift) |
|
96 | - |
|
97 | -* [mailstack](software/mailstack) |
unix/solaris.md
... | ... | @@ -0,0 +1,14 @@ |
1 | +# solaris |
|
2 | + |
|
3 | +* see port in use by process |
|
4 | +``` |
|
5 | +pfiles <pid> |
|
6 | +``` |
|
7 | +* check if zone or not - 'global' == host |
|
8 | +``` |
|
9 | +zonename |
|
10 | +``` |
|
11 | + |
|
12 | +## 10 |
|
13 | + |
|
14 | +## 11 |
virtualisation/lxc.md
... | ... | @@ -295,3 +295,9 @@ gollum haproxy log pastebin radicale site stagit znc ftp |
295 | 295 | cd /var/www/html |
296 | 296 | git clone https://git.renre.com/infrastructure/linux-patching.github.io.git . |
297 | 297 | ``` |
298 | + |
|
299 | +## bindmount |
|
300 | +* mount a dir on lxc, add follwoing to container conf |
|
301 | +``` |
|
302 | +mp0: /path/on/host,mp=/mount/path/on/container |
|
303 | +``` |