I would like to have the situation described below:
Code:
SSH Tunnel
my PC (localhost)================Remote SSH Server----------some-web-server.com
Internet Internet
some-web-server.com can only be accessed via the Remote SSH Server. I have successfully set up an SSH tunnel to the remote SSH Server to do some port forwarding between my PC and some-web-server.com. If I want to access some-web-server.com from Firefox I use "http://localhost:80".
I want this to be transparent, such that I do not need to use "http://localhost:80", I just want to type "http://some-web-server.com" in the URL on my PC.
How do I set up iptables on localhost to forward all traffic bound for some-web-server.com through the SSH tunnel?
I have tried the following command (and many others) without success:
iptables -t nat -A OUTPUT --out-interface lo --source 127.0.0.1 -p tcp --destination-port 80 -j DNAT --to-destination 123.456.78.9
Bookmarks