Tuesday 12 July 2016

Distributel Smart rg SR505N UDP Tunnelblick OpenVPN

A while back I was trying to connect to a VPN. The setup worked well for other users, and worked well in other networks other than at home. However, at home, I would connect, and experience a brief period of connectivity of a few seconds at most. The connection would remain but all the requests would basically fail after that.
After a bit of searching I found that I needed to change the MTU setting on my router/modem. I browsed to the router administrative interface, then to Advanced Setup, then to WAN, and for each listing there I clicked Edit and updated MTU size from 1452 to 1492, clicked Next 3 times, and then clicked Apply/Save. It worked! I figured it out due to this fine forum.

Tuesday 28 June 2016

echo $POSIXLY_CORRECT

Who knows what $POSIXLY_CORRECT actually does, but it cost me an hour of time today. I needed to use process substitution <() with openssl to use a string as the input instead of a file. The command worked in my zsh console, but move it to the script, and poof! I was greeted with this error: syntax error near unexpected token `('. Apparently this can happen if $POSIXLY_CORRECT is enabled (set to "Y"), but that shouldn't happen in bash (I had the line #!/bin/bash at the start of my file).

It seems that because I was calling my bash file like this: "sh script.sh" it didn't work. I had to call "bash script.sh". Then $POSIXLY_CORRECT was not set and I was good to go.