An introduction

This is a semi-public place to dump text too flimsy to even become a blog post. I wouldn't recommend reading it unless you have a lot of time to waste. You'd be better off at my livejournal. I also have another blog, and write most of the French journal summaries at the Eurozine Review.

Why do I clutter up the internet with this stuff at all? Mainly because I'm trying to get into the habit of displaying as much as possible of what I'm doing in public. Also, Blogger is a decent interface for a notebook

Wednesday, December 1, 2010

email over ssh/socks with evolution (to dodge wifi cafe firewall)

I've just been working in a cafe whose wifi blocks outgoing email. So I had to figure out how to send mail through an ssh tunnel. That is, hussle it through the firewall by sending it encrypted to a server elsewhere, and send the email outgoing from there.

For future reference, and in case it's useful to anybody else, here's how. This is assuming you are running ubuntu on your own machine, and have ssh access to a server somewhere else that's capable of sending mail.

We use ssh to set up a SOCKS proxy, over an ssh tunnel. This establishes a port on the local machine (here, port 1234). any traffic sent through that port will emerge from the server at the other end:

ssh -D 1234 username@server.net


Now, install tsocks. This lets you run another program, with all outgoing connections sent via SOCKS

sudo apt-get install tsocks


configure tsocks to use the tunnel you've set up

sudo vim /etc/tsocks.conf


look for the default server settings, at the bottom. Edit so that:

server = 127.0.0.1
server_port = 1234

Now start your mail program under tsocks

tsocks evolution 



In order to make external mail sending work under this setup, I had to turn off TLS in evolution. I'm not sure if this is a problem inherent to the socks/ssh setup, or just with my particular situation.




more info: http://ubuntuforums.org/showthread.php?t=791323

No comments:

Post a Comment