PDA

View Full Version : Linux Is it possible to do this on Linux?



KFlint
08-28-2007, 01:25 AM
Hi,

I'm having the following situation on my linux server and don't know how to fix it

I have 3 users that log on remotly to the server using TightVNC.

My server has one network card but three different IPs available.

So far, i've configure the server to respond to the primary IP and the two aliases by configuring the eth0 interface.

But i would like to bind one IP to one user, the other Ip to another one etc... so they would all appear like having different IP while browsing the web with firefox for example.

Is it something possible? i have no clue how to do it after looking for that for a while. I managed to bind specific IP in utorrent without problem though, this is just a variable to fill.

Thx for the help, i'm sure there is a Linux god out there to help me :D

KFlint
08-30-2007, 05:00 PM
Had my answer on a linux forum, thx anyway!

zapjb
08-30-2007, 05:43 PM
So what is the answer?

KFlint
08-30-2007, 09:20 PM
the way i found is by using iptables

you can NAT the ip address of each outgoing packet to a certain IP address and that, by user id.

Exactly, what i wanted to do

that would be something like that :

iptables -t nat -A POSTROUTING -m owner --uid-owner 1100 -j SNAT --to 192.168.100.100

easy to do ain't it? :)

dbmp
08-31-2007, 01:24 AM
the way i found is by using iptables

you can NAT the ip address of each outgoing packet to a certain IP address and that, by user id.

Exactly, what i wanted to do

that would be something like that :

iptables -t nat -A POSTROUTING -m owner --uid-owner 1100 -j SNAT --to 192.168.100.100

easy to do ain't it? :)

No... :P Linux is hard work... That's why like it. :)

KFlint
08-31-2007, 01:40 AM
linux is great fun :D