I have an Ubuntu 16.04 server running with multiple ethernet cards all connected to the internet with distinct IP addresses. I want to configure specific user to use specific card so that they will have different IP publicly. How can I set that up? The closest thing I can find is to do SourceBasedRouting but I am not sure if I am on the right track.
Asked
Active
Viewed 209 times
2
-
1I believe this to be hard. What kind of use will have your two users? Some software have switches to specify the source IP (and hence the network card) to use if multiple ones. `iptables` has an `owner` extension to be able to match packets depending on the uid that created them. You can also look at Linux `netns` capabilities to run as many separate network stacks as needed, like one per user in your case. Even further you may try to have each of your user in a separate VM/container on the same box, you will then have easier control on network configuration. – Patrick Mevzek Nov 26 '17 at 01:29
-
I want to provide some sorts of anonymous browsing to users. The outgoing IP address could vary depending on users. – ChromeHearts Jun 20 '18 at 21:20
-
If you can do it with IPv6 it would be simpler due to the amount of different IPv6 the host will have by default and the mechanism of short lived IPv6, see https://tools.ietf.org/html/rfc4941 ; Unfortunately not the whole Internet runs on IPv6 yet... Also I am not sure to understand your use case, if you want "anonymous" browsing there should **not** be a 1-1 mapping from user to IP on the contrary the IP used for each user should be random and even changing for each new connection. – Patrick Mevzek Jun 20 '18 at 21:32