Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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/

share|improve this answer
    
The OP is asking how to force SSH traffic with a specific source address per-user, not how to add more IPs to his NIC. He already has that. –  Charles Hooper Oct 28 '10 at 5:37

Your Answer

 
discard

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

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