<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>2369</bug_id>
          
          <creation_ts>2003-03-12 22:15:34 +0300</creation_ts>
          <short_desc>Master 2.2: iptables-[restore|save] не паботает правильно при отрицании в задании мака.</short_desc>
          <delta_ts>2009-05-10 09:31:41 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>iptables</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pavel S. Khmelinsky">hmepas</reporter>
          <assigned_to name="Alexey Voinov">voins</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2155</commentid>
    <comment_count>0</comment_count>
    <who name="Pavel S. Khmelinsky">hmepas</who>
    <bug_when>2003-03-12 22:15:34 +0300</bug_when>
    <thetext>[&lt;a href=&quot;mailto:root@gate&quot; target=&quot;_new&quot;&gt;root@gate&lt;/a&gt; /]# iptables -I INPUT -s 192.168.1.50 -m mac --mac-source ! 00:00:1C:D7:74:DF -j REJECT

Внимание на восклицательный знак! Т.е. данное правило _отрицает_ все пакеты которые пришли с мак-адреса отличного от заданного с заданного айпи.

Сохраняем:
[&lt;a href=&quot;mailto:root@gate&quot; target=&quot;_new&quot;&gt;root@gate&lt;/a&gt; /]# /etc/init.d/iptables save
Saving current rules to /etc/sysconfig/iptables:                                            [  OK  ]

Востанавливаем:
[&lt;a href=&quot;mailto:root@gate&quot; target=&quot;_new&quot;&gt;root@gate&lt;/a&gt; /]# /etc/init.d/iptables restart
Applying iptables firewall rules: 
iptables-restore v1.2.7a: Bad mac address `!00:00:1C:D7:74:DF\&apos; &amp;lt;--  Вот она ощибка.
Try `iptables-restore -h\&apos; or \&apos;iptables-restore --help\&apos; for more information.
                                                                                            
В файервол нужно послыать ! 00:00:1C:D7:74:DF, а не !00:00:1C:D7:74:DF  т.е. между ! и маков должен быть пробел.


---

---

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12283</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2004-03-17 12:21:17 +0300</bug_when>
    <thetext>проверьте пожалуйста на текущем Sisyphus
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12390</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Voinov">voins</who>
    <bug_when>2004-03-22 17:38:14 +0300</bug_when>
    <thetext>не могу воспроизвести на iptables-1.2.9-alt*

предлагаю закрыть</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12391</commentid>
    <comment_count>3</comment_count>
    <who name="Pavel S. Khmelinsky">hmepas</who>
    <bug_when>2004-03-22 17:47:04 +0300</bug_when>
    <thetext>Подтверждаю. Закрываем. </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>