Discovery of the day: quick and easy Apple Mail connection tunneling
I'm on a wireless network which apparently has a firewall which is MITMing port 993 connections (IMAP-over-SSL); my mail client reported a certificate error (the presented certificate was from “FortiGate”). Now, I trust this network's provider, but that doesn't mean I'm going to give them my personal e-mail, much less the password for it; so I went looking for a solution. It turns out that Apple Mail supports SOCKS proxies, and if you have SSH access to another system it's trivial to set up; ssh -D somelocalport somehost, then go into Network Preferences → Advanced → Proxies, and enter localhost:somelocalport as the proxy, and you're done!
It's not clear to me, though, once I set this up how much of my traffic goes over the proxy — the setting is not specific to mail or Apple Mail. This might be testable by shutting down the proxy and seeing what fails.
no subject
And yes, everybody who talks to 127.0.0.2:993 (or wherever the local side of the tunnel is) gets forwarded the same way; it is indeed not application specific. However if a given application doesn't know about the tunnel, there's pretty much no way it's going to find it on its own, unless you've put it in some standard place like localhost:993, but the only programs that will be using that will be other mail clients, and if you don't have any, you're done.
no subject
mail.mac.com:993. So I had to do this, avoiding changing the mail config, instead.no subject
(Anonymous) 2010-01-23 08:16 am (UTC)(link)no subject
Um, yes? I didn't “check”; SSH did that for me. I know it isn’t since SSH didn’t complain when I connected.
I have never accepted a SSH host key without checking what's up. Also, your description of the UI is inaccurate; to accept a change in host key, one must remove the old key from
known_hostsmanually; there is no “just continue” option (or at least, this was the case the last time I saw a host key change myself; it's been a while).SSH’s system is superior to certificates because certificates don’t really get you anything (or rather, they're no better than the worst, least thoroughly verifying CA on your root CA list) but claim to; SSH gives you a working system without any third-party authorities which don't really have your interests in mind.
If you're going to say “certificates are superior for the naive user”, well, that could be argued, but the matter at hand is not naive users. IMO, the Right Thing is to take the SSH model and improve it — make it easier to verify the keys and pass around the information designating “this host, and here's what its key fingerprint should be” — not add certificate authorities.