Раньше у меня в firewall было так:
ipfw add 1000 divert natd all from 192.168.*.*/24 to any via gre0 out
ipfw add 1100 divert natd all from any to 192.168.*.* via gre0 in
ipfw add 3800 allow all from 192.168.0.12 20,21,22,80,110,3128 to any
ipfw add 3900 allow all from any 20,21,22,80,110,3128 to 192.168.0.12
теперь у меня появилась нарезка канала и получилось так:
ipfw pipe 1 config bw 128Kbit/s queue 2
ipfw queue 1 config pipe 1 weight 90 mask dst-ip 0xffffffff
ipfw queue 2 config pipe 1 weight 10 mask dst-ip 0xffffffff
ipfw add 100 queue 1 ip from any to 192.168.0.12/32
ipfw add 101 queue 2 ip from any to 192.168.0.1/24
ipfw add 1000 divert natd all from 192.168.*.*/24 to any via gre0 out
ipfw add 1100 divert natd all from any to 192.168.*.* via gre0 in
ipfw add 3800 allow all from 192.168.0.12 20,21,22,80,110,3128 to any
ipfw add 3900 allow all from any 20,21,22,80,110,3128 to 192.168.0.12
ipfw add deny all from any to any
И теперь получается так:
что после того как правило пападает в канал
оно вылетает из номера 100
и прекращает свою обработку.
тем самым не обрабатывая правила №3800 и 3900
подскажите неопытному как быть?
как правильно построить данные правила?
>И теперь получается так:
>что после того как правило пападает в канал
>оно вылетает из номера 100
>и прекращает свою обработку.
>тем самым не обрабатывая правила №3800 и 3900
>подскажите неопытному как быть?
>как правильно построить данные правила?читать man ipfw
>pipe pipe_nr
> Pass packet to a dummynet(4) ``pipe'' (for bandwidth limitation,
> delay, etc.). See the TRAFFIC SHAPER (DUMMYNET) CONFIGURATION
> Section for further information. The search terminates; however,
> on exit from the pipe and if the sysctl(8) variable
> net.inet.ip.fw.one_pass is not set, the packet is passed again to
> the firewall code starting from the next rule.
>
> queue queue_nr
> Pass packet to a dummynet(4) ``queue'' (for bandwidth limitation
> using WF2Q+).
короче либо перестрой набор правил, либо используй net.inet.ip.fw.one_pass