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?


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: http://lartc.org/howto/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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