ROUTED VPC router drops replies to its own traffic over a private gateway

Aberta Para iniciantes
#14,784 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
62/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
linux, python
Domínio
networking

Direção de pesquisa

A correção está no código Python de netfilter do roteador. Comece em CsNetfilter.add_ip4_chain e encontre onde as regras ip4_acl do hook INPUT são construídas; depois compare com a mudança do hook forward referenciada em #12986. Confirme o problema com nft list chain ip ip4_acl INPUT, que deve mostrar aceitações de ct state established,related para as NICs pública e de convidados, mas não para a NIC do gateway. Está concluído quando UDP para a porta 53 e TCP para a porta 22 através do gateway privado recebem respostas do roteador e o ping continua funcionando.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug
problem

On a ROUTED VPC the router can't get replies back for connections it starts itself over a private gateway.
DNS and TCP from the router to a network behind the gateway time out, while ping works.
It looks like the ip4_acl INPUT chain has no ct state established,related accept, so the replies hit the drop policy. Ping only gets through because echo replies are accepted by type.

versions

CloudStack 4.22.1.1, KVM, systemvm template 4.22.0. ROUTED VPC with Static routing and a private gateway (no BGP). Also reproduced on the 4.20 router scripts.

The steps to reproduce the bug
  1. Create a ROUTED VPC with a private gateway (e.g. 100.64.0.1/30) and put a host on the far side (100.64.0.2) running sshd and something on UDP 53.
  2. On the router, ping 100.64.0.2 works.
  3. A UDP query to 100.64.0.2 port 53 or a TCP connect to port 22 from the router times out. tcpdump on the far side shows it answering every time (UDP reply, SYN-ACK), and the router keeps retrying.
  4. nft list chain ip ip4_acl INPUT has ct state established,related accepts for the public NIC and guest tiers, nothing for the gateway NIC.
What to do about it?

Add ct state established,related accept to the input hook in CsNetfilter.add_ip4_chain, like #12986 did for the forward hook. With that rule on the same router, the UDP and TCP tests both work. I'll raise a PR against 4.20.

Linguagem predominante
Java
Estrelas
3.1k
Forks
1.4k
Merge médio
6d 18h
PRs com merge (30d)
11

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/cloudstack

Todas as issues de apache/cloudstack

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.