Em 30 de setembro de 2010 10:08, Sergio Augusto Vladisauskis <sergi...@gmail.com> escreveu: > Opa, entendi! > Achei que o persist file gravaria o conteúdo da tabela em disco a cada > add. > Gostei da dica, mas vou pensar em fazer algo diferente, criar um script > que a cada N minutos grave a tabela da memória no disco e depois > realizar uma faxina para os IPs mais velhos.
pfctl -t fail2ban -T expire 60 # segundos pfctl -t fail2ban -T show > /etc/pf.tables.fail2ban > Muito obrigado. > > > On Thu, 30 Sep 2010 12:06:30 -0300, Rodrigo Mosconi > <free...@mosconi.mat.br> wrote: >> Em 30 de setembro de 2010 08:52, Sergio Augusto Vladisauskis >> <sergi...@gmail.com> escreveu: >>> Galera, montei as seguintes regras no meu pf.conf: >>> >>> table <fail2ban> persist file "/etc/pf.table.fail2ban" >> >> Esta regra diz: >> carregue o conteúdo do arquivo "/etc/pf.table.fail2ban" para a tabela >> <fail2ban>, ie, só age para o load >> Não existe "sync" entre o arquivo e a tabela após o load >> >> >>> "pfctl -t fail2ban -T add <ip>" >> Você está acrescentando valores para a tabela em memória >> >>> consultar a tabela em memória (pfctl -t fail2ban -T show), todos os IPs >>> estão lá, até o próximo reboot da maquina. >>> O que poderia estar errado nesta regra? >>> Andei pesquisando e não achei nada relacionado a esse problema. >> >> Vc pode alterar o script para salvar o ip na tabela de depois realizar >> um reload da tabela >> >> printf 'table <fail2ban> persist fiel "/etc/pf.table.fail2ban"\n' | >> pfctl -m -f- >> >> Para mais detalhes: >> man pfctl >> man pf.conf >>> -- >>> Sergio Augusto Vladisauskis >>> -> Oportunix IT Services Brasil >>> -> Site: http://www.oportunix.com.br >>> -> Fone: +55 13 3822 2300 >>> -> Móvel: +55 11 8017 5065 >>> -> Skype: oportunix >>> -> Registered Linux User: 305281 >>> >>> ------------------------- >>> 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 > > -- > Sergio Augusto Vladisauskis > -> Oportunix IT Services Brasil > -> Site: http://www.oportunix.com.br > -> Fone: +55 13 3822 2300 > -> Móvel: +55 11 8017 5065 > -> Skype: oportunix > -> Registered Linux User: 305281 > ------------------------- > 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