I have a server A that is running OpenVPN server, and a server B connected to it. Then on B I have eth0, the physical interface, and tap0, created by OpenVPN. I want some ip to go with eth0 while others go with tap0. This has been successfully achieved by adding route rules with the 'route' command.
But there are more.
The server B is running a pptpd server with many clients. I want the clients to go with the same rule as described above. But I don't know how to configure it.
I was using iptables rules to redirect packages from pptp subnet (192.168.1.0/24) to eth0 when there is no tap0, and it worked well.
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
Now I have tap0 and I want some of the packages to go to tap0.
How should I do?