From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.2.5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=FRla0FWnldWuicy6SIfvUvVyjaWMDSvESLB98AMXzHg=; b=e/UE1wXZziUxX0vRQfB2VuTx87I3svX8+5v8KhMIz820pEDohwH5XR+s+KueU+Bg1w QSDeVCjHdmOU7SyKD3F5OMzZbzxZhLd/rPGsgrZIcRFsTVyqqq5lGbkX4NK7YHaCncaa lvusxdDYTJvvjTXMlF8eRNN4SIkpn14dVgK80= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=MOEJ3royqA+hDcX8vG3S6dvdyUKSriUFJe/wy38c7KAVSgrq1uf640N+xVsUt0hGVs AZRRewNiFQkbhZW5gYCqMEHOIZ/uWddevyGjPpM2ZxQBEifdLmy4o5fMe5DkW+h2kIoS A7UIv59JQXa0urJU5RhgGLcbTCjnSBt8n1d4o= Date: Tue, 14 Apr 2009 15:37:27 +0400 From: Maks Re To: sysadmins@lists.altlinux.org Message-ID: <20090414153727.572eedb5@lynx> In-Reply-To: <200904141048.15485.a_s_y@sama.ru> References: <200904112033.47447.a_s_y@sama.ru> <49E2E257.1090303@mmascience.ru> <200904141048.15485.a_s_y@sama.ru> X-Mailer: Claws Mail 3.6.1cvs5 (GTK+ 2.12.12; i586-alt-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Sysadmins] bridge & iptables MASQUERADE X-BeenThere: sysadmins@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux sysadmin discuss List-Id: ALT Linux sysadmin discuss List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 11:38:07 -0000 Archived-At: List-Archive: =D1=83 =D0=BC=D0=B5=D0=BD=D1=8F =D0=BF=D0=BE=D1=85=D0=BE=D0=B6=D0=B0=D1=8F = =D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D0=B0. =D0=BA=D0=B0=D0=BA =D0=B1= =D0=BE=D1=80=D0=BE=D1=82=D1=8C=D1=81=D1=8F =D0=BD=D0=B5 =D0=BF=D0=BE=D0=BD= =D1=8F=D0=BB =D0=BD=D0=B0 =D0=B3=D0=B5=D0=B9=D1=82=D0=B5: =D0=B4=D0=B2=D0=B0 =D1=84=D0= =B8=D0=B7=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D1=85 =D0=B8=D0=BD=D1=82=D0= =B5=D1=80=D1=84=D0=B5=D0=B9=D1=81=D0=B0 (wan, lan). =D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD br0 =D0=B8 =D0=BA =D0=BD=D0=B5=D0=BC= =D1=83 =D0=BF=D1=80=D0=B8=D0=B2=D1=8F=D0=B7=D0=B0=D0=BD lan =D0=B2=D1=8B=D1=85=D0=BE=D0=B4 =D0=B2 =D0=B8=D0=BD=D0=B5=D1=82 - =D0=BF=D0= =BE=D0=B4=D0=BD=D0=B8=D0=BC=D0=B0=D0=B5=D1=82=D1=81=D1=8F ppp0 (pptp) =D1= =87=D0=B5=D1=80=D0=B5=D0=B7 wan (=D1=83 =D0=BC=D0=B5=D0=BD=D1=8F =D0=BA=D0= =BE=D1=80=D0=B1=D0=B8=D0=BD=D0=B0) =D0=B4=D0=B5=D0=BB=D0=B0=D1=8E =D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0 = =D0=BC=D0=B0=D1=81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B1=D0=BE=D1=82=D0=B0=D1=82=D1=8C =D0=BF=D0=BE=D1=87=D1=82=D0=BE=D0=B2=D0=B8=D0=BA =D0=BD=D0=B5 =D0=BC=D0=BE= =D0=B6=D0=B5=D1=82 =D0=BF=D0=BE=D0=BA=D0=B0 =D0=BD=D0=B5 =D0=BF=D0=BE=D0=BB= =D1=83=D1=87=D0=B8=D1=82 =D0=BE=D1=82=D0=B2=D0=B5=D1=82, =D0=B0 =D0=BE=D1= =82=D0=B2=D0=B5=D1=82=D0=B0 =D0=BD=D0=B5=D1=82=D1=83... =D0=BC=D0=B0=D1=88=D0=B8=D0=BD=D0=BA=D0=B0 - =D0=B1=D1=80=D0=B0=D0=BD=D1=87= 5.0 =D1=8F=D0=B4=D1=80=D0=BE - 2.6.27-ovz-smp-alt3 > On Monday 13 April 2009, =D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80= wrote: >=20 > > > =D0=9D=D0=B0=D1=82=D0=BA=D0=BD=D1=83=D0=BB=D1=81=D1=8F =D0=BD=D0=B0 = =D0=BD=D0=B5=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=83=D1=8E =D0=BD=D0=B5=D0=BF= =D1=80=D0=B8=D1=8F=D1=82=D0=BD=D1=83=D1=8E =D0=BE=D1=81=D0=BE=D0=B1=D0=B5= =D0=BD=D0=BD=D0=BE=D1=81=D1=82=D1=8C =D1=8F=D0=B4=D1=80=D0=B0 =D0=B8 =D1=85= =D0=BE=D1=82=D0=B5=D0=BB=D0=BE=D1=81=D1=8C =D0=B1=D1=8B > > > =D0=BD=D0=B0=D0=B4=D0=B5=D1=8F=D1=82=D1=8C=D1=81=D1=8F, =D1=87=D1=82= =D0=BE =D1=8D=D1=82=D0=BE =D0=B1=D0=B0=D0=B3, =D0=B0 =D0=BD=D0=B5 =D1=84=D0= =B8=D1=87=D0=B0. =D0=A5=D0=BE=D1=82=D0=B5=D0=BB=D0=BE=D1=81=D1=8C =D0=B1=D1= =8B =D1=80=D0=B0=D0=B7=D0=BE=D0=B1=D1=80=D0=B0=D1=82=D1=8C=D1=81=D1=8F. =D0= =98=D1=82=D0=B0=D0=BA, > > > =D0=B8=D0=BC=D0=B5=D0=B5=D0=BC=20 > =20 > > > =D0=98 =D0=B2=D0=BE=D1=82 =D0=BA=D0=B0=D0=B6=D0=B5=D1=82=D1=81=D1=8F = =D0=BC=D0=BD=D0=B5, =D1=87=D1=82=D0=BE =D1=82=D0=B0=D0=BA=D0=B8 =D1=8D=D1= =82=D0=BE =D0=BA=D0=B0=D0=BA=D0=B0=D1=8F-=D1=82=D0=BE =D0=B1=D0=B0=D0=B3=D0= =B0 =D0=B2=D1=81=D1=91-=D1=82=D0=B0=D0=BA=D0=B8, =D0=B0 =D0=BD=D0=B5 =D1=84= =D0=B8=D1=87=D0=B0. > > > 2.6.18-ovz-smp-alt24. =D0=9A=D1=82=D0=BE =D1=87=D1=82=D0=BE =D0=B4=D1= =83=D0=BC=D0=B0=D0=B5=D1=82 ? > =20 > > =D0=9F=D1=80=D0=BE=D1=81=D1=82=D0=BE bridge =D0=BD=D0=B5 =D0=B0=D0=BF= =D0=BF=D0=B0=D1=80=D0=B0=D1=82=D0=BD=D1=8B=D0=B9, =D0=B0 =D1=8D=D0=BC=D1=83= =D0=BB=D0=B8=D1=80=D1=83=D0=B5=D1=82=D1=81=D1=8F =D0=BD=D0=B0 =D1=83=D1=80= =D0=BE=D0=B2=D0=BD=D1=8F=D1=85 ISO/OSI =D0=B2=D1=8B=D1=88=D0=B5 > > 2 level, =D1=87=D1=82=D0=BE =D0=BD=D0=B5=D0=BE=D0=B1=D1=85=D0=BE=D0=B4= =D0=B8=D0=BC=D0=BE =D1=83=D1=87=D0=B8=D1=82=D1=8B=D0=B2=D0=B0=D1=82=D1=8C. = =D0=A2=D0=B0=D0=BA =D1=87=D1=82=D0=BE, =D0=BD=D0=B8 =D0=B2=D0=B0=D1=88=D0= =B8=D0=BC, =D0=BD=D0=B8 =D0=BD=D0=B0=D1=88=D0=B8=D0=BC, > > =D0=BF=D1=83=D1=81=D1=82=D1=8C =D1=8D=D1=82=D0=BE =D0=B1=D1=83=D0=B4=D0= =B5=D1=82 "=D1=81=D0=BF=D0=B5=D1=86=D0=B8=D1=84=D0=B8=D0=BA=D0=B0".=20 >=20 > =D0=90 =D0=BE=D0=BD=D0=BE =D0=B4=D0=B0=D0=B6=D0=B5 =D0=BE=D0=BF=D0=B8=D1= =81=D0=B0=D0=BD=D0=BE. =D0=A2=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE =D1=8D=D1=82=D0= =BE=D1=82 =D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80 =D1=81 iptables =D0=B2 =D0= =BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B8 ebtables > =D0=BF=D0=BE=D1=87=D0=B5=D0=BC=D1=83-=D1=82=D0=BE: http://ebtables.source= forge.net/br_fw_ia/br_fw_ia.html >=20 > The catch is in the first line. Because the iptables code gets > executed for both bridged packets and routed packets, we need to make > a distinction between the two. We don't really want the bridged > frames/packets to be masqueraded. >=20