My work's firewall recently began blocking outbound traffic that isn't on ports 22, 80, and 443, and I'd like to use my home router (running openwrt) to proxy my personal IMAP email so I can read it from work.
I'm pretty network and linux-savvy, but I haven't really tried this out before, so I thought I'd solicit some advice. What I figure is that I'll point to my home address via dyndns or the like and then, for requests originating from my work subnet, forward the requests on to my ISP's imap server. Here's some k-R4d ascii art to illustrate what I'm going for:
[work PC] ----> [work firewall] ---> [home router] ---> [isp]
pc.work.com fw.work.com myrouter.dyndns.org imap.isp.net
So on my router, I want to forward requests for router.dyndns.org:443 to imap.isp.net:143.
I'm running the latest version of Thunderbird as an email client. At home I have OpenWRT running on a Linksys WRT54G (it's running the release before kamikaze, IIRC, but I can upgrade it easily enough if I need to). I'd like to run whatever software I need to on the router itself, so I don't need to keep a machine in my home network on all the time and poke a hole in my home firewall.
Has anyone had experience with doing this? In particular I'm wondering if the IMAP protocol itself involves my client sending out its own IP address (pc.work.com) and then confusing the IMAP server at imap.isp.net, which should actually be talking to myrouter.dyndns.org.
My iptables skills are a little rusty, so if anyone has specific examples of the commands to use, I'd be grateful.
Also, could someone tell me if there's a better solution than just forwarding the raw TCP traffic? Is this something setting up a SOCKs server on myrouter.dnydns.org could solve? I do have one other IMAP account I'd like to access if I could, and I wouldn't mind getting around my workplace's HTTP content filters if I can do so easily. Neither one of these concerns is a big deal, though - mostly I just want to be able to access my personal email account. And now that I'm thinking about it, I'd like to be able to send SMTP mail from pc.work.com through my ISP if I can, too, without letting spammers use my router for nefarious purposes.
I've also seen some linux software out there specifically for proxing imap (called "imapproxy" or something?), but I didn't see a version compiled for openwrt specifically - I'm not adverse to setting up a wrt toolchain if I need to, but I'd rather not spend time on that if there's an easier way.
posted by mikeh at 12:08 PM on November 5, 2007