Is it possible to bind a specific user to a certain IP when using port forwarding (preferably dynamic) in SSH? I don't mind if it has to be done by the user, but by the server configuration would be preferred.
Basically what's happening is I have multiple addresses on the machine, one is the default eth0 (let's say 192.168.1.100) and another is eth0:1 (192.168.1.101). When I open a dynamic tunnel (ssh -D 1080 192.168.1.100
) from a remote machine, I'd like all my traffic to appear as if it's coming from .101
instead of the default .100
.
Is there any way of doing this short of going with a solution that binds an entire user to an IP? Or, potentially, configuring a local SOCKS application and just local forwarding to that port instead?
Best Answer
These links might help?
http://www.xenocafe.com/tutorials/linux/redhat/bind_multiple_ip_addresses_to_single_nic/index.php
http://www.cyberciti.biz/faq/bind-alias-range-of-ip-address-in-linux/