My SSH Socks5 proxy works great, especially with the addition of autossh, but unlike most web browsers and Pidgin, many applications (particularly on the command line) just do not have proxy support built in.
Proxychains is a wrapper that redirects all network traffic through a designated proxy. To get it working is very simple. After installing, I made this change to the bottom of /etc/proxychains.conf:
# defaults set to "tor"
# socks4 127.0.0.1 9050
socks5 127.0.0.1 1082
ie. I commented out the default Tor proxy and added my local SSH socks5 proxy which I have placed on port 1082.
Then, for instance, to send my gpodder podcatcher through the SSH tunnel, I just start gpodder in a terminal as follows:
Then all of gpodder's network traffic (DNS queries included) go out via SSH through my out-of-country server. And now I have restored access to many blocked podcasts, PGP key servers, and no doubt many other things as they come up. I have been looking for something like this for years.
Finally someone has agreed to help me play with PGP e-mail encryption!! So here are my notes:
In my claws-mail e-mail client, I had to install a plugin (a separate package in Debian) called claws-mail-pgpmime. After restarting, there appeared a "GPG" tab in my per-account e-mail preferences, where I clicked on the "Generate a new key pair" button. (claws-mail apparently does all the necessary pgp stuff under the hood, including adding the new keys to my private key ring....) In the same tab, I also selected the "select key by your e-mail address", which seemed logical. And then in the "Privacy" tab do not forget to select when you want your key sent, and under what circumstances e-mail is supposed to be encrypted. (And I was delighted to see a "Save sent encrypted messages as plain text option", since I have an encrypted home directory anyway.)
(Note that this FAQ warns that some spammers harvest e-mail address off of the public key servers, so if you intend to publish your key to such a server, choose an e-mail address with good spam filtering....)
Now for the fun command line stuff....
PGP can only work if both ends of the communication have one another's public keys, and from what I can tell, the standard way to do that is via the world-wide network of public key servers. For instance, after adding:
to ~/.gnupg/options, if I open an e-mail signed with a pgp-signature attachment, I can then click on the key icon to the right of my claws-mail message pane and see the prompt:
"This key is not in your keyring. Do you want Claws Mail to try and import it from a keyserver?
Of course(!?) this does not work in China because all the keyservers seem to be blocked, so I have to do it through a proxy server as follows:
proxychains gpg --no-tty --recv-keys A1295TE1D75F5533
And now claws-mail can verify the signature as "correct". And now
will show all the keys on my private key ring, including the one I just imported. That is how I get my friend's public key.
Per this fine howto, I can broadcast my own key to the world thusly:
gpg --send-keys --keyserver keyserver.ubuntu.com 6D79E522
where the code at the end of the line is obtainable from the "gpg --list-keys" listing.
Note that it is also possible to share public keys by exporting them to a file as follows:
gpg --export -a 6D79E522 > mykey.asc
and e-mailing the file. Once both ends are supplied with the other's public key, encryption should be trivial.
(As of Drupal version 6.x....)
Drupal is a very mature piece of software, with a vast number of modules to choose from, often with multiple modules vying to provide the same piece of functionality. After some trial and error, here are my candidates for "best of", modules someone new to Drupal should look into early:
First some easily overlooked core modules:
Here is someone else's list of favorites.
Sometimes the bandwidth is so bad here (or is it the "Great Firewall" deliberately trying to break my connection?) that my SSH tunnel will frequently fail. Very inconvenient, as I do not notice until I need it, then I have to do a manual restart and wait for it to connect (and said wait can sometimes be significant when bandwidth sucks...)
I have setup an alias in my .bashrc as follows:
alias tunnel="autossh -M 0 -v -CND 1082 email@example.com"
To start the tunnel at the beginning of the day, I just type "tunnel" in any terminal. And whenever the ssh connection is broken, autossh automatically (and apparently intelligently) restarts it. So far, so good.
In a previous post in this section I noted that the Linux kernel no longer supports my Thinkpad A21M's sound card, and I have been using USB speakers instead. (Another post talks about a borked mother board, which turns out to have been not the case. More on that one another time.)
Suddenly out of the blue with the latest Debian 2.6.30 kernel I am getting something loading that is pretending to be a sound card and reporting itself to my mixer as a "PC Speaker". The problem with this is both Debian user-land and Linux applications make it difficult to switch from one sound card to another, either globally or per application, and everything defaults to the first sound card. Which spot is now being squatted upon by this useless "PC Speaker" thing, making it difficult for me to use the USB speakers.
This appears to be the culprit: a "pcsp" module. And sure enough, lsmod tells me there is a snd_pcsp being loaded. So I added:
to /etc/modprobe.d/x-local-blacklist, rebooted, and it went away. Back to functioning USB speakers.