🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.openbsd-pf
Article #96

Re: NAT out to two DSL modems

#96
From: elerdin
Date: Tue, 23 Aug 2011 09:56
51 lines
3259 bytes
On 20 Lug, 10:15, rogo...@gmail.com (Ben Harper) wrote:
> Thanks!
>
> On Tue, Jul 19, 2011 at 4:42 PM, Stuart Henderson <s...@spacehopper.org>wrote:
>
>
>
>
>
>
>
> > On 2011/07/19 06:49, Ben Harper wrote:
> > > Hi,
> > > I'm trying to NAT out to two DSL modems.
> > > I have three network cards on three subnets:
> > > re0: 192.168.4.0/24         Internal
> > > re1: 41.134.100.222/29    DSL_A
> > > re2: 10.10.10.5/24           DSL_B
>
> > > I can NAT out to either re1 or re2, but I have to make my default
> > > gateway point to the relevant gateway on that network.
> > > How can I tell the route tables or the nat-to command what the gateway
> > > machine is?
>
> > > So I can do this, but ***only if my default gateway is
> > > 41.134.100.217*** (which is the gateway for that net):
> > > pass out on re1 proto tcp from 192.168.4.0/24 to any nat-to re1
>
> > > Likewise, I can do this, but once again, ***only if my default gateway
> > > is 10.10.10.1*** (which is the gateway for that net):
> > > pass out on re2 proto tcp from 192.168.4.0/24 to any nat-to re2
>
> > > I believe I should be able to make this work without ANY default
> > > gateway. But then where do I tell the system
> > > what these two gateway machines are?
>
> > You need *A* default gateway, but it doesn't matter which you choose.
> > Then use "route-to {41.134.100.217@re1, 10.10.10.1@re2}" to redirect
> > traffic and nat-to rules for outbound traffic on the relevant interfaces.
> > You also need similar tricks with reply-to if you want to accept
> > incoming traffic and make sure replies go out the correct interface.

I have the same problem, but my one of my internet connection has
static ip and gateway, the other has dynamic ip, this solution work
for me too?

Thanks, Elerdin.
Technical Details
Message-ID: <57afd437-703d-4a27-9ebf-8f219b437044@a12g2000yqi.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!a12g2000yqi.googlegroups.com!not-for-mail
References: <20110719144200.GJ17257@symphytum.spacehopper.org> <CAMKhK9Ts5fFaki23DxNmzd1+jtPprrev3tdeMDUaejpRTvR6uQ@mail.gmail.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: ff4ef,c6212e92901498ac
X-Google-NewGroupId: yes
X-Google-Attributes: gidbffa70e3,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!a12g2000yqi.googlegroups.com!not-for-mail
From: elerdin <elerdin@gmail.com>
Newsgroups: bit.listserv.openbsd-pf
Subject: Re: NAT out to two DSL modems
Date: Tue, 23 Aug 2011 02:56:48 -0700 (PDT)
Organization: http://groups.google.com
Lines: 51
Message-ID: <57afd437-703d-4a27-9ebf-8f219b437044@a12g2000yqi.googlegroups.com>
References: <20110719144200.GJ17257@symphytum.spacehopper.org> <CAMKhK9Ts5fFaki23DxNmzd1+jtPprrev3tdeMDUaejpRTvR6uQ@mail.gmail.com>
NNTP-Posting-Host: 195.212.29.178
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1314093775 5000 127.0.0.1 (23 Aug 2011 10:02:55 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 23 Aug 2011 10:02:55 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a12g2000yqi.googlegroups.com; posting-host=195.212.29.178; posting-account=_SOCYwoAAAAUStjBb91Vs7QPmf1MN__O
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HUARELSCNK
X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like
 Gecko) Ubuntu/11.04 Chromium/15.0.855.0 Chrome/15.0.855.0 Safari/535.2,gzip(gfe)