Caros. Estou com o seguinte problema. Estou tentando capturar pacotes com a seguinte regra: 00500 divert 2508 tcp from any to any
Mais especificamente, com o grupo de regras: squitch# 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 00500 divert 2508 tcp from any to any 65000 allow ip from any to any 65535 deny ip from any to any Configurei as minhas interfaces de rede assim: squitch# ifconfig msk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=11a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4> ether 00:03:0d:66:9d:e7 media: Ethernet autoselect (none) status: no carrier wpi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 00:1b:77:d4:84:72 inet 192.168.1.108 netmask 0xffffff00 broadcast 192.168.1.255 media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) status: associated ssid casafrente channel 11 (2462 Mhz 11g) bssid 00:1e:e5:33:c2:cb authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit txpower 50 bmiss 7 scanvalid 60 protmode CTS roaming MANUAL fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 lladdr 0.3.d.49.40.0.f8.18.a.2.ff.fe.0.0.0.0 lo0: flags=8149<UP,LOOPBACK,RUNNING,PROMISC,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 inet 192.168.0.2 netmask 0xffffff00 Só que eu estou com quase certeza que os pacotes vindo de 192.168.0.2 estão passando direto para 192.168.1.108 sem serem "diverted" para a porta 2508. Do manual de ipfw encontrei que: ^ to upper layers V | | +----------->-----------+ ^ V [ip(6)_input] [ip(6)_output] net.inet(6).ip(6).fw.enable=1 | | ^ V [ether_demux] [ether_output_frame] net.link.ether.ipfw=1 | | +-->--[bdg_forward]-->--+ net.link.bridge.ipfw=1 ^ V | to devices | Esse traço no topo da figura esta me dando uma suspeita que a seguinte página de manual aumenta mais ainda. Do man 4 divert encontrei que: Packets are diverted either as they are ``incoming'' or ``outgoing.'' Incoming packets are diverted after reception on an IP interface, whereas outgoing packets are diverted before next hop forwarding. Alguém me confirme por favor que os pacotes só passam pela regra divert se eles não estiverem endereçados a nenhum IP do host onde a regra está rodando. Obrigado! ------------------------- Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd