Bug 2369 - Master 2.2: iptables-[restore|save] не паботает правильно при отрицании в задании мака.
Summary: Master 2.2: iptables-[restore|save] не паботает правильно при отрицании в зад...
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: iptables (show other bugs)
Version: unstable
Hardware: all Linux
: P4 minor
Assignee: Alexey Voinov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-12 22:15 MSK by Pavel S. Khmelinsky
Modified: 2009-05-10 09:31 MSD (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel S. Khmelinsky 2003-03-12 22:15:34 MSK
[<a href="mailto:root@gate" target="_new">root@gate</a> /]# iptables -I INPUT -s 192.168.1.50 -m mac --mac-source ! 00:00:1C:D7:74:DF -j REJECT

Внимание на восклицательный знак! Т.е. данное правило _отрицает_ все пакеты которые пришли с мак-адреса отличного от заданного с заданного айпи.

Сохраняем:
[<a href="mailto:root@gate" target="_new">root@gate</a> /]# /etc/init.d/iptables save
Saving current rules to /etc/sysconfig/iptables:                                            [  OK  ]

Востанавливаем:
[<a href="mailto:root@gate" target="_new">root@gate</a> /]# /etc/init.d/iptables restart
Applying iptables firewall rules: 
iptables-restore v1.2.7a: Bad mac address `!00:00:1C:D7:74:DF\' &lt;--  Вот она ощибка.
Try `iptables-restore -h\' or \'iptables-restore --help\' for more information.
                                                                                            
В файервол нужно послыать ! 00:00:1C:D7:74:DF, а не !00:00:1C:D7:74:DF  т.е. между ! и маков должен быть пробел.


---

---

Comment 1 Anton Farygin 2004-03-17 12:21:17 MSK
проверьте пожалуйста на текущем Sisyphus
Comment 2 Alexey Voinov 2004-03-22 17:38:14 MSK
не могу воспроизвести на iptables-1.2.9-alt*

предлагаю закрыть
Comment 3 Pavel S. Khmelinsky 2004-03-22 17:47:04 MSK
Подтверждаю. Закрываем.