Skip to content

Instantly share code, notes, and snippets.

Avatar

Lukas Erlacher duk3luk3

View GitHub Profile
View gist:faddc0740c7df2fdf3668122d2d072df
erlacher@laprbg12 ~(:|✔) % sudo lsmod ~
Module Size Used by
rndis_host 20480 0
cdc_ether 24576 1 rndis_host
usbnet 53248 2 rndis_host,cdc_ether
mii 16384 1 usbnet
ebtable_filter 16384 0
ebtables 40960 1 ebtable_filter
ip6table_filter 16384 0
ip6_tables 36864 1 ip6table_filter
View gist:7537ee9f26013afcfb8de84ade7bad2d
erlacher@laprbg12 ~(:|✔) % rfkill list ~
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: dell-wifi: Wireless LAN
Soft blocked: no
Hard blocked: no
View gist:11f0b7b8684bb7c50b44e82076878076
[ 446.792859] systemd-rfkill[1598]: An rfkill device has changed state with index 1 and type wlan
[ 446.792955] systemd-rfkill[1598]: rfkill1: Operating on rfkill device 'dell-wifi'.
[ 446.884196] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
[ 446.884201] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
[ 446.884203] debugfs: File 'force_bredr_smp' in directory 'hci0' already present!
@duk3luk3
duk3luk3 / etc_iptables_rules.v4
Created Mar 28, 2020
iptables for isolating docker (swarm) services
View etc_iptables_rules.v4
*filter
:DOCKER-USER - [0:0]
-F DOCKER-USER
-A DOCKER-USER ! -i ens3 -j RETURN -m comment --comment "Allow all outgoing packets"
-A DOCKER-USER -i ens3 -p udp -m udp --sport 53 -j RETURN -m comment --comment "Allow incoming UDP Port 53 for DNS"
-A DOCKER-USER -i ens3 -p icmp -j RETURN -m comment --comment "Allow ICMP"
-A DOCKER-USER -i ens3 -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "Allow established TCP" -j RETURN
#-A DOCKER-USER -s 108.61.168.111/32 -m comment --comment "Allow Own IP" -j RETURN
#-A DOCKER-USER -s 127.0.0.0/8 -m comment --comment "Allow Localhost" -j RETURN
-A DOCKER-USER -j DROP -m comment --comment "Drop the rest"
View gist:f3f49973684a2418379a7ae9e21d8dca
Arduino: 1.8.10 (Linux), Board: "Generic STM32F103V series, STM32F103VE, STM32duino bootloader, 72Mhz (Normal), Smallest (default)"
sketch/src/Marlin.cpp: In function 'void kill(const char*, const char*, bool)':
sketch/src/Marlin.cpp:723:31: error: type mismatch with previous external decl of 'const char NUL_STR []' [-fpermissive]
extern const char NUL_STR[];
^
sketch/src/Marlin.cpp:188:12: error: previous external decl of 'const char NUL_STR [1]' [-fpermissive]
NUL_STR[] PROGMEM = "";
^
Multiple libraries were found for "STM32ADC.h"
View wow.py
import yaml
DICT_STUFF = yaml.load("""
beautiful:
- config
- goes
- here
""")
View keybase.md

Keybase proof

I hereby claim:

  • I am duk3luk3 on github.
  • I am duk3luk3 (https://keybase.io/duk3luk3) on keybase.
  • I have a public key ASBQqclUVLYGoFhXr8rpP5fqtyuckLzXsdImYSHBVOjCego

To claim this, I am signing this object:

@duk3luk3
duk3luk3 / aaa_README.md
Last active May 26, 2019
Can't afford iodine? Use mosh and authbind to bust through hostile networks
View aaa_README.md

Iodine on the cheap

If iodine is too expensive, you can use mosh and authbind as an alternative to get your SSH/mosh tunnels through hostile networks.

This requires three ingredients:

  • authbind with the requisite configuration
  • A shell script to wrap the authbind call
  • ALL the parameters for mosh
@duk3luk3
duk3luk3 / pacman-surgery.md
Last active May 13, 2018
Pacman Recovery on a Raspberry Pi via open-sdcard surgery
View pacman-surgery.md

Problem:

When booting the RPi3, everything seems normal and the login console appears.

However, entering any login name (e.g. root) and hitting enter leads to the login console going away and reappearing - as if the login name was rejected, the login failure lockout got triggered, or the login process is crashing (which is what's actually happening).

Diagnosis

View tcp.md
Remote Host Firewall Local Host
SYN SEQ=1337 ACK=0 ->
<- SYN-ACK SEQ=5555 ACK=1337
ACK SEQ=1338 ACK=5556 ->
SYN SEQ=1337 ACK=0 ->
<- SYN-ACK SEQ=9999 ACK=1337