Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2008 07:48:18 -0300
From:      AT Matik <asstec@matik.com.br>
To:        freebsd-ipfw@freebsd.org
Subject:   Re: Syntax base IP
Message-ID:  <200805060748.18487.asstec@matik.com.br>
In-Reply-To: <4d4dc3640805040840t5725fb4ejfd19da3c3f78ec73@mail.gmail.com>
References:  <4d4dc3640805040840t5725fb4ejfd19da3c3f78ec73@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 04 May 2008 12:40:24 budsz wrote:
> Hallo,
>
> I've rule in /etc/rc.firewall like this:
>
> ifint0=3D"rl0"
> ippriviix=3D"192.168.0.0/24"
> ipunlimit=3D"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,\
>          =20
> 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"

if you can not use tables you can write a for loop with skipto pefore the p=
ipe

for items in $ipunlimit; do
ipfw add 100 skipto $rulenumber_after_pipe ip from $items to any
done

pipe rules (where you like to add in or out to via)



> portlim=3D"20-21,80,88,443,2009,8080,8088,10007,18755"
> bwunlimit=3D"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

=2D-=20
Participe no BAIXO ASSINADO SCM:
http://info.matik.com.br
=2D-
Atenciosamente, J.M.
Respons=E1vel Plant=E3o Site Support Matik
Infomatik Internet Technology
(18)3551.8155 =A0(18)8112.7007







A mensagem foi scaneada pelo sistema de e-mail e pode ser considerada segura.
Service fornecido pelo Datacenter Matik  https://datacenter.matik.com.br



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