Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to forward everything that comes to proxy.www.some.domain:80 to 10.0.0.101:22
it is for forwarding ssh connection cause some of my friends are sitting behind very restrictive firewall which allows only connections to port 80

is there any solution for that ?

share|improve this question
    
what are you in china? –  Marm0t Nov 14 '10 at 5:40
add comment

2 Answers

ssh-http-tunneling is what you are looking for. Hope this helps you and your friend!

share|improve this answer
    
I was going to suggest pretty much the same thing, but you beat me to it! –  Steven Monday Nov 14 '10 at 6:08
add comment

This should work ( not 100% sure, i wrote it on my iphone hehe)

iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport 80 -j DNAT --to 10.0.0.101:22

iptables -A FORWARD -p tcp -i eth0 -d 10.0.0.101 --dport 22 -j ACCEPT

share|improve this answer
    
well this isn't what i need cause now with this everything on port is redirected to ssh. Even my normal website on www.some.domain and i wan't only connection to proxy.www.some.domain to be redirected... –  Dawid Nov 14 '10 at 4:33
    
Just simply put some source information in the forward statement so it only forwards that ip. –  Arenstar Nov 14 '10 at 4:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.