How to dynamically bind PPTP connection's uplink?

What I’m trying to archive is:

  1. The ros box has multiple PPPoE uplink interfaces, say one of the uplink interface hold IP 10.9.9.5. Every uplink is isolated from other uplinks.
  2. The ros box is also a PPTP server, PPTP server IP is 10.8.8.4, PPTP connection IP at side server is 192.168.111.5
  3. A PPTP client connects to the PPTP server, and get IP 192.168.111.6
  4. When a client establishes PPTP connection, I want to dynamically bind 192.168.111.5 to uplink 10.9.9.5. (When the other client connects, the bind to the other uplink).

Any tip/hint will be highly appriciated.

I have figured out a solution. Use mangle to do source based routing.

I am just thinking that policy based routing will solve your problem here. So all traffic from one specific pptp connection uses a route table while the one from the other pptp connection uses another route table. Give it a try.