How to Protect Your MT5 Infrastructure Against DDoS Attacks, Downtime and Data Loss
DDoS attacks and hacking attempts on MT5 brokers are rising, and some have caused both prolonged downtime and trading data loss. This guide combines MetaQuotes’ latest redundancy recommendations with proven best practices: backup servers, multi-region access points, DDoS filtering, monitoring and failover planning.
For brokers operating on MetaTrader 5, platform disruptions rarely occur at random. They tend to coincide with periods of peak market activity, such as Non-Farm Payrolls (NFP) releases, central bank decisions or sharp moves in crypto markets, when clients lose connectivity and support volumes rise sharply. While some incidents stem from genuine capacity constraints, many are deliberate DDoS attacks timed for maximum impact and frequently followed by ransom demands.
MetaQuotes, the developer of MetaTrader 5, has now warned brokers that hacking and DDoS attacks on their infrastructure are increasing. Some recent incidents caused not only prolonged platform downtime and financial losses, but partial loss of trading data, which is far more serious. In most cases the root cause was the same: insufficient redundancy.
In a recent announcement MetaQuotes is urging every broker to review their trading infrastructure now and fix any gaps.
Step 1: Never expose the trade server directly
The MT5 trade server holds accounts, orders and the actual business. It should have no public IP that clients connect to. Clients should only ever reach access servers, which sit in front and relay connections inward. The trade server should accept traffic only from those access servers, ideally over a private network or a dedicated cross connect.
Step 2: Deploy multiple backup servers across separate data centers
Insufficient backup capacity was the common factor in the recent incidents that led to trading data loss. To prevent this, MetaQuotes recommends the following:
- At least 2 backup servers, covering both the trading server and the history server, so backups are complete. That is the bare minimum; 4 or more is the safer setup.
- Backup servers in different data centers, so an outage at one site can’t take out your primary and your backups together.
- Regular checks on backup server status, and routine tests that the infrastructure is actually ready to switch over.
Having backup servers in place is only half the job; they also need to work when it matters. NetShop regularly assists clients with failover simulation tests, so that if MT5 ever has to switch to a backup server in a real incident, the full trading environment, including bridges, CRMs, plugins and other third-party components, continues to operate as expected.
Step 3: Run at least three access points, spread across regions
MetaQuotes recommends at least 3 access points per trading server, plus extra access points in each significant region where you have clients: Europe, Asia, Middle East, LatAm wherever your traders are.
Deploying a minimum of three access points delivers several key benefits:
- Stronger DDoS resilience: an attack on one entry point doesn’t take everyone offline.
- Continuous availability: the platform stays reachable even if one or more access points fail.
- Fast failover: client traffic can be redirected to backup servers quickly during an incident.
- Better load distribution and lower latency: clients connect to the nearest point and load is spread evenly.
Check the connection map in MetaTrader 5 Administrator regularly, and adjust the number and location of access servers to match where your clients actually are.
Special attention should be given to the resources allocated to each access server. The fewer access servers you deploy, the more client connections each one must handle, so CPU, RAM and network capacity need to be sized accordingly. Each server should also have enough headroom to absorb the additional load if another access point goes offline.
Step 4: Put real DDoS filtering in front
A single server’s firewall cannot absorb a 50 or 100 Gbps flood; your uplink fills up long before iptables gets a say. You need filtering upstream, at the network level, before traffic reaches your servers.
Here are two options:
- Network-level DDoS protection from your hosting provider, which scrubs traffic at the edge and passes the clean flow through.
- Third-party anti-DDoS proxy networks. MetaQuotes added an Anti DDoS Proxy Server component to MT5 in 2018 so brokers can route clients through providers like Akamai. Cloudflare Spectrum also supports MT5.
Whatever you choose, check the latency it adds under normal conditions. For a trading platform, protection that adds 40 ms to every quote is just a different kind of outage.
The AEGiS DDoS Protection Solution is ideal it can clean traffic and deliver it to the trading server with zero added latency.
Step 5: Add a smart TCP proxy layer
Upstream scrubbing handles volume attacks. The sneakier ones are application-layer floods: thousands of half-open connections or login attempts that look legitimate. A HAProxy instance in TCP mode in front of each access server gives you control over that.
A simple example that limits connections per source IP:
frontend mt5_inbound
bind :443
mode tcp
stick-table type ip size 200k expire 30s store conn_cur,conn_rate(10s)
tcp-request connection track-sc0 src
tcp-request connection reject if { sc_conn_cur(0) gt 20 }
tcp-request connection reject if { sc_conn_rate(0) gt 30 }
default_backend mt5_access
backend mt5_access
mode tcp
balance leastconn
server ac1 10.10.0.11:443 check
server ac2 10.10.0.12:443 check backup
If you need help deploying, configuring or fine-tuning HAProxy server in front of your MT5 platform, NetShop’s support team can assist.
Step 6: Monitor latency and backups
Problems should be detected before clients notice them. A proactive monitoring setup for an MT5 environment should cover:
- Connection latency to each access server, measured from multiple regions rather than only from inside your own network, so you see what your clients actually experience.
- Traffic patterns on access servers, where sudden, unexplained surges are often the first sign of an attack.
- Health of backup servers, including replication status, so a silent failure is caught long before a failover is needed.
Alerts should focus on sustained changes rather than momentary spikes; otherwise teams quickly start ignoring them. Making key metrics visible to the dealing desk and operations team ensures issues are spotted and escalated quickly.
Be proactive – Don’t wait for the first serious incident
Redundancy has to be in place before an attack, not after. The cost of additional infrastructure is small compared to the financial and reputational damage of a platform outage or lost trading data.
NetShop hosts trading infrastructure for brokers in Equinix LD4, AM2, SG5 and other financial hubs, with low-latency cross connects to liquidity providers.
Our AEGiS DDoS Protection filters attacks at the network edge without adding latency to normal trading traffic, and Obsera monitoring watches your access points and backup servers around the clock. Ask us for an MT5 infrastructure review, and we will tell you where the weak spots are.
Disclaimer: MetaTrader 4™ and MetaTrader 5™ are trademarks of MetaQuotes Software Corp.,







