* [Comm] iptables -m mac
@ 2006-03-05 21:06 andriy
2006-03-06 0:22 ` Maxim Bodyansky
0 siblings, 1 reply; 2+ messages in thread
From: andriy @ 2006-03-05 21:06 UTC (permalink / raw)
To: community
Hi, community!
iptables позволяет блокировку всех MAC-адресов, кроме нескольких?
Етим блокируем все кроме одной
iptables -A INPUT -m mac --mac-source \! 00:0D:00:B5:00:0C -j DROP
а как несколько?
Best regards, Andriy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Comm] iptables -m mac
2006-03-05 21:06 [Comm] iptables -m mac andriy
@ 2006-03-06 0:22 ` Maxim Bodyansky
0 siblings, 0 replies; 2+ messages in thread
From: Maxim Bodyansky @ 2006-03-06 0:22 UTC (permalink / raw)
To: ALT Linux Community
On Sun, Mar 05, 2006 at 11:06:13PM +0200 andriy wrote:
> Hi, community!
>
> iptables позволяет блокировку всех MAC-адресов, кроме нескольких?
> Етим блокируем все кроме одной
>
> iptables -A INPUT -m mac --mac-source \! 00:0D:00:B5:00:0C -j DROP
>
> а как несколько?
Можно создать несколько разрешающих правил, и одно запрещающее.
--- start of script ---
IPT=/sbin/iptables
mac_list="
mac1
mac2
mac3
"
for mac in $mac_list; do
$IPT -A INPUT -m mac --mac-source $mac -j ACCEPT
done
$IPT -P INPUT DROP
--- end of script ---
--
WBR,
Maxim Bodyansky
"You can't make a program without broken egos."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-06 0:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-05 21:06 [Comm] iptables -m mac andriy
2006-03-06 0:22 ` Maxim Bodyansky
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git