Re: [FUG-BR] RES: Gerenciar dois links
Boa noite a todos Caros colegas, está complicado a coisa aqui, infelizmente ainda não progrediu a situação. Será que não pode ser o fato da troca da porta, como chega na externa 80 e redireciona para 89 do server?? Outra coisa, quando pingo neste link adsl, ou tento qualquer acesso, mesmo esta interface estando com acesso totalmente liberado. Um abraço a todos. Valeu! 2008/11/2 Wanderson Tinti <[EMAIL PROTECTED]>: > Olá pessoal, boa tarde. > Diego de uma olhada nessas regras: > > rdr on $dsl_if from any to $dsl_if port 80 -> $web_apache port 80 > nat on $cabo_if from $int_if to any -> ($cabo_if) > > pass in on $dsl_if reply-to ( $dsl_if $gw ) inet proto tcp \ > from any to $web_apache port 80 flags S/SAFR keep state > > pass out on $cabo_if inet all keep state > pass out on $dsl_if inet proto tcp from any port 80 to any keep state > pass on $int_if inet all > > > > 2008/11/2 Vagner Gonçalves <[EMAIL PROTECTED]>: >> Estas regras foram retiradas de um Server em produção, espero que te ajude. >> >> #RDR para um host interno através da 2 interface wan >> rdr on $interface_speedy proto tcp from any to $interface_speedy port { 80, >> 5222, 5223, 9090, 9091, 5269, } -> 10.10.1.10 >> >> >> #permite o pacote na segunda placa wan >> pass in quick log on $interface_speedy proto tcp from any to 10.10.1.10 port >> { 5222, 5223, 9090, 9091, 5269, } flags S/SA keep state tag ROTA_1 >> >> #Saida de um host pela segunda placa wan >> pass in quick on $interface_interna route-to {($interface_speedy >> $gw_speedy)} proto tcp from 10.10.1.10 to any flags S/SA keep state >> pass in quick on $interface_interna route-to {($interface_speedy >> $gw_speedy)} proto { udp, icmp } from 10.10.1.10 to any keep state >> >> >> #Tag para pacotes que venham da segunda interface externa com destino a >> interface interna >> pass out quick on $interface_interna reply-to ($interface_speedy $gw_speedy) >> proto tcp tagged ROTA_1 flags S/SA keep state >> pass out quick on $interface_interna reply-to ($interface_speedy $gw_speedy) >> tagged ROTA_1 keep state >> >> #E para que tudo acima funcione >> pass out on $interface_externa route-to ($interface_speedy $gw_speedy) from >> $interface_speedy to any >> pass out on $interface_speedy route-to ($interface_externa $gw_externa) from >> $interface_externa to any >> >> >> Abraços, >> >> Vagner Gonçalves (Slayer) >> >> -Mensagem original- >> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome >> de diego bulsing rodrigues >> Enviada em: domingo, 2 de novembro de 2008 02:49 >> Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR) >> Assunto: Re: [FUG-BR] Gerenciar dois links >> >> Valeu pelo link, não tinha acompanhado a discursão pois sou novo na lista, >> mas já tinha visto. >> Segue abaixo uma parte do pf.conf, junto com o tcpdump das placas externas. >> Se alguém tiver uma luz, por gentileza, serei grato, já que estou >> perdendo noites de sono por causa disso. >> >> defaultrouter="200.xx.xxx.xx" >> >> #pf.conf >> >> ext_if="xl0" >> int_if="xl1" >> ext_if2="vr0" >> >> ext_ip="200.xx.xxx.xx" >> nat_ip="200.xx.xxx.xx" >> ext_ip2="10.10.10.2" >> ext_gw2="10.10.10.1" >> >> server="192.168.1.100" >> >> # NAT >> nat on $ext_if from $int_if:network to any -> $nat_ip >> nat on $ext_if2 from $int_if:network to any -> $ext_ip2 >> >> # RDR >> rdr on $ext_if2 proto tcp from any to $ext_ip2 port 80 tag ROUTE1 -> >> $server port 89 >> rdr on $int_if from $int_if:network to $ext_if -> $int_if >> >> # LAN >> pass out quick on $int_if to $int_if:network $tcpflags keep state >> pass in quick on $int_if from $int_if:network to any $tcpflags keep state >> >> # WAN >> pass quick on $ext_if2 >> >> pass in quick on $ext_if2_if reply-to ($ext_if2 $ext_gw2) from \ >>$server to any keep state >> >> pass out quick on $ext_if reply-to ($ext_if2 $ext_gw2) from \ >>$server to any tagged ROUTE1 keep state >> >> pass out on $ext_if route-to $ext_if2 from $ext_if2 to any >> >> block log >> >> firewall# tcpdump -pni vr0 >> >> 01:39:02.548117 IP 189.24.44.244.55722 > 10.10.10.2.80: S >> 1586601675:1586601675(0) win 65535 >> 01:39:05.877330 IP 189.24.44.244.55722 > 10.10.10.2.80: S >> 1586601675:1586601675(0) win 65535 >> 01:39:09.213199 IP 189.24.44.244.55722 > 10.10.10.2.80: S >> 1586601675:1586601675(0) win 65535 >> 01:39:15.664414 IP 189.24.44.244.55722 > 10.10.10.2.80: S >> 1586601675:1586601675(0) win 65535 >> >> firewall# tcpdump -pni xl0 >> >> 01:40:55.408132 IP 10.10.10.2.80 > 189.24.44.244.62060: S >> 4277088621:4277088621(0) ack 2084071544 win 16384 >> >> 01:41:04.049022 IP 10.10.10.2.80 > 189.24.44.244.62060: S >> 4277088621:4277088621(0) ack 2084071544 win 16384 >> >> 01:41:31.648221 IP 10.10.10.2.80 > 189.24.44.244.62293: S >> 62497568:62497568(0) ack 3116327218 win 16384 >> >> >> Desde já agradeço. >> >> >> >> 2008/11/1 Thiago Gomes <[EMAIL PROTECTED]>: >>> afinal essa discursão deste tema ficou como ?? >>> http://www.fug.com.br/historico/html/freebsd/2008-10/msg00050
Re: [FUG-BR] RES: Gerenciar dois links
Olá pessoal, boa tarde. Diego de uma olhada nessas regras: rdr on $dsl_if from any to $dsl_if port 80 -> $web_apache port 80 nat on $cabo_if from $int_if to any -> ($cabo_if) pass in on $dsl_if reply-to ( $dsl_if $gw ) inet proto tcp \ from any to $web_apache port 80 flags S/SAFR keep state pass out on $cabo_if inet all keep state pass out on $dsl_if inet proto tcp from any port 80 to any keep state pass on $int_if inet all 2008/11/2 Vagner Gonçalves <[EMAIL PROTECTED]>: > Estas regras foram retiradas de um Server em produção, espero que te ajude. > > #RDR para um host interno através da 2 interface wan > rdr on $interface_speedy proto tcp from any to $interface_speedy port { 80, > 5222, 5223, 9090, 9091, 5269, } -> 10.10.1.10 > > > #permite o pacote na segunda placa wan > pass in quick log on $interface_speedy proto tcp from any to 10.10.1.10 port > { 5222, 5223, 9090, 9091, 5269, } flags S/SA keep state tag ROTA_1 > > #Saida de um host pela segunda placa wan > pass in quick on $interface_interna route-to {($interface_speedy > $gw_speedy)} proto tcp from 10.10.1.10 to any flags S/SA keep state > pass in quick on $interface_interna route-to {($interface_speedy > $gw_speedy)} proto { udp, icmp } from 10.10.1.10 to any keep state > > > #Tag para pacotes que venham da segunda interface externa com destino a > interface interna > pass out quick on $interface_interna reply-to ($interface_speedy $gw_speedy) > proto tcp tagged ROTA_1 flags S/SA keep state > pass out quick on $interface_interna reply-to ($interface_speedy $gw_speedy) > tagged ROTA_1 keep state > > #E para que tudo acima funcione > pass out on $interface_externa route-to ($interface_speedy $gw_speedy) from > $interface_speedy to any > pass out on $interface_speedy route-to ($interface_externa $gw_externa) from > $interface_externa to any > > > Abraços, > > Vagner Gonçalves (Slayer) > > -Mensagem original- > De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome > de diego bulsing rodrigues > Enviada em: domingo, 2 de novembro de 2008 02:49 > Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR) > Assunto: Re: [FUG-BR] Gerenciar dois links > > Valeu pelo link, não tinha acompanhado a discursão pois sou novo na lista, > mas já tinha visto. > Segue abaixo uma parte do pf.conf, junto com o tcpdump das placas externas. > Se alguém tiver uma luz, por gentileza, serei grato, já que estou > perdendo noites de sono por causa disso. > > defaultrouter="200.xx.xxx.xx" > > #pf.conf > > ext_if="xl0" > int_if="xl1" > ext_if2="vr0" > > ext_ip="200.xx.xxx.xx" > nat_ip="200.xx.xxx.xx" > ext_ip2="10.10.10.2" > ext_gw2="10.10.10.1" > > server="192.168.1.100" > > # NAT > nat on $ext_if from $int_if:network to any -> $nat_ip > nat on $ext_if2 from $int_if:network to any -> $ext_ip2 > > # RDR > rdr on $ext_if2 proto tcp from any to $ext_ip2 port 80 tag ROUTE1 -> > $server port 89 > rdr on $int_if from $int_if:network to $ext_if -> $int_if > > # LAN > pass out quick on $int_if to $int_if:network $tcpflags keep state > pass in quick on $int_if from $int_if:network to any $tcpflags keep state > > # WAN > pass quick on $ext_if2 > > pass in quick on $ext_if2_if reply-to ($ext_if2 $ext_gw2) from \ >$server to any keep state > > pass out quick on $ext_if reply-to ($ext_if2 $ext_gw2) from \ >$server to any tagged ROUTE1 keep state > > pass out on $ext_if route-to $ext_if2 from $ext_if2 to any > > block log > > firewall# tcpdump -pni vr0 > > 01:39:02.548117 IP 189.24.44.244.55722 > 10.10.10.2.80: S > 1586601675:1586601675(0) win 65535 > 01:39:05.877330 IP 189.24.44.244.55722 > 10.10.10.2.80: S > 1586601675:1586601675(0) win 65535 > 01:39:09.213199 IP 189.24.44.244.55722 > 10.10.10.2.80: S > 1586601675:1586601675(0) win 65535 > 01:39:15.664414 IP 189.24.44.244.55722 > 10.10.10.2.80: S > 1586601675:1586601675(0) win 65535 > > firewall# tcpdump -pni xl0 > > 01:40:55.408132 IP 10.10.10.2.80 > 189.24.44.244.62060: S > 4277088621:4277088621(0) ack 2084071544 win 16384 > > 01:41:04.049022 IP 10.10.10.2.80 > 189.24.44.244.62060: S > 4277088621:4277088621(0) ack 2084071544 win 16384 > > 01:41:31.648221 IP 10.10.10.2.80 > 189.24.44.244.62293: S > 62497568:62497568(0) ack 3116327218 win 16384 > > > Desde já agradeço. > > > > 2008/11/1 Thiago Gomes <[EMAIL PROTECTED]>: >> afinal essa discursão deste tema ficou como ?? >> http://www.fug.com.br/historico/html/freebsd/2008-10/msg00050.html >> e qual é a configuração correta ?? >> >> 2008/11/1 Wanderson Tinti <[EMAIL PROTECTED]>: >>> Achei: http://www.fug.com.br/historico/html/freebsd/2008-10/msg00050.html >>> >>> 2008/11/1 Wanderson Tinti <[EMAIL PROTECTED]>: Não sei se você acompanhou uma discurção onde o reply-to foi muito discutido, de uma olhada, talvez você consiga resolver seu problema. Era algo como: dois links, uma nao acessível de fora. Boa sorte. > - > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://
Re: [FUG-BR] Snort + SnortSAM
Celso, infelizmente não tenho muita idéia do que está acontecendo, mas na lista do www.snort.org.br o pessoal vai poder te ajudar com certeza ;) Abs[] 2008/11/2 Celso Viana <[EMAIL PROTECTED]> > 2008/10/30 Augusto Ferronato <[EMAIL PROTECTED]>: > > nos logs do snort não diz nada /var/log/snort/ > > > > Nunca mexi com snortsam > > > > ? > > > > Abs[] > > > > 2008/10/30 Celso Viana <[EMAIL PROTECTED]> > > > >> All, > >> > >> Tenho um "snort + snortsam" instalado num FreeBSD 7.0 (tudo pelo > >> ports); no "snort.conf" alterei apenas as variáveis básicas... > >> > >> O "snortsam.conf" está como abaixo... > >> > >> #defaultkey secrets > >> fwsam 10.10.5.1 > >> > >> bindip 10.10.5.1 > >> keyinterval 30 minutes > >> logfile /var/log/snortsam.log > >> loglevel 3 > >> daemon > >> ipfw2 fxp0 10 11 > >> dontblock 10.10.5.1 > >> > >> O snort está gerando os alerts normalmente... o problema é que quando > >> adiciono a linha... > >> > >> output alert_fwsam: 10.10.5.1/secrets > >> > >> no "snort.conf" não são mais gerados os alerts... > >> > >> Alguém pode ajudar a resolver isso...??? > >> > >> Thanks > >> > >> -- > >> Celso Vianna > >> BSD User: 51318 > >> http://www.bsdcounter.org > >> > >> 63 8404-8559 > >> Palmas/TO > >> - > >> Histórico: http://www.fug.com.br/historico/html/freebsd/ > >> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > >> > > > > > > > > -- > > -- > > "Segurança da Informação se faz com tecnologia, processos e pessoas, e a > > formação destas exige mais que uma seqüência de treinamentos. Porque você > > treina macacos. Pessoas,você educa." > > > > FreeBSD: The Freedom to Perform! > > http://www.spreadbsd.org/aff/40/1 > > - > > Histórico: http://www.fug.com.br/historico/html/freebsd/ > > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > > > > Augusto, > > Veja parte do log gerado durante a inicializacao do snort... > > Nov 1 07:12:10 teste snort[6453]: INFO => [Alert_FWsam](FWsamCheckIn) > Connected to host . > Nov 1 07:12:13 teste snort[6453]: WARNING => > [Alert_FWsam](FWsamCheckIn) Did not receive response from host . Will > try again later. > > -- > Celso Vianna > BSD User: 51318 > http://www.bsdcounter.org > > 63 8404-8559 > Palmas/TO > - > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > -- -- "Segurança da Informação se faz com tecnologia, processos e pessoas, e a formação destas exige mais que uma seqüência de treinamentos. Porque você treina macacos. Pessoas,você educa." FreeBSD: The Freedom to Perform! http://www.spreadbsd.org/aff/40/1 - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
[FUG-BR] RES: Gerenciar dois links
Estas regras foram retiradas de um Server em produção, espero que te ajude. #RDR para um host interno através da 2 interface wan rdr on $interface_speedy proto tcp from any to $interface_speedy port { 80, 5222, 5223, 9090, 9091, 5269, } -> 10.10.1.10 #permite o pacote na segunda placa wan pass in quick log on $interface_speedy proto tcp from any to 10.10.1.10 port { 5222, 5223, 9090, 9091, 5269, } flags S/SA keep state tag ROTA_1 #Saida de um host pela segunda placa wan pass in quick on $interface_interna route-to {($interface_speedy $gw_speedy)} proto tcp from 10.10.1.10 to any flags S/SA keep state pass in quick on $interface_interna route-to {($interface_speedy $gw_speedy)} proto { udp, icmp } from 10.10.1.10 to any keep state #Tag para pacotes que venham da segunda interface externa com destino a interface interna pass out quick on $interface_interna reply-to ($interface_speedy $gw_speedy) proto tcp tagged ROTA_1 flags S/SA keep state pass out quick on $interface_interna reply-to ($interface_speedy $gw_speedy) tagged ROTA_1 keep state #E para que tudo acima funcione pass out on $interface_externa route-to ($interface_speedy $gw_speedy) from $interface_speedy to any pass out on $interface_speedy route-to ($interface_externa $gw_externa) from $interface_externa to any Abraços, Vagner Gonçalves (Slayer) -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de diego bulsing rodrigues Enviada em: domingo, 2 de novembro de 2008 02:49 Para: Lista Brasileira de Discussão sobre FreeBSD (FUG-BR) Assunto: Re: [FUG-BR] Gerenciar dois links Valeu pelo link, não tinha acompanhado a discursão pois sou novo na lista, mas já tinha visto. Segue abaixo uma parte do pf.conf, junto com o tcpdump das placas externas. Se alguém tiver uma luz, por gentileza, serei grato, já que estou perdendo noites de sono por causa disso. defaultrouter="200.xx.xxx.xx" #pf.conf ext_if="xl0" int_if="xl1" ext_if2="vr0" ext_ip="200.xx.xxx.xx" nat_ip="200.xx.xxx.xx" ext_ip2="10.10.10.2" ext_gw2="10.10.10.1" server="192.168.1.100" # NAT nat on $ext_if from $int_if:network to any -> $nat_ip nat on $ext_if2 from $int_if:network to any -> $ext_ip2 # RDR rdr on $ext_if2 proto tcp from any to $ext_ip2 port 80 tag ROUTE1 -> $server port 89 rdr on $int_if from $int_if:network to $ext_if -> $int_if # LAN pass out quick on $int_if to $int_if:network $tcpflags keep state pass in quick on $int_if from $int_if:network to any $tcpflags keep state # WAN pass quick on $ext_if2 pass in quick on $ext_if2_if reply-to ($ext_if2 $ext_gw2) from \ $server to any keep state pass out quick on $ext_if reply-to ($ext_if2 $ext_gw2) from \ $server to any tagged ROUTE1 keep state pass out on $ext_if route-to $ext_if2 from $ext_if2 to any block log firewall# tcpdump -pni vr0 01:39:02.548117 IP 189.24.44.244.55722 > 10.10.10.2.80: S 1586601675:1586601675(0) win 65535 01:39:05.877330 IP 189.24.44.244.55722 > 10.10.10.2.80: S 1586601675:1586601675(0) win 65535 01:39:09.213199 IP 189.24.44.244.55722 > 10.10.10.2.80: S 1586601675:1586601675(0) win 65535 01:39:15.664414 IP 189.24.44.244.55722 > 10.10.10.2.80: S 1586601675:1586601675(0) win 65535 firewall# tcpdump -pni xl0 01:40:55.408132 IP 10.10.10.2.80 > 189.24.44.244.62060: S 4277088621:4277088621(0) ack 2084071544 win 16384 01:41:04.049022 IP 10.10.10.2.80 > 189.24.44.244.62060: S 4277088621:4277088621(0) ack 2084071544 win 16384 01:41:31.648221 IP 10.10.10.2.80 > 189.24.44.244.62293: S 62497568:62497568(0) ack 3116327218 win 16384 Desde já agradeço. 2008/11/1 Thiago Gomes <[EMAIL PROTECTED]>: > afinal essa discursão deste tema ficou como ?? > http://www.fug.com.br/historico/html/freebsd/2008-10/msg00050.html > e qual é a configuração correta ?? > > 2008/11/1 Wanderson Tinti <[EMAIL PROTECTED]>: >> Achei: http://www.fug.com.br/historico/html/freebsd/2008-10/msg00050.html >> >> 2008/11/1 Wanderson Tinti <[EMAIL PROTECTED]>: >>> Não sei se você acompanhou uma discurção onde o reply-to foi muito >>> discutido, de uma olhada, talvez você consiga resolver seu problema. >>> Era algo como: dois links, uma nao acessível de fora. >>> >>> Boa sorte. - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Snort + SnortSAM
2008/10/30 Augusto Ferronato <[EMAIL PROTECTED]>: > nos logs do snort não diz nada /var/log/snort/ > > Nunca mexi com snortsam > > ? > > Abs[] > > 2008/10/30 Celso Viana <[EMAIL PROTECTED]> > >> All, >> >> Tenho um "snort + snortsam" instalado num FreeBSD 7.0 (tudo pelo >> ports); no "snort.conf" alterei apenas as variáveis básicas... >> >> O "snortsam.conf" está como abaixo... >> >> #defaultkey secrets >> fwsam 10.10.5.1 >> >> bindip 10.10.5.1 >> keyinterval 30 minutes >> logfile /var/log/snortsam.log >> loglevel 3 >> daemon >> ipfw2 fxp0 10 11 >> dontblock 10.10.5.1 >> >> O snort está gerando os alerts normalmente... o problema é que quando >> adiciono a linha... >> >> output alert_fwsam: 10.10.5.1/secrets >> >> no "snort.conf" não são mais gerados os alerts... >> >> Alguém pode ajudar a resolver isso...??? >> >> Thanks >> >> -- >> Celso Vianna >> BSD User: 51318 >> http://www.bsdcounter.org >> >> 63 8404-8559 >> Palmas/TO >> - >> Histórico: http://www.fug.com.br/historico/html/freebsd/ >> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd >> > > > > -- > -- > "Segurança da Informação se faz com tecnologia, processos e pessoas, e a > formação destas exige mais que uma seqüência de treinamentos. Porque você > treina macacos. Pessoas,você educa." > > FreeBSD: The Freedom to Perform! > http://www.spreadbsd.org/aff/40/1 > - > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > Augusto, Veja parte do log gerado durante a inicializacao do snort... Nov 1 07:12:10 teste snort[6453]: INFO => [Alert_FWsam](FWsamCheckIn) Connected to host . Nov 1 07:12:13 teste snort[6453]: WARNING => [Alert_FWsam](FWsamCheckIn) Did not receive response from host . Will try again later. -- Celso Vianna BSD User: 51318 http://www.bsdcounter.org 63 8404-8559 Palmas/TO - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd