I've got a (virtualized) local LAMP server on Xubuntu 12.04 that I am using for Drupal development. I'd like to learn how to use web 2.0 integration Drupal modules (eg. youtube, facebook, etc.) but I live in China so these sites are obviously blocked.
I use SSH tunneling and a local SOCKS proxy for browsing these sites, but I am not sure how to make my virtualized Apache2 server use this proxy. I can see 3 potential solutions but I'm not really sure how to best go about implementing them.
(in order of preference, I prefer limiting the traffic sent through the ssh tunnel to only what needs to get around the firewall)
set up ssh tunnel from guest OS get Apache2 server to route external traffic (or even better, only external traffic with specific host names, eg. facebook.com, youtube.com) through the local SOCKS proxy.
set up ssh tunnel from guest OS, route all traffic through local SOCKS proxy (easy with Ubuntu but looks like configuring a global SOCKS proxy might be a touch harder with Xubuntu because it doesn't have Ubuntu's Network Proxy GUI)
make virtualbox on host OS route all traffic through SOCKS proxy.
Any ideas on which route would be best and how to implement it? Thanks in advance for any help!