From owner-freebsd-questions Sat Dec 12 01:49:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA07199 for freebsd-questions-outgoing; Sat, 12 Dec 1998 01:49:06 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from proxy1.ihlas.net.tr ([208.14.6.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA07194 for ; Sat, 12 Dec 1998 01:49:03 -0800 (PST) (envelope-from atilay@ihlas.net.tr) Received: from mail.ihlas.net.tr ([195.174.87.203]) by proxy1.ihlas.net.tr (Post.Office MTA v3.1.2 release (PO205-101c) ID# 0-0U10L2S100) with ESMTP id AAA215 for ; Fri, 11 Dec 1998 23:48:55 +0200 Received: from ABID by mail.ihlas.net.tr with SMTP (Microsoft Exchange Internet Mail Service Version 5.0.1460.8) id YHLMLN36; Sat, 12 Dec 1998 11:55:18 +0200 Message-ID: <36723CA7.15C961BA@ihlas.net.tr> Date: Sat, 12 Dec 1998 11:51:35 +0200 From: Abid Atilay X-Mailer: Mozilla 4.06 [en] (WinNT; I) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: Rule-based gateway selection Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I have a problem and need your help. Would you please help me. I want to make rule-based gateway selection. My internal network is connected to a FreeBSD-current box and it has three ethernet cards. First ethernet card is for internal network, second ethernet card is attached to provider A's router and the third one is attached to provider B's router. All of my machines' default gateway is FreeBSD box and its default gateway is provider A's router. But I want to use provider B's router as default gateway for some of the machines. I used ipfw's fwd action but couldn't success. |------| x.x.x.a | |Router|---------| x.x.x.b | internet --| A | | fxp2 |-------| | |______| |---------|FreeBSD| z.z.z.254|Internal | 3.0 |----------|Network |---------|Current| fxp0 | | y.y.y.d |_______| |z.z.z.1 |------| y.y.y.c | fxp1 |z.z.z.250 |Router|---------| | internet --| B | |______| For example z.z.z.1 - z.z.z.100 will use x.x.x.a and z.z.z.101 - z.z.z.250 will use y.y.y.c to access internet. FreeBSD box's default gateway is x.x.x.a and (so) all of the machines in the internal network use x.x.x.a to access the internet. How can I use ipfw fwd to route some of the machines to y.y.y.c or is there any other way to do this? I use a test rule like this: #!/bin/sh ipfw add 100 fwd y.y.y.c all from z.z.z.0:255.255.255.0 to any in via fxp0 ipfw add 200 pass all from any to any These rules can't help me and nobody can reach internet if I don't delete rule 100. Thank you very much. Best Regards, Abid Atilay To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message