Posts published by: alex

Locking down SFTP

This is a small recipe to increase the security around a SFTP interface. In the /etc/ssh/sshd_config file include the following settings: Subsystem sftp internal-sftp This configures the sftp subsystem to use the internal sftp implementation. This is because inside the chroot, we usually will not have the normal ...

Python GUI

After looking a multiple options of GUI programming under python I eventually settled for tkinter. The main reason was that tkinter is very ubiquitous and initially though the learning curve wuld have shorter as I was very used to GUI programming using TCL/TK. Turned out that what I known TCL/TK did not translate ...

cisco bridging

This article is here as a reminder. So, for testing, I needed to configure a Cisco CSR1000V virtual router as a bridge. So I used a version 16 Cisco IOS XE image. To make my life easier I used the "wizard" that runs the first time to automatically configure bridgning. Ironically, this created an invalid ...

Linux HDMI hotplug

Now in 2024 this is usually no longer needed. A more current solution is: https://github.com/phillipberndt/autorandr The point of this article is to document I workaround that I came ...

Getting the current proxy pac configuration

This is done using tcl for convenience. If you do not have it installed you can download freewrap executable and rename freewrap.exe to wish.exe or freewrapTCLSH.exe to tclsh.exe. Registry Key : HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ REG_SZ AutoConfigURL = https://<your url>/proxy.pac ...

Definiton of maturity

Maturity is: The ability to stick with a job until it’s finished. The ability to do a job without being supervised. The ability to carry money without spending it. And the ability to bear an injustice without wanting to get even. ...

Calculate system availability

To calculate the availability of redundant systems you can use this formula: total_avail = 1-(1 - single_avail) ^ (number_of_nodes) Nodes: ...

10 tips for making documentation crystal clear

So you've some written excellent documentation. Now what? Now it's time to go back and edit it. When you first sit down to write your documentation, you want to focus on what you're trying to say instead of how you're saying it, but once that first draft is done it's time to go back and polish it up a little. One of my favorite ways to edit is to read what I've written aloud. ...

Writing Safe Shell scripts

Writing shell scripts leaves a lot of room to make mistakes, in ways that will cause your scripts to break on certain input, or (if some input is untrusted) open up security vulnerabilities. Here are some tips on how to make your shell scripts safer. Don't The simplest step is to avoid using shell at all. Many higher-level languages are both easier to write the code in in the first place, and avoid some of the issues that shell ...

Remote Bridging

Sometimes we need to connect two or more geographically distributed ethernet networks to one broadcast domain. There can be two different office networks of some company which uses smb protocol partially based on broadcast network messages. Another example of such situation is computer cafes: a couple of computer cafes can provide to users more convinient environment forr playing multiplayer computer games without dedicated servers. Both sample networks in this article need to have one *nix server for bridging. Our networks can be connected by any possible hardware that provides IP connection between them. Connecting Two Remote Local Networks With Transparent Bridging Technique Short description In described configuration we are connecting two remote LANs to make them appearing as one network with 192.168.1.0/24 address space (however physically, presense of bridges in network configuration is not affecting IP protocol and is fully transparent for it, so you can freely select any address space). Both of the bridging servers has two network interfaces: one (as eth0 in our example) connested to the LAN, and second (eth1) is being used as transport to connect networks. When ethernet tunnel between gateways in both networks will be bringed up we will connect tunnel interfaces with appropriate LAN interfaces with bridge interfaces. Schematically this configuration can be following: ...

First steps...

So finally took the time to re-launch the 0ink web site. This time used more off-the shelf software. So this site is just a another plain wordpress powered site. Actually I have to thank my son for introducing me to wordpress. What happened is that my son, who is only seven wanted to have his own web site. (Due to peer pressure, kids these days...) He has an Android tablet that he uses quite often. Since I knew that wordpress can be ...

Bash Tips

Some bash one-liners: echo ${!X*} Will print all the names of variables whos name starts with X. To output the contents of a variable so it can be parsed by bash ...