Skip to contentSkip to conversation

iptables upgrade: NOT operator parser trouble

DISCUSSION Thomas Jarosch 2 participants 3 messages Jun 28, 2013 – Jul 1, 2013 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

I've found another issue after upgrading iptables from 1.4.8 to 1.4.18. This rule used to work:

    iptables -A R34 --protocol tcp --dport ! 80 -j C525

iptables complains:
iptables-restore v1.4.18: invalid port/service `!' specified

Fix the parser or fix my rules? :)

Cheers,
Thomas

maintainer
#1 lore raw
Quoted 4 lines · Thomas Jarosch

I've found another issue after upgrading iptables from 1.4.8 to 1.4.18. This rule used to work:

    iptables -A R34 --protocol tcp --dport ! 80 -j C525

Yes, but iptables used to warn about this:
'Using intrapositioned negation (--option ! this) is deprecated in favor of extrapositioned (! --option this).'

#2 lore raw

Hi Florian,

Quoted 9 lines · On Friday, 28. June 2013 22:20:38 Florian Westphal wrote:
Quoted 4 lines · Thomas Jarosch

I've found another issue after upgrading iptables from 1.4.8 to 1.4.18.

This rule used to work:

    iptables -A R34 --protocol tcp --dport ! 80 -j C525

Yes, but iptables used to warn about this:
'Using intrapositioned negation (--option ! this) is deprecated in favor of extrapositioned (! --option this).'

probably my iptables version was too old to show that warning, at least I never noticed it.

Anyhow, I fixed my rule generator.

Thanks,
Thomas