Archive for May, 2009

Portable Ubuntu: listening on multiple ports

May 24, 2009

As with the last post.. I wanted to add listening on port 53 for my networks assignment (writing a DNS server). Add a / between port entries (this is in portable_ubuntu.conf of course), as follows:

eth0=slirp,00:aa:bb:cc:dd:ee,tcp:22:22/udp:53:53

Ta-da!

Advertisements

Changing the sshd listening port on Portable Ubuntu

May 24, 2009

I run Windows mainly and have been trying out Portable Ubuntu a bit. I currently use cygwin for bash, sshd, and some other things.

Portable Ubuntu doesn’t play nice with claiming listening rights over port 22 when starting up, so once it’s running, I can’t connect to either ssh server.

I wanted to throw the Portable Ubuntu listening port to something else, so I edited /etc/ssh/sshd_config and changed Port to 22. That wasn’t enough, apparently, because the whole VM is behind some kind of NAT-based emulation.

You have to edit <your pubuntu dir under windows>/config/portable_ubuntu.conf too. There’s a configuration line specifically for listening on port 22, and it looks like this:

eth0=slirp,00:aa:bb:cc:dd:ee,tcp:22:22

I presume the two “22”s stand for port mapping on each end (similar to a router). I didn’t figure out which was which, but I changed both ends to what I set in /etc/ssh/sshd_config and now it’s working properly.

Using find(1) to recursively clean LaTeX compiles

May 8, 2009

I keep all of my resumes with this sort of directory structure:
resumes/2009/company/resume.tex (along with cover.tex for cover letters, and whatnot)

Now it’s all under SVN so I only have the *.tex sources under revision control. But when there are a billion compiled DVIs/PSs/PDFs/etc, it’s a little annoying to look at a really long “svn status” command.

So.. I delete them all!
find . \( -name "*.dvi" -o -name "*.ps" -o -name "*.pdf" -o -name "*.aux" -o -name "*.log" \) -type f -print -delete

Using find(1) I can find files. I match for outputs ORed with each other and delete them (print for confirmation). This isn’t exactly the best way (ORing specific filetypes), but it works for what I’m doing for now.