Debian tips to chroot a user in it's home and add rights for www-data
sudo apt-get -y install bindfs
sudo mkdir -p /home/MYUSER/www
sudo chown -Rf MYUSER:MYUSER /home/MYUSER/www
#!/bin/bash | |
set -e | |
# | |
# As of 11/24/2019, Debian still can't get it together with ecryptfs-utils so there | |
# is no longer an ecryptfs-utils in the apt repositories, removing the ability for | |
# a user to use ecryptfs at all, unless they build from source and manually configure | |
# the system | |
# | |
# Before using this, please see the status of the bugreport: | |
# |
This unit file, if enabled on boot, will attempt to connect to a remote server and establish a reverse tunnel.
It uses StrictHostKeyChecking=accept-new
for the ssh connection, so if you want to make sure the host you're connecting to is the right one, carry out the first connection manually and check the key.
REMOTE is considered a remote server that's available over ssh
LOCAL is considered the device initiating the remote tunnel. This will likely be a device dropped behind a NAT with no option of portforwarding
To use it, copy this multiline command somewhere to edit the configs and run it as root on the device:
#!/bin/sh | |
# Alerts via telegram after OpenWRT reboot, start monitoring and list of currently connected wireless devices. | |
# write-up at: spcr.me/openwrt-alert | |
# Some modifications: https://gist.github.com/ksverdlov/33a26fed4c4413171171de86ba59c74f | |
# ~ note ~ | |
# Call from in /etc/rc.local | |
APIKEY=<YOUR_BOT_API_KEY_HERE> |