---
title: Solution to Low-latency MC server cross from Mainland China to Overseas
description: A quick guide for effectively building a low-latancy Minecraft server, especially for players in Mainland China
---
# Solution to Low-latency MC server cross from Mainland China to Overseas
## Network Route
```diff
! for players in Mainland China
Clients -> HK CN2 VPS -> Cloudflare Spectrum Proxy -> TPE Home-lab Server
! for overseas players
Clients -> Cloudflare Spectrum Proxy -> TPE Home-lab Server
```
## Practice
- Set **port forwarding** from ++HK Host IP++ to ++CF Proxy IP++
- Config CF Proxy to **sending proxy protocol** to ++TPE Home-lab Server++
- Use Velocity Proxy for **transcoding proxy protocol** and sending to PaperMC server
### port forwarding iptables setting
```bash !
iptables -t nat -A PREROUTING -d $Host_IP -p tcp --dport $in_port -j DNAT --to-destination $CF_IP:$CF_port
iptables -t nat -A POSTROUTING -d $CF_IP -p tcp --dport $CF_port -j SNAT --to $Host_IP
```
Clean up chains in NAT table
```
iptables -t nat -F PREROUTING
```