From: Anton Farygin <rider@altlinux.com>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] bridge для одной машины
Date: Wed, 10 Oct 2007 10:55:22 +0400
Message-ID: <feht0u$tp8$1@sea.gmane.org> (raw)
In-Reply-To: <m3myuriodt.fsf@vvk.distance.ru>
Vladimir V. Kamarzin пишет:
>>>>>> On 10 Oct 2007 at 02:41 "AF" == Anton Farygin writes:
>
> AF> Есть такая картина:
> AF> [host1]<->network1(ethernet)<->[host2]<->network2(ethernet)
>
> AF> нужно что бы host1 был по факту прозрачно доступен из network2, но при
> AF> этом машины из сети network1 никаким образом не видели трафик сети network2.
>
> AF> Т.е. - бридж, но на одну машину (потом ещё одна добавиться).
>
> AF> br0 на host2 поднял, всё работает. Теперь собственно вопрос: как на
> AF> host2 запретить пропускать через bridge весь трафик с network2, за
> AF> исключением того, который адресован host1. И аналогично в обратную
> AF> сторону - запретить весь трафик из network1 в network2, за исключением
> AF> трафика от host1.
>
> AF> Я так понимаю, что это делается с помощью ebtables. Но вот правила
> AF> что-то никак придумать не могу. Может быть если у кого-то какие-то идеи
> AF> или опыт постройки такого извращения ?
>
> Да, нужно применить ebtables. Правила примерно такие:
>
> ebtables -P FORWARD DROP
>
> ebtables -A FORWARD -s "$mac" -p arp --arp-ip-src "$ip" -j ACCEPT
> ebtables -A FORWARD -s "$mac" -p IPv4 --ip-src "$ip" -j ACCEPT
>
> ebtables -A check-dst -p arp --arp-ip-dst "$ip" -j ACCEPT
> ebtables -A check-dst -p IPv4 --ip-dst "$ip" -j ACCEPT
>
> P.S. hiddenman кажется приделал поддержку ebtables в etcnet.
>
Понял, спасибо. Да, какая-то поддержка ebtables есть в etcnet, сейчас
буду смотреть.
next prev parent reply other threads:[~2007-10-10 6:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 20:41 Anton Farygin
2007-10-10 4:29 ` Vladimir V. Kamarzin
2007-10-10 6:55 ` Anton Farygin [this message]
2007-10-10 8:28 ` Anton Farygin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='feht0u$tp8$1@sea.gmane.org' \
--to=rider@altlinux.com \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git