Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2002 23:28:51 -0500
From:      "Tien Duc Nguyen" <>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   tri-homed gateway source routing questions
Message-ID:  <00ea01c2b085$202ec470$011ea8c0@intrusion>

Next in thread | Raw E-Mail | Index | Archive | Help

I know this topic has been answered numerous times, but the responses i've
gathered doesn't seem to help me
in making my gateway machine route properly.

Here's my setup:

Internet --------ADSL modem -----------rl0-- freebsd
gateway --rl1( ----switch1 private 192.168.0.x
                         --rl2 ( private 192.168.1.x
                         --rl3 ( private

My ISP has given to block of public IPs, say a.b.c.2 to a.b.c.5 with a
netmask of and gateway of
a.b.c.1 and d.e.f.3 to d.e.f.20 with a netmask of and
gateway of d.e.f.1

on the gateway rl0, i have set up the main ip as a.b.c.2, with the netmask and the gateway a.b.c.1 as the default gateway, moreover i
have binded to rl0 as aliases the rest of the ips

i have "nated" all the machines in network 192.168.0.x with no problem as
per the freebsd docs, but i'm encountering
problem  in making a machine in 192.168.1.x use a public ip (aliased on
rl0), be it a.b.c.x or d.e.f.x

i didn't have any problem for the 192.168.0.x network, i used static nat
with a redirect_address directive
specifically redirect_address a.b.c.5 for example,
default gateway being

what i want to achieve is this: for traffic coming from and
going through rl2, route it through rl0 as d.e.f.10 transparently (inbound
and outbound)

is this possible with the forward command of ipfw?
i have added this to my firewall rule, right after the nat divert rules, but
to no avail: add forward d.e.f.1 ip from to any out via rl0

thanks for any help

tien duc

To Unsubscribe: send mail to
with "unsubscribe freebsd-questions" in the body of the message

Want to link to this message? Use this URL: <$202ec470$011ea8c0>