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 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: 11.22.33.134 (the main) 11.22.33.34 11.22.34.210 11.22.34.43

My computer IP: 33.22.11.123

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

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

What i want to do is if i use 11.22.33.34 to login, i will use 11.22.33.34 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?

share|improve this question

migrated from stackoverflow.com Oct 25 '10 at 19:43

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

2 Answers 2

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.

share|improve this answer

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 11.22.33.34 will add your new default route

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

share|improve this answer

Your Answer

 
discard

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