Linux question with multiple IPs and users

silverpig

Lifer
Jul 29, 2001
27,703
12
81
Okay, so I'm going to be getting a dedicated webserver with 8 IP addresses. I would like to have a few users on the server, who can each run a program. I would like it so that each user gets his own IP address.

Basically I want to install a client program on my server (say an ftp client). Now I want to allow two users (joe and frank say) to be able to log in to this server and each run an instance of the ftp client. I would like for each of them to be able to connect to some ftp site, but for joe's ip to show up differently from franks. How would I go about doing this? I can set up multiple IPs per interface as an eth0 and eth0:1 type thing, but how to I set each user's program to use a specific interface?
 

TonyRic

Golden Member
Nov 4, 1999
1,972
0
71
Maybe I am missing your reason for this but, why do you care? lol

But, to answer your question, this would have to be done through the applications config if it supports binding to a specific ip or interface or through xinetd if it is a supported server and it wouldn't be trivial to do this. As you would have to restrict users from each others IP (no need since they are on the same machine). If what you are trying to do is to keep each user from getting to each others content, then use permissions, you will be better off and it will be easier to set up.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
What are you trying to accomplish? There is probably a better way of going about doing it... Maybe. :)
 

cquark

Golden Member
Apr 4, 2004
1,741
0
0
Originally posted by: silverpig
Okay, so I'm going to be getting a dedicated webserver with 8 IP addresses. I would like to have a few users on the server, who can each run a program. I would like it so that each user gets his own IP address.

Basically I want to install a client program on my server (say an ftp client). Now I want to allow two users (joe and frank say) to be able to log in to this server and each run an instance of the ftp client. I would like for each of them to be able to connect to some ftp site, but for joe's ip to show up differently from franks. How would I go about doing this? I can set up multiple IPs per interface as an eth0 and eth0:1 type thing, but how to I set each user's program to use a specific interface?

Why exactly do you want them to have their own IP addresses? You don't need them for authentication if the users are going to be logging into your server as you suggest above.

If you want to completely separate your users, what you want is to give each of them a UML virtual machine, each with its own IP address, virtual filesystem, and so forth.