From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Krepper Guillermo" Date: Wed, 18 Apr 2001 11:27:09 +0000 Subject: [LARTC] I need some advise from a routing Guru !! MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00FD_01C0C7E1.5C1AC080" Message-Id: List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_00FD_01C0C7E1.5C1AC080 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, let's get to bussisnes ... This is what I have = +--------------------------+ eth0 ----------------- | = | | LINUX = | ---------------- eth1 eth2 ----------------- | = |=20 | SUPER | = ---------------- eth4 eth3 ----------------- | = | | ROUTER | = +--------------------------+ Internet Connections: eth0: 200.1.1.0/24 eth2: 200.2.1.0/24 eth3: 200.3.1.0/24 =20 from 3 diferent carriers Private LAN: eth1: NAT --> 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 Internet Services (DNS, WEB, MAIL, etc) First of all I'll say that Traffic Controller works 10 points !!!!! Routing is doing ok, but I'm not shure if it's here were I'm making all = the trouble. So here is how I do it. ip rule add from 192.168.1.0/24 table 1 ip route add 192.168.1.0/24 via 192.168.1.254 dev eth1 table 1 = ( so machines can ping eachother ) ip route add default via 200.1.1.254 dev eth0 ip rule add from 192.168.2.0/24 table 2 ip route add 192.168.2.0/24 via 192.168.2.254 dev eth1 table 1 = ( so machines can ping eachother ) ip route add default via 200.1.2.254 dev eth2 ip rule add from 192.168.3.0/24 table 3 ip route add 192.168.3.0/24 via 192.168.1.254 dev eth1 table 1 = ( so machines can ping eachother ) ip route add default via 200.1.3.254 dev eth3 I think this is ok, it worked, but ....... Well here is my problem on eth4 I would like to put a dns, httpd, smtp, = pop and a proxy. All of this have IP that are part of (eth0).=20 DNS1 =3D 200.1.1.1 DNS2 =3D 200.1.1.2 I made all connections work with this DNS but when someone querys the = dns, the paket goes to the Internet an then comes back. Is there a way = of redirecting or routing it to eth0 before it goes to take a trip? I tested with iptables DNAT, ip route add 200.1.1.1/36 dev eth4 ..... = and did not work.=20 Can somebody give me an advise or a clue on how should I do something = like this? an with the proxy? how can I specify on witch eth to go out = depending from where it came from TOS Mark? I olso would like a recomendation on some good books, please. That's all folks,=20 well thank you verry much for the advise. Krepper Guillermo (Billy) ------=_NextPart_000_00FD_01C0C7E1.5C1AC080 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi, let's get to bussisnes = ...
This is what I have
 
       =20             =    =20             &= nbsp;          =20 +--------------------------+
          &nbs= p;            = ;=20 eth0 -----------------=20 |            =             &= nbsp; =20 |
          &nbs= p;            = ;            =             &= nbsp; |       =20 LINUX          |=20 ---------------- eth1
          &nbs= p;            = ;=20 eth2 -----------------=20 |            =             &= nbsp;  | 
          &nbs= p;            = ;            =             &= nbsp; |       =20 SUPER        | ----------------=20 eth4
          &nbs= p;            = ;=20 eth3 -----------------=20 |            =             &= nbsp;  |
          &nbs= p;            = ;            =             &= nbsp;=20 |        ROUTER   =    |
          &nbs= p;            = ;            =             &= nbsp;=20 +--------------------------+
 
 
Internet Connections:
    eth0: = 200.1.1.0/24
    eth2: = 200.2.1.0/24
    eth3:=20 200.3.1.0/24          &= nbsp;        =20
    from 3 diferent=20 carriers
 
Private LAN:
    eth1: NAT -->=20     192.168.1.0/24
       =20             =    =20      192.168.2.0/24
          &nbs= p;            = ;     =20 192.168.3.0/24
 
Internet Services (DNS, WEB, MAIL,=20 etc)
 
First of all I'll say that Traffic = Controller works=20 10 points !!!!!
 
Routing is doing ok, but I'm not shure = if it's here=20 were I'm making all the trouble. So here is how I do it.
 
ip rule add from 192.168.1.0/24 table=20 1
    ip route add = 192.168.1.0/24 via=20 192.168.1.254 dev eth1 table 1        =20     ( so machines can ping eachother )
    ip route add default via 200.1.1.254 dev = eth0
 
ip rule add from 192.168.2.0/24 table=20 2
    ip route=20 add 192.168.2.0/24 via 192.168.2.254 dev eth1 table 1     =         ( so machines can ping eachother = )
    ip route add default via 200.1.2.254 dev=20 eth2
 
ip rule add from 192.168.3.0/24 table=20 3
    ip route add = 192.168.3.0/24 via=20 192.168.1.254 dev eth1 table 1        =20     ( so machines can ping eachother )
    ip route add default via 200.1.3.254 dev=20 eth3
 
 
I think this is ok, it worked, but=20 .......
 
Well here is my problem on eth4 I would = like to put=20 a dns, httpd, smtp, pop and a proxy. All of this have IP that are = part of=20 (eth0).
DNS1 =3D 200.1.1.1    = DNS2 =3D=20 200.1.1.2
 
I made all connections work with this = DNS=20 but when someone querys the dns, the paket goes to the Internet an = then=20 comes back. Is there a way of redirecting or routing it to eth0 before = it goes=20 to take a trip?
I tested with iptables DNAT, ip route = add=20 200.1.1.1/36 dev eth4 ..... and did not work.
Can somebody give me an advise or a = clue on how=20 should I do something like this? an with the proxy? how can I specify on = witch=20 eth to go out depending from where it came from TOS Mark?
I olso would like a recomendation on = some good=20 books, please.
 
That's all folks,
 
 
       =20             =     well=20 thank you verry much for the advise.
 
Krepper Guillermo = (Billy)
 
 
 
------=_NextPart_000_00FD_01C0C7E1.5C1AC080-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/