[Voyage-linux] Question - iptables cannot remove a rule ("bad rule" error) - possible bug?

Lukáš Pecha (spam-protected)
Mon Oct 11 15:48:57 HKT 2010


Hi Punky,

Yes, that's working. But the other way should be working too and is working on other systems. It's also in man pages of iptables:

-D, --delete chain rule-specification -D, --delete chain rulenum Delete one or more rules from the selected chain. There are two  versions of this command: the rule can be specified as a number in the  chain (starting at 1 for the first rule) or a rule to match. How can I use Shorewall on Voyage linux then? I don't think, that I can somehow force Shorewall to use rule numbers instead of rule specification...


Lukas

----------------------------
  Hi Lukas,

You need to put a rule number when delete a rule, see iptables -h

        iptables -D chain rulenum [options]

- Punky

On 10/11/2010 1:32 PM, Lukáš Pecha wrote:
> Hi,
>
> I've recently installed Voyage 0.6.5 on my Alix board and when I started to configure Shorewall, I ran into an error 
> with iptables.
>
> Shorewall start ends when it tries to remove rule "/sbin/iptables -D INPUT -m state --state ESTABLISHED,RELATED -j 
> ACCEPT". It just says "Bad rule (does a matching rule exist in that chain?)".
>
> I cleared up the iptables and tried to add the same rule and then remove it manually - it did the same thing again, so 
> it's not Shorewall, but something with iptables. It's working fine on my other linux box (opensuse). Somehow, iptables 
> don't find the rule, which I want to remove.
>
> I have kernel version 2.6.30-voyage #1 PREEMPT, shorewall 4.0.15 and iptables 1.4.2 on my Voyage installation.
>
> Does anyone know what to do with it or do you need more information (if yes, what kind of information do you need)?
>
> Thanks in advance,
> Lukas
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux


-- 
Regards,
Punky

Voyage Solutions (http://solution.voyage.hk)
* Embedded Solutions and Systems
   - Mesh Networking, Captive Portal, IP Surveillance, VoIP/PBX
   - Network Engineering, Development Platform and Consultation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.voyage.hk/pipermail/voyage-linux/attachments/20101011/8e09f6b8/attachment-0002.html>


More information about the Voyage-linux mailing list