Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 May 2008 22:40:24 +0700
From:      budsz <budiyt@gmail.com>
To:        freebsd-ipfw@FreeBSD.org
Subject:   Syntax base IP
Message-ID:  <4d4dc3640805040840t5725fb4ejfd19da3c3f78ec73@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hallo,

I've rule in /etc/rc.firewall like this:

ifint0="rl0"
ippriviix="192.168.0.0/24"
ipunlimit="192.168.0.100/32,10.35.4.1/32,202.129.189.42/32,\
           202.129.189.45/32,125.163.77.180/32,202.43.167.70/32,\
           202.43.167.72/32,202.43.161.119/32,202.10.32.10/32,202.93.20.22/32,\
           202.93.20.23/32,202.93.20.24/32,122.102.49.132/32,\
           202.43.161.124/32,202.93.247.26/32,202.93.247.28/32"
portlim="20-21,80,88,443,2009,8080,8088,10007,18755"
bwunlimit="197Kbit/s"

${fwcmd} add 100 pipe 1 ip from ${ippriviix} to { not ${ipunlimit} }
${portlim} via ${ifint0}
${fwcmd} add 101 pipe 1 ip from { not ${ipunlimit} } ${portlim} to
${ippriviix} via ${ifint0}
${fwcmd} pipe 1 config bw ${bwunlimit}

Executing firewall I got error message like this:
#sh /etc/rc.firewall
ipfw: opcode 6 size 33 wrong
ipfw: getsockopt(IP_FW_ADD): Invalid argument
ipfw: opcode 2 size 33 wrong
ipfw: getsockopt(IP_FW_ADD): Invalid argument

This error happened after I adding new IP Address 202.93.247.28/32 on
$ipunlimit variable.
It that correct to add 202.93.247.26/32 and 202.93.247.28/32 together?
or I should rewrite like
202.93.247.26/29?. But already same on $ipunlimit variable like
202.93.20.22/32 and 202.93.20.23/32 this is no problem.

Any clue or suggestion about this syntax?

Thanks You

-- 
budsz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4d4dc3640805040840t5725fb4ejfd19da3c3f78ec73>