Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-27-2008, 10:24 AM   #1
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 329

Rep: Reputation: 30
Iptables, two internet connections, VPN + two local networks.


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?


Old 12-31-2008, 12:06 PM   #2
LQ Newbie
Registered: Dec 2008
Distribution: Debian
Posts: 8

Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two networks with two internet connections on same machine. lhrimunda Linux - Networking 4 08-21-2008 08:38 AM
Want to see VMWare client connections through local IPTables SlowCoder Linux - Security 0 05-09-2008 01:45 PM
mobile internet provider, proxy server and vpn networks nass Linux - Networking 3 04-17-2008 11:18 PM
iptables and VPN connections lucifercipher Linux - Networking 2 04-05-2005 09:43 AM
2 networks and 2 internet connections on linux router seer_tenedos Linux - Networking 6 03-27-2005 07:24 AM > Forums > Linux Forums > Linux - Networking

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration