Hi: I have a problema, i want to enter a site that blocks by default all ips, except some ones, my server ip is not allowed, but i have another server ip allowed, so i have done a local ssh port forwarding localhost:81 to this site, works fine, if i enter on my non allowed server and i do: lynx localhost:81 I see perfect site.

My problem is, i have to see the same if i enter on shell: lynx abc.com

(keep in mind that abc.com is the site that dont allow traffic from every ip) Si what i want is that abc.com redirect it to localhost:81 Instead of abc.com i can route all traffic of the ip hosting that site, dont have to be FQD routing, anyone know how to do this with iptables, the routing process?

Thanks

link|improve this question
1  
@Michael: that's not a programming related question. Anyway, if I understood correctly your question, try edit /etc/hosts putting 127.0.0.1:81 abc.com – 0verbose Apr 28 '11 at 12:14
So on abc host u need to redirect traffic from abc:80 to localhost:81 is that right? – Troydm Apr 28 '11 at 13:35
feedback

migrated from stackoverflow.com Apr 28 '11 at 13:13

This question came from our site for professional and enthusiast programmers.

2 Answers

Forget iptables.

Do a ssh -D 1234 to have a SOCKS proxy. Then you can configure your navigator to use this. (Or configure tsocks).

Of course you can also do it with iptables, but since you already have a ssh, it should be easier. Look for NAT and iptables keywords.

link|improve this answer
feedback

ssh i have used it to have a localport but i want to use iptables because i want to access that site without modifying any configuration on browser due i will access site with more programs than browser (for example a torrent program)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown