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

オープン 初心者向け
#14,784 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
linux, python
領域
networking

調査の方向性

修正箇所はルーターの Python 製 netfilter コードです。CsNetfilter.add_ip4_chain から始めて、INPUT フックの ip4_acl ルールがどこで構築されているかを確認してください。その後、#12986 で参照されている forward フックの変更と比較してください。問題の確認には nft list chain ip ip4_acl INPUT を使います。ここでは、パブリック NIC とゲスト NIC には ct state established,related の accept が表示されるはずですが、ゲートウェイ NIC には表示されないはずです。プライベートゲートウェイ越しの ポート 53 への UDP とポート 22 への TCP にルーターから応答があり、ping も引き続き動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 18時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/cloudstack のほかの issue

apache/cloudstack の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。