End goal: To have "what is my IP" in a google search result in the ip of my server being returned.

What I have tried:

  • I ran ssh -f -N -D localhost on my remote server(VPN).
  • Then launched chrome as

    chromium-browser --proxy-server="socks5://my.vpn.ip.address:1080" --host-resolver-rules="MAP * , EXCLUDE my.vpn.ip.address"

  • This resulted in no change in my IP when making searches through google.
  • The above was done based on this tutorial and these docs

This seems like it should be fairly straight forward. Is there something I am missing? How do I get my IP to be from my server(VPN)?

2 Answers 2


If, after running the command

ssh -f -N -D localhost

you type

lynx whatismyip.org

you will see that the ssh did not change your IP address. You may have to install lynx with the command

sudo apt-get install lynx

If you want to cloak your IP address you will have to connect to a proxy server that has a different IP address or connect through a VPN.

You don't say what my.vpn.ip.address is. Of course you can't successfully spoof this. If it's an actual VPN tunnel then that's the IP address that should be returned when checking your IP on a whatismyip web site.

The dynamic port you assigned is a listener. A proxy server would have to have a registered IPv4 or IPv6 address that is reachable from the Internet.

You could install a squid server which would operate as a local proxy server but again, the identity of http requests would not be cloaked. Creating a squid server seems to more closely answer your desire to set up a proxy.

  • "Or connect through a vpn" Is the answer I am looking for. I have a server with a public IP (my VPN). It is the IP I would like to access the web through. Are you saying this is not possible? Jun 14, 2017 at 0:31
  • 1
    Yes, what you want to do is definitely possible. Building a squid server, which is relatively easy and is a worthy learning process, is probably the route you want to take. You can probably cobble something together by launching a browser with switches but the solution will be kludgey at best. There are numerous benefits in employing a local proxy server, even in a small home LAN.
    – jones0610
    Jun 14, 2017 at 0:41

One blatantly silly option to get your IP to show up as that of the server is to just open the browser on the server with Xforwarding. The browser will be very slow, but if you only need to do a small amount of things it is tolerable.

Honestly this is a very hacky method, but it should work with minimal effort.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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