Linux: I need to tunnel out through a second machine and then to a proxy server [migrated]

view story

http://stackoverflow.com – I have 2 servers running CentOS 6 I have a server A, that has 2 network cards. eth0 is a private test network. eth1 is the corporate network, where a proxy server must be used to access the internet. On this server I use export http_proxy=http://proxyserver:3128/ and am able to access the internet. I have a server B that has 1 network card. eth0 is on the same private test network as above. I want Server B to be able to connect to the internet. Obviously my only option is to somehow go through server A. I unsuccessfully tried to setup a squid proxy as well as SSH tunneling, I do n (HowTos)