1
I have two hosts, A and B. Host A hosts services on port 8080 and has outbound internet firewall rules allowing port 80 and 443 access to Host C.
Host B is on the same subnet as Host A. Host B is blocked from reaching internet Host C. Host A, however, has outbound rules on an external firewall that allows port 80 and 443 outbound to Host C.
Host B runs a software client with hardcoded URLS to download from Host A (http port 8080), and Host C (http port 80). Again, Host B is blocked from reaching Host C via firewall. The client on Host B does not support SOCKS or any other proxy capability. The only way I can possibly reach Host C:80 is by redirecting or tunneling via Host A.
I have root access to Host A and Host B. How can Host B reach Host C via Host A on port 80?
Why does this not work on host B?
ssh -L 80:hostC:80 root@hostA -N
I've enabled AllowTCPForwarding and GatewayPorts on Host A. Is right for this or is there an iptables trick that I can use?
This image is a diagram of want to do with what I have: http://i.imgur.com/rOhQ9Us.png
1I think a picture may help this question. – Natalie Adams – 2013-04-20T04:36:41.370
I have added an image outlining what I want to do with what I have. – Brett Bonner – 2013-04-20T12:57:25.057
The -vvv parameter may display something interesting - can you post what is outputted with that? – Natalie Adams – 2013-04-20T16:22:43.483
The only thing interesting is:
debug1: Local connections to LOCALHOST:80 forwarded to remote address hostc:80 \n
debug3: channel_setup_fwd_listener: type 2 wildcard 0 addr NULL \n
debug1: Local forwarding listening on 127.0.0.1 port 80. \n – Brett Bonner – 2013-04-20T18:00:32.307
iptables -t nat -A OUTPUT -o HostA -j REDIRECT
? – BatchyX – 2013-04-20T19:46:12.450