On Thu, 15 Feb 2007 01:08:28 +0000, Jamie Penman-Smithson wrote:

>On 15/02/07, Stuart Henderson <[EMAIL PROTECTED]> wrote:
>> > I'm attempting to setup openbsd 4.0 as a router, the system has two
>> > interfaces, rl0 and rl1. It looks something like this (apologies if
>> > this looks really odd):
>> >
>> > router [x.x.58.129] --- router2: rl0 [x.x.58.130]
>> >                                        router2: rl1 [x.x.58.140] ---
>>
>> Not so much odd as lacking information. Post ifconfig output instead.
>> Presumably the OpenBSD box is 'router2', though you don't actually say.
>
>Yes, router2 is the OpenBSD box.
>
That ain't gonna work.

Your configuration of the two nics on router2 is wrong.

My guess is that you have a routed subnet supplied by your ISP and that
you have taken the first usable one (xx.xx.58.129) and used it on the
LAN i/f of your (ADSL?) modem.

Router 2 now gets .130 on its rl0 and that's fine but you have applied
.140 to rl1 and both interfaces are in the same network:
xx.xx.58.128/28. You cannot do that and expect routing to work in r2.

2 ways (maybe more possible but I don't have all day 8-) ) to get
around it.

1> alias ALL of your IPs except .129 onto rl0 and then use RFC1918
addrs on rl1 and its attached hosts. You can then rdr or binat them to
the correct addresses on rl0.

2> You can use a pair of RFC1918 IPs on the modem and rl0, static route
the /28 to rl0, configure rl1 to use .129 and hang all (up to 13) hosts
on a LAN there.

Case 2 requires tricky NATting and pf rules but I have done it several
times and it just works but your original post makes me think you'd
need a few more clues first. 
So go with #1 for an easier life.

Any replies/questions on list please. Offlist replies >/dev/null
Rod/

>From the land "down under": Australia.
Do we look <umop apisdn> from up over?

Reply via email to