Working with bastions

In these days, accessing private resources behind a bastion is becoming more and more important

I found that the following works great for me

SSH and SCP:

ssh -J {bastion} {host}
scp -o 'ProxyJump {bastion}' {host}:{file} {file

Web traffic

1st you should establish a socks proxy (i use port 8888)

ssh -N -D8888 {bastion}

this will set up a socks proxy on port 8888, and keep the connection alive, without exposing a terminal

Using curl after this is like:

curl -x socks5h://localhost:8888 {url}

Curl will automatically forward the DNS lookup also over the socks connection

If you prefer to use a browser, for me the SwitchyOmega plugin worked great

In this, i’ve setup a proxy server, called socks-proxy as socks5, localhost, 8888

Then in the auto switch i have the following configuration

[SwitchyOmega Conditions]
@with result

10.* +socks-proxy
* +socks-proxy

* +direct

This will route any call for an IP starting with 10. thru the proxy and any call related to the domain name

MD5 checksum

Generate MD5 Checksum on a single file
md5sum filename
Generate MD5 Checksum on multiple files
md5sum filename1 filename2 filename3
Generate MD5 Checksum and ouptut to file
md5sum filename > md5.txt
Compare MD5 Checkum output file to current file in directory
md5sum -c md5.txt


I’ve started using inadyn to be able to access my home server using a DNS name, as I only have a dynamic IP address

This is not a problem, but I made life more complicated, as I wanted to use my own domain. Luckily my DNS provider offered a solution which worked fine, BUT I’m about to set up a plesk installation at the moment, and planning to move all my domains to this server, so needed a solution, which allows me to update the IP address in plesk

Continue reading inadyn

SVN backup

After a long period I’ve decided to start posting things here again

This time, they will be only small probably useful scripts, which you can use the same way I do

At the moment I’m moving to a new dedicated server, and want to ensure that my backup procedures are up running and work as I would expect them

A few months ago I’ve exploded my svn repository from a single one to one per project, so I had to create a script which back them all up

Continue reading SVN backup