virtual switch with ppp connections
I have setted up a VPN server (with pptpd).
And now I want to make a virtual switch with 2 or more PPP connections.
For example
------------
ppp0 - ip 192.168.0.1
ppp1 - ip 192.168.0.2
ppp2 - ip 192.168.0.3
ppp3 - ip 192.168.0.4
(The ip addresses are fixed (so user1 has ip 192.168.0.1, user2 192.168.0.2, ...) but I don't know what ppp number they will have, because if user2 logs in first then he get ppp0.)
ppp0 need to be connected to ppp2, so all traffic that comes from ppp0 goes directly to ppp2.
I made some rules with iptables, that works fine when we stay in the same ip-range. But it can be that the traffic that goes from ppp0 to ppp2 has a different range than the ip address from the ppp connection (for example 192.168.1.x)
So I like to use my vpn server as 'switch' between 2 (or more) networks:
network 1 <---> VPN client <--.internet.--> VPN server <--.internet.--> VPN client <---> network 2
Can someone help me with the configuration?
|