I have a CentOS Server which have multiple ip addresses. If i`m using various ip address to login in to my server via SSH to browse other website, the ip address sent to other website is the main ip address of the Server.

For example: My CentOS Server have this IP addresses: (the main)

My computer IP:

If i use to login to the server via SSH, and i configure it to let me browse other website, so i will using to browse other website instead of (Putty proxy function)

But if i use or or to login to the server, i will still use the main IP to browse other website.

What i want to do is if i use to login, i will use to browse other website.

I`m using Putty software on my computer and CentOS on my server.

Is there any way to set it up?


Putty doesn't determine where the ssh daemon on your CentOS box will bind a tunnel to. That is usually the primary IP address on eth0, what you're calling the server's main IP address. The SSH protocol doesn't have a mechanism for the client (putty in this case) to specify which interface to bind a tunnel outlet to.


The only way I know to make something like this work is to change your CentOS server's default route. This would change the interface your traffic goes out and is the sort of thing you need to verify with your system admins and/or network admins.

on your CentOS server:

netstat -rn look for the destination listed as "default" and note the associated gateway.

route add default gateway will add your new default route

route del -n default gateway < destination copied from above > will add your new default gateway

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy