Issues with TiCDC Network Security Policies

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: ticdc网络安全策略问题

| username: zhanggame1

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 7.5
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
We are using TiCDC and isolating upstream and downstream with a firewall.
The upstream can access all servers and ports downstream. The question is whether the downstream needs to access the upstream. If not, we will block it with the firewall.

| username: 希希希望啊 | Original post link

Turn off the firewall

| username: ffeenn | Original post link

Normally, on the TiCDC side, you just need to allow the TiCDC port through the firewall for the specified source IP. TiCDC will access the downstream database port.

| username: zhaokede | Original post link

Specify the IP and port, it definitely won’t open all ports. Use the whitelist method.

| username: ffeenn | Original post link

Check out this article, TiCDC Source Code Reading (1) TiCDC Architecture Overview | PingCAP

| username: Daniel-W | Original post link

Should TiCDC be placed upstream or downstream? If placed upstream, it is best to open the CDC port through the downstream URL address.

| username: zhanggame1 | Original post link

TiCDC is deployed upstream. The main issue is whether the downstream has any access to the upstream. If not, then network security is completely blocked.

| username: TiDBer_7S8XqKfl-1158 | Original post link

Ensure that the upstream TiDB cluster and TiCDC can access all necessary ports of the downstream system. These ports depend on the type and configuration of the downstream system.

| username: YuchongXU | Original post link

It is recommended to disable the local firewall.

| username: 呢莫不爱吃鱼 | Original post link

Opening the firewall and adding to the whitelist should be enough.

| username: TiDBer_rvITcue9 | Original post link

Turn on the firewall and try adding it to the whitelist.

| username: 小龙虾爱大龙虾 | Original post link

Suggested strategy: Do not set policies between nodes (including CDC) in the upstream TiDB cluster, do not set policies between nodes in the downstream TiDB cluster, and enable one-way access policies from all upstream CDC nodes to all TiDB server stage service ports.

| username: zhanggame1 | Original post link

In the end, that’s what I did.

| username: 濱崎悟空 | Original post link

Add to whitelist