Re: Strange problem with iptables and ip ranges with leading 0's (wor ks sometimes, but not other times)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 1 Oct 2003, Fox, Michael wrote:

> Basically if we enter in a rule like so; (notice leading 0's 007.0xx.0/24)
[..]
works:
> springer:~# iptables -A mule -p tcp --dport 4661 -s 202.007.077.0/24 -j
> ACCEPT
error:
> springer:~# iptables -A mule -p tcp --dport 4661 -s 202.007.078.0/24 -j
> ACCEPT
> iptables v1.2.8: host/network `202.007.078.0' not found
> Try `iptables -h' or 'iptables --help' for more information.
[..]
> Why does the first few work (with leading 0's, and then the next few fail)
> it would appear some code in iptables evaluating the command line only works
> upto a certain range or values)

Leading zero means "octal instead of decimal"

and in octal notation there is no digit "8", it only goes from 0 to 7

your "077" is 63 decimal.

c'ya
sven

-- 

The Internet treats censorship as a routing problem, and routes around it.
(John Gilmore on http://www.cygnus.com/~gnu/)


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux