Simple acces to your HTTP(s) services via SSH and a SOCKS Proxy

I didn’t know this trick:
https://www.gypthecat.com/using-ssh-as-a-socks-vpn-on-mac-os

This blog entry describes how to use your normal SSH connection as a SOCKS proxy for web requests.
Just connect to the SSH server with the -D option on port 8080

ssh -D 8080 -p [port number] [username]@[IP address or hostname]

On Mac OS X just enable the socks proxy in the Advanced tab of your network/wifi card:
And enter as SOCKS proxy server 127.0.0.1, on port 8080

Screen Shot 2016-07-04 at 08.15.04

But for a full vpn attempt over SSH, maybe I should look at this:

https://github.com/apenwarr/sshuttle/

Share

FreeBSD mysql-server failed precmd routine

Trying to start mysql-server tries start with the message failed precmd routine.

Debugging this can be done by altering /usr/local/etc/rc.d/mysql.server

Comment out the following parts : >/dev/null 2>/dev/null

mysql_create_auth_tables()
{
   ...
	eval $mysql_install_db $mysql_install_db_args # >/dev/null 2>/dev/null
   ...
}

mysql_prestart()
{
   ... 
	if checkyesno mysql_limits; then
		eval `/usr/bin/limits ${mysql_limits_args}` # 2>/dev/null
	else
		return 0
	fi
   ...
}

You will see the error message.
In my case the issue was an existing data-directory

Share

Apache 2.4.17 and Phusion Passenger

Today I simply run a plain normal update on my FreeBSD server of the Apache server. Usually this works out without any problems.

But tonight, big panic!
The rails applications didn’t start anymore.

I received a Forbidden Message. (Directory listing isn’t allowed). Passenger wasn’t working anymore.

So I started trying several things:
– Trying to recompile passenger. No success.
– Trying to upgrade an recompile passenger, No succes.
– I was about to downgrade Apache to the previous version. (Which is a bit hard with the shared FreeBSD Port system, running in a jail. Stupid me had thrown away the previous binary)

Thanks to the google-gods I’ve found the following issue
https://github.com/phusion/passenger/issues/1648

It seems the autoindex module isn’t compatible with Passenger anymore..

For the moment I temporary solved it by disabling the autoindex module of Apache in httpd.conf
#LoadModule autoindex_module libexec/apache24/mod_autoindex.so

* Note to self *
Never throw away the previous installed package binary.

Share