Linux

Docker - Container

Stuff for the running Containers List running Containers $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f99ad3355bae blog "/home/docker/init_a…" 14 minutes ago Up 14 minutes 0.0.0.0:3031->3031/tcp quizzical_bardeen Shell into Containter docker exec -it f99ad3355bae bash first build cache apt-get update install Tools netstat ps tcpdump … apt-get install -y net-tools procps tcpdump telnet netcat sha256: 27a1368fbcb11db26404131aeb2b0e15d07bc32f61df6389a7c685df61bfc5aa

Alpine - Pandas on Docker Image

How to install Pandas on Alpine Linux Run Alpine Container docker run -it alpine add packages apk update apk add python3 py3-pip gcc python3-dev g++ add / build pandas time pip install pandas real 26m 13.14s user 30m 46.40s sys 3m 27.51s Happy Pandas ! sha256: afb99c7e3ed003bee48b65795a153c4fe7835fe3dae0759b70ab2bfb5adc4fd5

OpenSSH 2FA Google Auth

Let’s give a try with Alpine Linux, OpenSSH and 2FA with Google Authenticator. add Packages apk add openssh openssh-server-pam google-authenticator openssh-doc google-authenticator-doc libqrencode Configure GoogleAuth touch /etc/pam.d/sshd ln /etc/pam.d/sshd /etc/pam.d/sshd.pam cat << 'EOF' >> /etc/pam.d/sshd.pam account include base-account auth required pam_env.so auth required pam_nologin.so successok auth required /lib/security/pam_google_authenticator.so echo_verification_code grace_period=57600 nullok auth required pam_unix.so md5 sha512 EOF update sshd_config cat << 'EOF' >> /etc/ssh/sshd_config PasswordAuthentication no AuthenticationMethods any UsePAM yes EOF Restart SSHD service sshd restart Setup User su - USERNAME google-authenticator Response

Smokeping on Docker

If you have Docker running somehwere … bring up your Smoke Instance within Seconds ;) Smokeping docker run --name smoke --restart always -d -p 80:80 linuxserver/smokeping Show Containers docker ps docker-test:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8f8b872ac1c3 linuxserver/smokeping "/init" 6 minutes ago Up 6 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp smoke Shell into Docker docker exec -it smoke /bin/sh Check Netstat root@8f8b872ac1c3:/# netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.

Alpine - OpenVM Tools

Running Alpine on ESX ? Install the Open VM Tools … Install OpenVM Tools apk add open-vm-tools apk add open-vm-tools-guestinfo apk add open-vm-tools-deploypkg Start Service rc-service open-vm-tools start Autostart Service rc-update add open-vm-tools boot All in One apk add open-vm-tools open-vm-tools-guestinfo open-vm-tools-deploypkg rc-update add open-vm-tools boot rc-service open-vm-tools start Busybox Extras add some tools (arch, dnsd, dumpleases, fakeidentd, ftpd, ftpget, ftpput, httpd, inetd, readahead, telnet, telnetd, tftp, tftpd, udhcpd) apk add busybox-extras List Packages apk info -L busybox-extras docker# apk info -L busybox-extras busybox-extras-1.

Ubuntu 20.04 LTS & Netplan

Assume you got a fresh Machine with DHCP … Ubuntu with DHCP Config cat /etc/netplan/01-netcfg.yaml # This is the network config written by 'subiquity' network: ethernets: ens192: dhcp4: true version: 2 and you’d like to switch to Static IP, ask google how todo it an give try: Static IP with Netplan # This is the network config written by 'subiquity' network: version: 2 ethernets: ens192: addresses: - 1.2.3.4/24 gateway4: 1.1.1.1 nameservers: addresses: - 8.

Kubernetes Multi-Juicer

If you ever wanna run a Multiplayer OWASP Juice Shop CTF on your own, here are some Notes and Info for bloody beginners References https://github.com/iteratec/multi-juicer/ https://www.digitalocean.com/ https://kubernetes.io/de/docs/concepts/overview/what-is-kubernetes/ Prerequisite you’ve got a Digital Ocean Account (or some other Cloud Provider) a spare domain and set the NS of DigitalOcean Digital Ocean CMD Line Tools installed and configured helm tools (kubernetes package manager -> brew install helm) some budget (~2 CHF/Day) 30min for Setup btw.

Docker on OSX

Some Notes Based on this Video: https://www.youtube.com/watch?v=bhBSlnQcq2k Download Docker https://docs.docker.com/get-docker/ Download Nginx Image https://hub.docker.com/_/nginx docker pull nginx Run Image docker run nginx docker run nginx:latest docker run -d nginx:latest docker run -d -p 80 nginx:latest docker run -d -p 8080:80 nginx:latest docker run -d -p 3000:80 -p 8080:80 nginx:latest Access Webserver mbp:~ stoege$ docker run -d -p 8080:80 nginx:latest 5c7a945caa59f14e35932f3d4470c9b9afc0307dac34e01947d41adbcdfda091 mbp:~ stoege$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5c7a945caa59 nginx:latest "/docker-entrypoint.

Mint Vlan

How to configure a Vlan on Linux Mint ? Wiki Install vlan sudo apt-get install vlan Configuration root@mint:~# sudo modprobe 8021q root@mint:~# ifconfig ens19: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.18.83 netmask 255.255.255.0 broadcast 10.10.18.255 inet6 2001:db8:1:2:9506:5fcd:1c61:1279 prefixlen 64 scopeid 0x0<global> inet6 2001:db8:1:2:a9:c50b:1348:1ec6 prefixlen 64 scopeid 0x0<global> inet6 2001:db8:1:2:e064:b0ec:a08f:7fd8 prefixlen 64 scopeid 0x0<global> inet6 2001:db8:1:2:a015:7ec:eef0:1a75 prefixlen 64 scopeid 0x0<global> inet6 2001:db8:1:2:a028:b890:ffe8:5231 prefixlen 64 scopeid 0x0<global> inet6 2001:db8:1:2:c80:addb:1273:95d5 prefixlen 64 scopeid 0x0<global> inet6 fe80::9cc2:b22d:cc15:2946 prefixlen 64 scopeid 0x20<link> ether 4e:e5:10:00:06:83 txqueuelen 1000 (Ethernet) RX packets 181 bytes 58337 (58.

Keepalive

Little Keep Alive … mit freundlicher genehmigung von Kumpel Marc :) keepalive.sh #!/usr/bin/env bash FILE="$HOME/scripts/excuses" # Linux or BSD ? nf points to the right binary which numfmt > /dev/null 2>&1 && nf=$(which numfmt) || nf=$(which gnumfmt); # Linux or BSD ? gs points to the right binary which shuf > /dev/null 2>&1 && gs=$(which shuf) || gs=$(which gshuf); if [ ! -e "$FILE" ]; then echo "" echo "$FILE does not exist" echo "##############################################" command -v curl >/dev/null 2>&1 || { echo >&2 "Holy cow!

how to move on the cli

sha256: 92b20e0a803b2e3c9a987fe89c259ac9bd069b22732d93f80d0626fae15e733b