Saturday, May 29, 2021

Have running ssh sessions (and new sessions) keep working even with openvpn changing default route

 I installed openvpn on a remote server and had my ssh sessions break because the default route had been changed and so, packets sent to me (at client) were going out through the VPN and, presumably, either not landing at my computer or being rejected due to incorrect source address.

I paste below a solution which I COMPLETELY don't understand.  They do work though.  I just pasted them into /etc/rc.local

ip rule add from $(ip route get 1 | grep -Po '(?<=src )(\S+)') table 128
ip route add table 128 to $(ip route get 1 | grep -Po '(?<=src )(\S+)')/32 dev $(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')
ip route add table 128 default via $(ip -4 route ls | grep default | grep -Po '(?<=via )(\S+)')

https://serverfault.com/a/918441

Friday, April 30, 2021

cssh font size

The default clusterssh font size on my big monitors was too small.  

To fix this:

On Ubuntu 18.04

  1. just edit ~/.clusterssh/config

  2. change terminal_font=[whatever] with 12x24.  This increases the font size but the window dimensions then become too big.  

  3. Also change the terminal_size.  That was 80x24 originally.  Changing that to 70x40 allows me to (along with terminal_font=12x24) have two cssh terminals on one landscape 1920x1080 monitor.  Since I usually have 4 terminals, that's perfect for 4 terminals on two landscape monitors with some extra space for the cssh dialog for typing into all the terminals at once.


I really should learn tmux though.  tmux is supposed to have reasonable cssh like functionality.  But I'm so used to screen commands I'm not looking forward to learning new keystrokes.

Wednesday, February 17, 2021

some jmeter conveniences

In jmeter I recently had reason to set these (can be in jmeter.properties or user.properties).

 

CookieManager.save.cookies=true
view.results.tree.max_results=0

 

The first is to have cookies be available as variables and the second is because (to save RAM, probably) jmeter GUI doesn't show everything when you load a jtl file. The second makes it show all results.

Friday, January 01, 2021

Apparmor and empty man pages on old kernels

 On my odroid HC4, the kernel is the stock 4.9.x from hardkernel.  I haven't gotten around to switching to mainline since I do like petitboot and don't want to have the little box connected to a monitor while figuring things out.  It does work as-is, just with some small issues.

For instance, man doesn't render man pages. 

https://bugs.launchpad.net/ubuntu/+source/man-db/+bug/1778684

The workaround is to disable apparmor for /usr/bin/man.  I should just upgrade the kernel, really.  But for now:

apt install apparmor-utils
aa-disable /usr/bin/man