Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a network 192.168.0.*

Users have IPs - Ubuntu server has IP

There are 3 ADSL modems at IPs,,

I'd like to make gateway at all user computers (Ubuntu server) and server should do NAT according to rules:

  • source IP --> (Internet1)
  • source IP --> (Internet2)
  • source IP --> (Internet3)

I need that to:

  • calculate traffic by each user
  • easy modify routes without reconfiguring each computer
  • filter some bad sites

Is it possible?

share|improve this question

Yes, it can be done. Since you need source based routing. You cannot do it using simple route command. You would have to create multiple routing tables and create rules on which table should be used based on criteria (in your case source IP).

To learn about IP routing II you can refer to:

share|improve this answer

Your Answer


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.