Circumventing firewalls with HTTPS traffic

Firewalls that only allow standard ports (such as HTTP, HTTPS) can be easily circumvented by proxying all traffic trough port 443, using an external VPS. Here’s a minimal setup to obtain so with proxytunnel: Apache2: [...] ProxyRequests On AllowConnect 22 <Proxy *> Order deny,allow Deny from all </Proxy> <Proxy 127.0.0.1> Order deny,allow Allow from all </Proxy> [...] Local SSH configuration: Host vps_proxy ProxyCommand proxytunnel -q -E -p VPS_IP:443 -d 127.0.0.1:22 -z DynamicForward 1080 ServerAliveInterval 60 Port 443 Set up local SOCKS5 proxy:...

November 22, 2023

Debian Sid logbook

LaTex package “float” broke after texlive 20190830 After updating texlive to the 20190830 version, the “float” package started working, giving ! LaTeX Error: Unknown float option 'H'. even if the same file was compiling correctly before and \usepackage{float} is used. You need to downgrade at least to the 20190227 version. I did apt purge texlive* then tried to install texlive from the stable distribution (buster is shipping 20190227) but even after having purged everything related to texlive the system could not install that version for broken dependencies/wrong versions....

December 20, 2018

Allow only SFTP and chroot user

useradd sftp-only create user In /etc/ssh/sshd_config comment the existing line starting with Subsystem sftp and add: Subsystem sftp internal-sftp Match user sftp-only ChrootDirectory /path/to/the/dir X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp service sshd restart The folder must be owned by root, remember to set the read/write permission for the user. User will be chrooted to the selected folder and won’t be able to use ssh or the shell.

Chromium: Google Hangouts screensharing not working

If you try and enable the screen sharing feature during a call on Hangouts on Chromium on Debian, it happens absolutely nothing, no error is reported. This is because the Chromium package in the debian repositories is built with the enable_hangout_services_extension=false flag (every other feature of Hangouts actually works). You can download the source, edit the rules file and enable that flag. The produced Chromium package will have the screen sharing feature correctly working....

chsh: PAM authentication failed

If you keep getting PAM authentication failed when trying to change shell, even when running as root, you probably have some invalid settings. Change the shell manually using vipw /etc/passwd. chsh should be back working now. vipw can be used to safely edit /etc/shadow and etc/group, too.

Commands cheatsheet

A.K.A. Commands I keep forgetting no matter how many milions time I type them Magic SysRq key commands The magic SysRq key is a key combination understood by the Linux kernel, which allows the user to perform various low-level commands regardless of the system’s state. ALT + SysRq key (usually Stamp) + .. f to call oom_kill Remove kernel module manually installed with make/dkms If you get stuff like: hid-nintendo.ko: Running module version sanity check....

KDE Plasma notes

No previews or thumbnails If you’re missing previews and thumbnails while browsing for files, either in settings or in Dolphin, install the following packages: apt install ffmpegthumbs mplayerthumbs kffmpegthumbnailer kio-extras External HDD and Plasma Long story short: you should pay attention using external (mechanical) HDDs with Plasma. The bug is 8 years old and it’s just being ignored (or just not considered a bug).Plasma isn’t spinning down external HDDs and turning off them off while still being powered causes damage, so you have to pay attention on what happens when you mount/unmount them....

Linux on Thinkpad P14s Gen 2

I recently got a Thinkpad P14s Gen 2 with an Intel i7-1165G7. Here are some first impressions on how well it works with Linux/Debian. TL;DR Don’t buy it. It sucks. The machine it’s absolutely terrible. Just google for “p14s gen 2 intel throttling” to get an idea. Before initiating with the installation, disable SecureBoot and set the standby/sleep feature to “Linux” on the BIOS. I installed Debian Sid starting from the non-free netinstall image of Buster then did a full upgrade after having added Sid in the sources....

Play DRM content on Chromium

Play DRM content on Chromium You need the widevine plugin, which ships with Chrome and Firefox by default but isn’t available for Chromium. Install the package chromium-widevine. If the problem persist, manually copy the files libwidevinecdm.so and libwidevinecdmadapter.so from a Chrome install (/opt/google/chrome/) to /usr/lib/chromium/. Or wget https://dl.google.com/widevine-cdm/1.4.8.1008-linux-x64.zip unzip 1.4.8.1008-linux-x64.zip sudo mkdir /usr/lib/chromium sudo mv libwidevinecdm.so /usr/lib/chromium sudo chmod 644 /usr/lib/chromium/libwidevinecdm.so

Restore GRUB

Mount the linux partition, chroot to it, run grub-update. Or: fdisk -l list of physical devices (X) and partitions (Y) (or blkid) mount /dev/sdXY /mnt umount /mnt/boot and mount /dev/sdXY /mnt/boot if you have a separate boot partition grub-install --boot-directory=/mnt/boot /dev/sdX (Given you have access to a busybox/linux shell)