Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Travel router part 2A - NAT



On 2018-09-02 10:11 AM, Robert Swindells wrote:
> 
> D'Arcy Cain <darcy%NetBSD.org@localhost> wrote:
>> On 2018-09-02 09:34 AM, D'Arcy Cain wrote:
>>> Some of you may remember that I was trying to set up a NetBSD machine to
>>> do all of my routing in my trailer while we travel.  I hit a snag when
>>
>> So, basic on my new setup is mostly working but I can't seem to get NAT
>> working at all.  I am trying to use NPF which I am not too familiar with
>> but the docs seem pretty clear.  Here is my npf.conf.  Can some NPF
>> experts check this out please.  Ta.
> 
> Try reloading the ruleset:
> 
> # npfctl reload
> 
> Before doing this, you could check on what rules it was using by
> doing:
> 
> # npfctl show
> 
> You may find that the npf startup script has been run before the
> pppoe(4) negociation had finished. This can mean that your $ext_if
> rule variable just contains 0.0.0.0 so the rules won't work.

That wasn't quite it but it did lead me to the fix.  I was mapping to
the re0 interface.  I needed to map to the pppoe0 interface.  When I did
"npfctl show" I saw "map re0 dynamic any -> 0.0.0.0 ...etc".  As soon as
I changed the ext_if variable to pppoe0 it worked.

Thanks.

-- 
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/ IM:darcy%Vex.Net@localhost


Home | Main Index | Thread Index | Old Index