Date: Sat, 12 Dec 1998 11:51:35 +0200 From: Abid Atilay <atilay@ihlas.net.tr> To: freebsd-questions@FreeBSD.ORG Subject: Rule-based gateway selection Message-ID: <36723CA7.15C961BA@ihlas.net.tr>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36723CA7.15C961BA>