Author Topic: Erro IDS/IPS Zenyal 6  (Read 5267 times)

marciogf

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Erro IDS/IPS Zenyal 6
« on: November 21, 2018, 01:17:02 pm »
Bom dia, não sei se alguém tá com o mesmo problema mas agora que migrei um servidor do meu escritório para versão 6 toda vez que tendo implementar o IDS/IPS ele automaticamente bloqueia a navegação, mesmo sem selecionar nenhuma regra, como se bloqueasse todo trafego da placa lan selecionada.
Alguma solução?

Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #1 on: September 05, 2019, 03:04:58 am »
Amigo estou com o mesmo problema, você conseguiu alguma solução?

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #2 on: September 05, 2019, 02:13:43 pm »
:)

Please, run these commands and give me the output:

Code: [Select]
sudo suricata --dump-config
sudo suricata --engine-analysis

I can't reproduce the behaviour which you describe.

Cheers!
« Last Edit: September 05, 2019, 02:24:07 pm by doncamilo »
- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,

Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #3 on: September 06, 2019, 03:07:04 am »
Executei os comandos e esses são estes e o restante estão no arquivo em anexo, pois nao coube aqui:

fsleal@zenleal:~$ sudo suricata --engine-analysis
5/9/2019 -- 21:58:02 - <Notice> - This is Suricata version 3.2 RELEASE
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/botcc.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/ciarmy.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/compromised.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/drop.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/dshield.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-attack_response.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-chat.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-current_events.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-dns.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-dos.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-exploit.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-ftp.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-imap.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-malware.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-misc.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-mobile_malware.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-netbios.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-p2p.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-policy.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-pop3.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-rpc.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-scada.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-scan.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-smtp.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-snmp.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-sql.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-telnet.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-tftp.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-trojan.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-user_agents.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-voip.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-web_client.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-web_server.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/emerging-worm.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/tor.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/http-events.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/smtp-events.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/dns-events.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES(42)] - No rule files match the pattern /etc/suricata/rules/tls-events.rules
5/9/2019 -- 21:58:02 - <Warning> - [ERRCODE: SC_ERR_NO_RULES_LOADED(43)] - 39 rule files specified, but no rule was loaded at all!


Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #4 on: September 06, 2019, 03:16:06 am »
Nao consigo postar todo log aqui então o log completo esta neste link:

https://docs.google.com/document/d/1Qxtsbp-j_k3Q21GnP0x2iJGoqa3JzIkI8tCqbgNqf2I/edit?usp=sharing

Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #5 on: September 09, 2019, 01:17:11 am »
Algumas pessoas estão tendo o mesmo problema, como pode se ver no link:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895342#20

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #6 on: September 10, 2019, 02:55:08 pm »
No seu arquivo de configuração, você especifica as interfaces eth0 e eth2. Elas correspondem às interfaces reais do seu sistema?

  pfring.0.interface = eth0
pcap.0.interface = eth0
af-packet.0.interface = eth0
...
netmap = (nulo)
netmap.0 = interface
netmap.0.interface = eth2
netmap.1 = interface
netmap.1.interface = padrão

Não parece o caso do bug relatado ao Debian, já que o Zentyal não usa "Nomes de Interface de Rede Previsíveis", mas o antigo esquema eth0, etc.

O Netmap é usado para estabelecer uma ponte da camada 2 entre a interface padrão e, neste caso, eth2 (https://suricata.readthedocs.io/en/latest/capture-hardware/netmap.html#ips)

As interfaces de configuração correspondem à sua rede real?

Uma saudação

PS: Camóes perdoa a tentativa contra a bela língua portuguesa para o Google Translator e eu :)
- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,

Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #7 on: September 10, 2019, 04:08:46 pm »
Não as minhas interfaces são eth0 e eth1 como faço pra alterar esse informação, agradeço também ajuda.
Como pode ser visto na imagem do link:
https://1drv.ms/u/s!Apa3Q-qHpv6WiAKynkFDzirIb0ag?e=ewzFN9

Percebi que os sites que ele bloqueia são os http utilizados na porta 80, geralmente utilizo IDS/IPS apenas nas interfaces externas.

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #8 on: September 17, 2019, 04:04:47 pm »
 :)

Criei um módulo Zentyal 6.0 por módulo e não observei o problema de conectividade que você descreveu no próprio Zentyal ou em um cliente com Windows 10.
Primeiro, configurei o módulo de rede com duas interfaces (externa e interna), depois configurei o DHCP para a interface interna. Em seguida, DNS e, finalmente, "IDS / IPS".
O cliente Windows 10 vai para a rede externa perfeitamente e, a partir do próprio Zentyal, posso resolver nomes etc.
A única coisa que me ocorre é solicitar que você use o comando iptables para nos fornecer as regras configuradas em todas as cadeias de todas as tabelas do seu firewall.
Uma saudação!
- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,

Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #9 on: September 18, 2019, 02:56:33 am »
O problema ocorre tanto com o proxy autenticado, quanto com o transparente, onde os sites http simplesmente param de funcionar apos ativação do modulo IDS/IPS. No caso fiz uma instalação limpa em um servidor de testes e apresentou o mesmo problema, testei a versão 5.1 e apresentou o mesmo problema, a unica versão que não apresentou esse problema foi a 3.3
« Last Edit: September 18, 2019, 03:08:10 am by Tiago »

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #10 on: September 18, 2019, 03:05:19 pm »
 :)

Eu adicionei o módulo HTTP-Proxy à configuração anterior e habilitei a opção "proxy transparente". A navegação de um cliente Windows ocorre conforme o esperado, de acordo com as regras que introduzi.

Você tentou montar o módulo do sistema por módulo, configurando-o manualmente?

Você verificou suas regras de firewall com o iptables?

Você pode alterar o parâmetro /etc/zentyal/zentyal.confç

Code: [Select]
debug = yes

Depois

Code: [Select]
sudo zs webadmin

Teste em máquinas clientes e verifique os logs /var/log/syslog
Uma saudação!
« Last Edit: September 18, 2019, 03:08:36 pm by doncamilo »
- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,

Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #11 on: September 18, 2019, 10:49:25 pm »
Realizei o seguinte teste:
- Realizei a instalação de uma instalação limpa da versão 6.0, e ativei os módulos, proxy-http,IDS/IPS, DHCP e antivirus, logo que habilito o IDS/IPS na eth0 que é a interface externa, automaticamente e bloqueia todo meu tráfego de internet, não consigo nem pingar o DNS da google 8.8.8.8, só consigo acessar após desabilitar o módulo IDS/IPS.

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #12 on: September 19, 2019, 02:06:08 pm »
 :)

Lo intento y te digo.

Un saludo.
- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,

Tiago

  • Zen Warrior
  • ***
  • Posts: 126
  • Karma: +11/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #13 on: September 19, 2019, 10:39:51 pm »
Esqueci de perguntar todas configuraçaoes voce esta fazendo via Web ou linha de comando? estou fazendo aqui via web, será que este é o problema?

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: Erro IDS/IPS Zenyal 6
« Reply #14 on: September 20, 2019, 01:10:18 pm »
 :)

He utilizado webadmin pero he instalado los módulos ordenadamente, uno por uno (no todos de vez), y he configurado los de red, firewall y DNS manualmente.

Un saludo!
- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,