Posts

Showing posts from March, 2017

Manually Adding Port Forwards in PuTTY

I find the PuTTY GUI for doing this somewhat limited, so I prefer to manually edit the registry. You can use these same steps for modifying other fields as well. 1) Open the registry editor (run regedit) 2) Click on "HKEY_CURRENT_USER" 3) Click on "Software" 4) Click on "SimonTatham" 5) Click on "PuTTY" 6) Click on "Sessions" 7) Select the session you wish to modify 8) Select "PortForwardings" (REG_SZ) 9) Add the value. The values are separated by commas (,) Syntax L[SRC_IP]:[SRC_PORT]=[DST_IP]:[PORT] Single Entry Example L127.0.0.25:443=10.0.0.138:443 This will forward traffic from 10.0.0.138 to 127.0.0.25 on port 443. Multiple Entry Example L127.0.0.25:443=10.0.0.138:443,L127.0.0.25:9999=10.0.0.138:3389 This would map port 443 on 127.0.0.25 to 10.0.0.138, as well as setup an RDP forward (3389) on port 9999 (Using the same source and destination port for RDP gives a username/password error)

[Solved] VMware Workstation 12 Copy and Paste with Ubuntu 16 open-vm-tools

I was trying to copy and paste from Ubuntu 16 and VMware workstation in Windows, and it didn't work. I generally SSH into the box using putty, so this usually isn't an issue, but today, I figured I may as well look into the issue. So, first I headed over to the vendor, where I found this KB: 2073803  which states: open-vm-tools-desktop package This optional package extends OVT with additional user-space programs and libraries to improve the interactive functionality of virtual machines. This package depends on X and therefore must be installed only when X is available. These features are enabled by this package: Enables resizing of the guest display to match host console window or the VMware Remote Console Window for vSphere Enables text copy and paste operation between host and guest UI (either direction) Enables drag and drop operation between guest and host (either direction) for the VMware Workstation and VMware Fusion products (not supported on vSphere)  ...

Using strace to determine the I/O block size

I'm a big fan of IOMeter, but what if we didn't write the software that we want to test, and don't know the IO sizes it chooses? If it's a VMware VM, we can probably leverage vscsistats, but, I want to make this hypervisor agnostic, and so I turn to strace. In my baseline observations, I observed that 16KB reads and writes were the best for my storage, the question then became, what size IO is my application using? To answer this question, we need to leverage strace, and we care about reads and writes. We will assume that we want to look at a simple cat command on a large (2GB) file. Command: # strace -e read,write cat iobw.tst -o /var/log/strace.log This will read the file iobw.tst, and redirect the filtered strace output to /var/log/strace.log . When we open strace.log we see the following: write(1, "))))))))))))))))))))))))))))) )))"..., 65536) = 65536 read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\...

Installing the SSH Daemon on Arch Linux 2017.03.01

I tried to follow the instructions on   https://wiki.archlinux.org/ index.php/Secure_Shell   but they weren't so clear for me, since this was going into my lab, I just needed some "quick and dirty" instructions.  NOTE: Allowing root to login directly is a security risk. In this case, since it's my lab, I'm not concerned, but if this were in production, I would strongly advise that you do not allow root to login directly as this increases the attack surface of the machine.  1) Use the "ip addr" command to locate your local IP     # ip addr 2) Use the "pacman" package manager to install OpenSSH    # pacman -S openssh 3) Generate the SSH keys:    # ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key    # ssh-keygen -N "" dsa -f /etc/ssh/ssh_host_dsa_key    # ssh-keygen -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key    # ssh-keygen -N "" -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key   ...

FreeBSD 11 - My unqualified host name (<hostname>) unknown; sleeping for retry

Symptoms - Slow booting - Some/All of the following messages during boot - Some/All of the following messages in /var/log/messages - Some/All of the following messages in /var/log/maillog Starting sendmail_submit. <date/time> <hostname> sm-mta[615]: My unqualified host name (<hostname>) unknown; sleeping for retry <date/time> <hostname> sm-mta[615]: unable to qualify my own domain name (<hostname>) -- using short name Starting sendmail_msp_queue. <date/time> <hostname> sm-mta[615]: My unqualified host name (<hostname>) unknown; sleeping for retry <date/time> <hostname> sm-mta[615]: unable to qualify my own domain name (<hostname>) -- using short name Issue In my case, during installation I neglected to use a FQDN when it asked me for a hostname, as was expected . This caused sendmail_submit and sendmail_msp_queue to do error correction during boot which increased boot time and produced the messages abov...

Attempting to install Restyaboard in Ubuntu 16

In the wake of the Amazon S3 outage of 2017 , I wanted to have something hosted on my own machine rather than relying on Trello (which relies on S3) for my kanban needs. After a bit of research, I found restyaboard which looked intresting (although their demo site was in Mandarin (I think?) after I logged in, go google translate!) I tried to use the auto installation script at http://restya.com/board/install#Installscript  but that failed on Ubuntu 12, 14 and 16 with various errors. I managed to talk to someone in live chat (which was neat for an open source product) but was redirected to sending an e-mail. (by the agent) I then attempted to install the pre-requisite software first and then used the installer which fared slightly better, but to no real success. Next I tried picking apart the installer script (Which started at line 226 when I looked at it) I found that there were more requirements than is listed (like GeoIP?), and installing the packages in this order (...