Skip to content

Instantly share code, notes, and snippets.

View alexalouit's full-sized avatar

Alexandre Alouit alexalouit

View GitHub Profile
@alexalouit
alexalouit / readme.txt
Last active April 7, 2023 22:07
OpenWRT as reliable and secure SFTP server
$ opkg update
$ opkg install openssh-server openssh-sftp-server
# disable built-in dropbear
$ /etc/init.d/dropbear disable
$ /etc/init.d/dropbear stop
# enable full openssh server
$ /etc/init.d/sshd enable
$ /etc/init.d/sshd start
@alexalouit
alexalouit / exports.default
Created March 29, 2020 13:07
nfs export ip sync (use provider ptr)
/dir *(rw,no_root_squash,no_subtree_check)
@alexalouit
alexalouit / gist:e88cf00cfc9718f7fa68fbeccd9d497b
Created December 30, 2019 07:51
proxmox: authenticate smtp relay
$ apt-get update
$ apt-get install -y libsasl2-modules
$ nano /etc/postfix/main.cf
relayhost = [mail.server.com]:587
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_sasl_security_options =
$ opkg update
$ opkg install stubby
$ /etc/init.d/stubby enable
$ nano /etc/config/dhcp
# add to dnsmasq section:
option noresolv '1'
list server '127.0.0.1#5453'
$ /etc/init.d/stubby start
@alexalouit
alexalouit / dnsmasq.conf
Last active August 11, 2021 21:04
Netflix + IPv6 HE tunnel + Chromecast
server=/netflix.com/#
address=/netflix.com/::
server=/netflix.net/#
address=/netflix.net/::
server=/nflxext.com/#
address=/nflxext.com/::
server=/nflximg.net/#
address=/nflximg.net/::
server=/nflxvideo.net/#
address=/nflxvideo.net/::
@alexalouit
alexalouit / ModelUuid.php
Created November 13, 2019 06:36
Laravel/Lumen use uuid as id
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class ModelUuid extends Model
{
@alexalouit
alexalouit / README
Last active October 17, 2019 09:50
compile hostapd noscan
$ mkdir -p ~/build/hostapd; cd ~/build/hostapd
$ apt-get install hostapd
$ apt-get source hostapd
$ apt-get build-dep hostapd
$ cd wpa-$VERSION
# patch hostapd/config_file.c, src/ap/ap_config.h, src/ap/hw_features.c and src/ap/ieee802_11_ht.c
$ dpkg-buildpackage -rfakeroot -uc -b
$ dpkg --unpack ../hostapd*.deb
@alexalouit
alexalouit / readme.txt
Last active October 6, 2019 14:21
BackupPc 4 debian 10 deb
$ wget https://s3-eu-west-1.amazonaws.com/backuppc4/Debian10/backuppc_4.3.0_amd64.deb
$ wget https://s3-eu-west-1.amazonaws.com/backuppc4/Debian10/libbackuppc-xs-perl_0.58-1_amd64.deb
$ wget https://s3-eu-west-1.amazonaws.com/backuppc4/Debian10/rsync-bpc_3.0.9.12_amd64.deb
$ dpkg -i libbackuppc-xs-perl_0.58-1_amd64.deb
$ dpkg -i rsync-bpc_3.0.9.12_amd64.deb
$ apt-get install libcgi-pm-perl libarchive-zip-perl rrdtool apache2-utils libwww-perl libtime-parsedate-perl nginx sendmail-bin
$ dpkg -i backuppc_4.3.0_amd64.deb
@alexalouit
alexalouit / fix.sh
Last active February 12, 2021 15:52
fix Logstash error "logstash load error: ffi/ffi -- java.lang.NullPointerException: null" on Raspbian
#!/bin/bash
# based on https://github.com/mew2057/CAST/blob/6c7f7d514b7af3c512635ec145aa829c535467dc/csm_big_data/config-scripts/logstashFixupScript.sh
# see: https://github.com/elastic/logstash/issues/10755
apt-get update
apt-get install -f zip unzip
STARTDIR=$(pwd)
JARDIR="/usr/share/logstash/logstash-core/lib/jars"
@alexalouit
alexalouit / atheros.patch
Last active April 17, 2019 14:24
atheros reg kernel 4.9.30
--- a/drivers/net/wireless/ath/regd.c 2017-09-13 00:12:11.038844554 +0200
+++ b/drivers/net/wireless/ath/regd.c 2017-09-13 00:13:32.676068380 +0200
@@ -341,6 +341,8 @@
struct ieee80211_channel *ch;
unsigned int i;
+ return;
+
for (band = 0; band < NUM_NL80211_BANDS; band++) {
if (!wiphy->bands[band])