From: Maxim Bodyansky <maximbo@rambler.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] маскарадинг. Ограничения
Date: Thu, 5 Jan 2006 11:16:15 +0300
Message-ID: <20060105081614.GA6774@skif.istranet.ru> (raw)
In-Reply-To: <43BBF87D.3010900@altlinux.ru>
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
On Wed, Jan 04, 2006 at 07:31:57PM +0300 Anton Gorlov wrote:
> Maxim Bodyansky пишет:
>
> >>Проще говря..в правилах для маскарадинга нужно как-то отрезать
> >>dst=локальным подсеткам.
> >Можно вовсе не трогать маскардинг, заперев врата в FORWARD'е.
>
> Тоже вариант.. но при этом в инет им должно быть можно всё..а в
> локальные подсетки не дальше роутера. Локальных подсеток больше 4...
Если не охота руками формировать правила, почему бы не поручить это
грязное дело роботу? Как, например, в приложеном скрипте.
--
WBR,
Maxim Bodyansky
[-- Attachment #2: fire --]
[-- Type: text/plain, Size: 427 bytes --]
#!/bin/sh
PRIVATE_NETWORK="10.0.5.0/24"
LOCAL_NETWORKS="
10.0.1.0/24
10.0.2.0/24
10.0.3.0/24
10.0.4.0/24
"
IPT="echo"
# В локальные сетки не дальше роутера
for lnet in $LOCAL_NETWORKS; do
$IPT -A FORWARD -s $PRIVATE_NETWORK -d $lnet -j DROP
$IPT -A FORWARD -d $PRIVATE_NETWORK -s $lnet -j DROP
done
# В остальные можно всё
$IPT -A FORWARD -s $PRIVATE_NETWORK -j ACCEPT
$IPT -A FORWARD -d $PRIVATE_NETWORK -j ACCEPT
next prev parent reply other threads:[~2006-01-05 8:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 10:14 Anton Gorlov
2006-01-04 10:40 ` Maxim Bodyansky
2006-01-04 16:31 ` Anton Gorlov
2006-01-05 8:16 ` Maxim Bodyansky [this message]
2006-01-04 10:42 ` Olaf Portvineson
2006-01-04 16:30 ` Anton Gorlov
2006-01-04 17:39 ` Re[2]: " Dank Bagryantsev
2006-01-04 11:28 ` Sergiy Guminilovych
2006-01-04 16:33 ` Anton Gorlov
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=20060105081614.GA6774@skif.istranet.ru \
--to=maximbo@rambler.ru \
--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