You could do this with a reverse tunnel. For example, if you were targetting the port/address 198.100.146.114:3333
for btcguild.
From the machine that can get to btcguild, you do this:
ssh -R3333:198.100.146.114:3333 user@rig
This logs into your rig, and on it opens port 3333 on 127.0.0.1. Anything that the rig directs down 127.0.0.1:3333 gets tunnelled to the machine you are sshing from, and is then forwarded on to 198.100.146.114:3333
You would then configure your mining rig to talk to 127.0.0.1:3333 and it will be directly talking to the btcguild server.
You would need to ensure the ssh server is configured to allow the session to maintain indefinitely. And all ssh clients I have seen will do a reverse tunnel, so you just need to find out how for the client you are using.