LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Iptables, two internet connections, VPN + two local networks. (https://www.linuxquestions.org/questions/linux-networking-3/iptables-two-internet-connections-vpn-two-local-networks-693265/)

dlublink 12-27-2008 10:24 AM

Iptables, two internet connections, VPN + two local networks.
 
Hello,

My server now has 2 internet connections ( actually only two pppoe connections over the same copper line ) two local networks ( just two cheap switches from worstbuy ) and a VPN server ( which gives me another network interface).

We'll call things as follows :

Internet Connection 1 : ppp0
Internet Connection 2 : ppp1
Home network 1 : eth0
Home network 2 : eth1
VPN : tun0

( There is also eth2 which is connected to the modem via which ppp0 and ppp1 are connected, but this does not matter).

I want eth0 to be natted out on ppp0 and eth1 to be natted out on eth1. I want the eth0, eth1 and tun0 to be routed together.

Currently, I have this setup with the difference being that both eth0 and eth1 go out on ppp0. I have the routing between the three networks working well. ( it's really easy in linux ).

Does anyone know of a tutorial that has the information I need to do this setup?

Thanks,

David

tdetre 12-31-2008 12:06 PM

I think what you want is source policy routing. Here is a link to the policy routing part of the Linux Advanced Routing & Traffic Control HOWTO.

http://lartc.org/howto/lartc.rpdb.ht...TC.RPDB.SIMPLE


All times are GMT -5. The time now is 09:36 AM.