From owner-freebsd-pf@FreeBSD.ORG Tue Nov 20 10:22:54 2012 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31802230 for ; Tue, 20 Nov 2012 10:22:54 +0000 (UTC) (envelope-from hoomanfazaeli@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id EAE398FC08 for ; Tue, 20 Nov 2012 10:22:53 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id wz12so4366562pbc.13 for ; Tue, 20 Nov 2012 02:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=H2AZIAsQCodyLYZ9ta8nxXEFvzcAuf1d982NavfKwvg=; b=u66KBVjPi0WVZoHNyfU1ZGnHKQz0Yk6zstHXyjnyIrDumi5zsm4LQlMcLBTqVNkuQS SZOQRHVpFhKJVV2m/4XebKBtC5cwCLvKUg+TRSgjByq8BWfGuITGcgYJPwVUJ3h0DCm0 7j3LZh7Fr/jNQmKbFeenQPo7XzsYX0tBiTVKY5wUJpva/q0dx16/w0PDcGwSocrlgjaN DehbtqRF7ABuSjxGxWWBifossh+C0YfuF1m2CQxfQI3RQbjuFKiujI78cKxjltevcjNp O6RYAOqZmaUoSrCxMTn77tgiQv0FtupGYPfGJZj2+IY4DReXwLgk39MQVyegADOjqAnJ kdIg== Received: by 10.68.135.200 with SMTP id pu8mr47940133pbb.27.1353406973370; Tue, 20 Nov 2012 02:22:53 -0800 (PST) Received: from [192.168.1.240] ([2.176.178.63]) by mx.google.com with ESMTPS id gl9sm7853520pbc.51.2012.11.20.02.22.50 (version=SSLv3 cipher=OTHER); Tue, 20 Nov 2012 02:22:52 -0800 (PST) Message-ID: <50AB59F3.6070208@gmail.com> Date: Tue, 20 Nov 2012 13:52:43 +0330 From: Hooma Fazaeli User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Cpet Services , freebsd-pf@freebsd.org Subject: Re: WAN load balance with PF References: <3908090977629100732@unknownmsgid> In-Reply-To: <3908090977629100732@unknownmsgid> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2012 10:22:54 -0000 On 11/20/2012 01:24 ?.?, Cpet Services wrote: > http://forums.freebsd.org/showthread.php?t=30409 might help you. also > possibly with carp? > *From:* Hooman Fazaeli > > *Sent:* November 20, 2012 1:15 AM > *To:* freebsd-pf@freebsd.org > *Subject:* WAN load balance with PF > With a topology like: > ----- ADSL 1 > LAN ---- PF Box ----- Switch | > ----- ADSL 2 > > Is there a way to NAT and distribute LAN to internet traffic on the two > ADSL links apart from adding a third NIC to PF box? > _______________________________________________ > freebsd-pf@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-pf > To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org > " If we could connect both ADSl modems to the box, a config like below would work: lan_if = "em0" wan_if1 = "em1" wan_if2 = "em2" nat on $wan_if1 from $lan_if1:network to any -> $wan_if1 nat on $wan_if2 from $lan_if1:network to any -> $wan_if2 pass in on $lan_if route-to {($wan_if1 $wan_ip1) ($wan_if2 $wan_ip2)} pass all our problem is that since both WAN links are connected to the same interface (via the switch) there is no way to distinguish between the two in NAT rules. Any idea?