The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
stateful ipfw: ipfw_install_state: entry already present, !*! 0rt, 18-Ноя-11, 07:35  [смотреть все]
Добрый день всем.
Имеем FreeBSD 8.2+ipfw, правила следующие:

# ipfw list
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
00400 deny ip from any to ::1
00500 deny ip from ::1 to any
00600 allow ipv6-icmp from :: to ff02::/16
00700 allow ipv6-icmp from fe80::/10 to fe80::/10
00800 allow ipv6-icmp from fe80::/10 to ff02::/16
00900 allow ipv6-icmp from any to any ip6 icmp6types 1
01000 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
01100 allow ip from any to any via lo0
01200 check-state
01300 divert 8668 tcp from 192.168.0.0/16 to any dst-port 22,25,110,143,465,587,993,995,7000,7001,7005 out xmit bce1 recv bce0 keep-state
01400 divert 8668 udp from 192.168.0.0/16 to any dst-port 7000,7001,7005 out xmit bce1 recv bce0 keep-state
01500 divert 8668 ip from 192.168.89.8,192.168.89.254 to any out xmit bce1 recv bce0 keep-state
01600 allow ip from 192.168.0.0/16 to 192.168.0.0/16 via bce0 setup keep-state
01700 allow ip from XXX.XXX.XXX.XXX/27 to XXX.XXX.XXX.XXX/27 via bce2 setup keep-state
01800 allow ip from XXX.XXX.XXX.XXX/27 to any out xmit bce1 setup keep-state
01900 allow ip from any to YYY.YYY.YYY.YYY dst-port 2601,2604 in recv bce1 setup keep-state
02000 allow tcp from any to XXX.XXX.XXX.XXX/27 dst-port 22 setup keep-state
02100 allow ip from any to any out xmit bce1 setup keep-state
02200 allow ip from any to any out xmit bce0 setup keep-state
02300 allow ip from any to XXX.XXX.XXX.66 dst-port 53 keep-state
02400 allow tcp from any to XXX.XXX.XXX.68 dst-port 20,21,80,443 setup keep-state
02500 allow tcp from any to XXX.XXX.XXX.69 dst-port 443,5222,5223 setup keep-state
02600 allow icmp from any to any keep-state
02700 deny log ip from any to any

IPFW работает, но ругается в консоль:
ipfw: ipfw_install_state: entry already present, done

В чём я не прав?

  • stateful ipfw: ipfw_install_state: entry already present, !*! Square, 20:14 , 18-Ноя-11 (1)
    • stateful ipfw: ipfw_install_state: entry already present, !*! 0rt, 03:42 , 19-Ноя-11 (2)
      Спасибо за ссылку, конечно, но это я уже делал и сам. Насколько я понял, правило № 02200 лишнее. Удалил, работает, но всё равно ругается, хотя и реже.
      • stateful ipfw: ipfw_install_state: entry already present, !*! Square, 11:10 , 19-Ноя-11 (3)
        • stateful ipfw: ipfw_install_state: entry already present, !*! Golub Mikhail, 11:32 , 21-Ноя-11 (4)
          • stateful ipfw: ipfw_install_state: entry already present, !*! 0rt, 08:50 , 24-Ноя-11 (5)
            Решил проблему следующим набором правил:

            add allow icmp from any to any

            add check-state
            add divert natd tcp from 192.168.0.0/16 to any 22,25,110,143,465,587,993,995,7000,7001,7005 out xmit bce1 keep-state
            add divert natd udp from 192.168.0.0/16 to any 7000,7001,7005 out xmit bce1 keep-state
            add divert natd ip from 192.168.89.8/32,192.168.89.254/32 to any out xmit bce1 keep-state
            add deny ip from any to any frag
            add deny tcp from any to any established

            # боимся непонятного
            add deny ip from any to 192.168.0.0/16 in recv bce1
            add deny ip from 192.168.0.0/16 to any in recv bce1
            add deny ip from any to 172.16.0.0/12 in recv bce1
            add deny ip from 172.16.0.0/12 to any in recv bce1
            add deny ip from any to 10.0.0.0/8 in recv bce1
            add deny ip from 10.0.0.0/8 to any in recv bce1
            add deny ip from any to 169.254.0.0/16 in recv bce1
            add deny ip from 169.254.0.0/16 to any in recv bce1

            add allow tcp from any to any ssh setup keep-state
            add allow tcp from any to XXX.XXX.XXX.66 53 setup keep-state
            add allow udp from any to XXX.XXX.XXX.66 53 keep-state
            add deny log ip from any to XXX.XXX.XXX.66
            add allow tcp from any to XXX.XXX.XXX.64/27 setup keep-state
            add allow tcp from 192.168.0.0/16 to any setup in recv bce0 keep-state
            add allow udp from 192.168.0.0/16 to any in recv bce0 keep-state
            add allow udp from any to any out keep-state
            add allow tcp from any to any out setup keep-state
            add allow udp from any to YYY.YYY.YYY.YYY dst-port 2601,2604 in recv bce1 keep-state
            add allow tcp from any to YYY.YYY.YYY.YYY dst-port 2601,2604 in recv bce1 setup keep-state

            add 65534 deny log ip from any to any




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру