Skip to content

Instantly share code, notes, and snippets.

@breyer
breyer / ssh2hitron.sh
Created March 2, 2021 09:22
Getting ssh access to HITRON cable modem
#!/bin/bash
#HITRON=10.10.2.1
HITRON=192.168.100.1
USER=app
PASSWORD="com8&#wDs2*1er"
OPTIONS="-o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ServerAliveInterval=5 -o ServerAliveCountMax=1"
echo Password of $USER $PASSWORD
while [ 1 ]
do
echo connect...
@breyer
breyer / 2019-12-31
Last active December 31, 2019 12:08
Tasmota Fenster Sonoff Dual Regeln / Tasmota Window Sonoff Dual Rules
# if Humidity is higher than 65, than POWER OFF everything, set POWER1 ON, open also front window, wait for 60 seconds until the window is opened, switch off power in the back and front
# if Humidity is lower than 59, than POWER OFF everything, set POWER2 ON, close also the windows in the back, wait for 60 seconds until the window is closed
rule1 on AM2301#Humidity>65 do backlog POWER1 OFF; POWER2 OFF; POWER1 ON; publish cmnd/Dachboden_vorne/POWER1 OFF; publish cmnd/Dachboden_vorne/POWER2 OFF; publish cmnd/Dachboden_vorne/POWER2 ON ; delay 600; POWER1 OFF; publish cmnd/Dachboden_vorne/POWER2 OFF endon on AM2301#Humidity<59 do backlog POWER1 OFF; POWER2 OFF; POWER2 ON; delay 600; publish cmnd/Dachboden_vorne/POWER1 OFF; publish cmnd/Dachboden_vorne/POWER2 OFF; publish cmnd/Dachboden_vorne/POWER1 ON; POWER1 OFF endon
# Enable Rule 1
rule1 1
Details
Published: Thursday, 10 December 2015 12:33
Ramnode KVM VPS's have Alpine Linux mini ISO's in their Netherlands location. It is still possible to install Alpine Linux if your VPS provider does not support it by using kvm or qemu [ if egrep --color=auto 'vmx|svm|0xc0f' /proc/cpuinfo does not give you any output ].
I have used these instructions to install Alpine Linux on a low end VPS at ZXhost. Today ZXhost kindly added a 64bit Alpine Mini ISO to their German location.
Alpine + openvswitch + psad uses 65 mib of RAM.
Mount & boot from the VPS Provider's Rescue CD [ rescue-pro / grml / gparted ]. These are normally Debian based distributions which have kvm already installed so you may not need to apt-get install qemu-kvm. If you run out of RAM performing the installation you could also partition the disk & install Debian into the boot & non root partitions. Boot the VPS & follow the instructions below.
@breyer
breyer / ubuntu-amd64-installer.ipxe
Created May 21, 2017 11:52 — forked from robinsmidsrod/ubuntu-amd64-installer.ipxe
Boot Ubuntu x64 installer directly from the network. Only iPXE needed
#!ipxe
dhcp
echo Starting Ubuntu x64 installer for ${hostname}
set base-url http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
#imgargs linux auto=true url=http://yourserver/some/path/preseed.cfg
boot ||
# If everything failed, give the user some options
echo Boot from ${base-url} failed
iocage list | sed 1d | awk '{print $5}' | xargs -n 1 iocage snaplist
@breyer
breyer / leaseweb custom iso image
Last active October 10, 2016 09:06 — forked from johnko/gist:66515a2db2aa22aa51bd
How to iPXE boot from http iso on Leaseweb virtual cloud server
Install custom ISO image at leaseweb via iPXE boot in console mode.
Here: Installing freebsd-11.0-RC3
1. press CTRL-B
If your custom iso is not mounting, and your console is at an iPXE shell, you can:
```
dhcp
initrd http://www.dayofdefeat.org/freebsd/mfsbsd-11.0-RELEASE-amd64.iso
@breyer
breyer / sshd_rules.xml
Last active February 12, 2016 03:45
osssec rule: fatal: Unable to negotiate a key exchange method
OSSEC additional rules
Add to rules/sshd_rules.xml in group <group name="syslog,sshd,">:
<rule id="99999" level="2">
<decoded_as>sshd</decoded_as>
<match>^fatal: Unable to negotiate a key exchange method</match>
<description>Failed SSHD key exchange</description>
</rule>
<rule id="99998" level="2">
### Keybase proof
I hereby claim:
* I am breyer on github.
* I am breyer (https://keybase.io/breyer) on keybase.
* I have a public key whose fingerprint is 3300 FBC7 91E7 9B73 60DA AF99 2D94 5994 1C96 EB56
To claim this, I am signing this object: