glallen's excellent answer utilizing SSH will get the job done. However, the proper way to accomplish this is to use the proxychains program. ProxyChains is a powerful tool that allows you to easily leverage multiple proxy servers at the same time. For example, it's used by hackers use to hide their identify while performing internet attacks - by chaining a bunch of proxies around the world together, it becomes virtually impossible any forensic investigators to trace the traffic all the way back to them. Not to say that you are a malicious hacker - it will work for many different use-cases. ;)
ProxyChains is installed by default on some Linux distributions (like Kali Linux). On Ubuntu/Debian, for example, you can easily install it by doing a:
sudo apt-get install proxychains
Proxychains looks for a configuration file at /etc/proxychains.conf. Once you have it installed, backup the existing Proxychains configuration file (if it exists) and create a new one:
mv /etc/proxychains.conf /etc/proxychains-backup.conf
nano /etc/proxychains.conf
Now, paste in this example configuration that I've written for you:
strict_chain
proxy_dns
tcp_read_time_out 15000
tcp_connect_time_out 8000
[ProxyList]
socks4 192.168.1.1 8888
socks4 192.168.1.2 8157
socks4 192.168.1.3 6969
In this example, 192.168.1.1 is the IP address of the first SOCKS proxy server, 8888 is the port that the first SOCKS proxy is listening on, 192.168.1.2 is the IP address of the second SOCKS proxy server, 8157 is the port that the second SOCKS proxy is listening on, and so forth.
Now, leverage proxychains by doing proxychains firefox from the command line to launch Firefox. (Make sure that Firefox is closed first.) Now, whenever Firefox makes an outgoing connection, the proxychains program will encapsulate the traffic such that it will be proxied through all of the servers that you specified in this configuration file. To be clear, in your Firefox preferences, you should not be specifying ANY proxy servers - proxychains will take care of everything behind the scenes.
Note that, for troubleshooting purposes, you should probably try to get it working using 1 proxy at a time first before trying all 3. ;)
References: