Brazil's biggest MU Online portal — since 2003
Tutorial Advanced Infrastructure

How to segment your GameServer network to protect your MU Online server

Isolate the GameServer, ConnectServer, and database of your MU Online server into separate network segments, reducing the attack surface against DDoS, intrusion, and exposed-port exploitation.

RO Rodrigo · Updated on Apr 16, 2015 · ⏱ 15 min read
Quick answer

A typical private MU Online server unknowingly exposes far more than it should: it's common to see the GameServer, ConnectServer, database, and even the admin web panel all running on the same flat network, all reachable from the internet on the same ports. This turns any vulnerability in one compon

A typical private MU Online server unknowingly exposes far more than it should: it's common to see the GameServer, ConnectServer, database, and even the admin web panel all running on the same flat network, all reachable from the internet on the same ports. This turns any vulnerability in one component into an entry point for all the others. Segmenting the network — isolating each component in its own zone, with explicit firewall rules about who can talk to whom — is one of the most effective and least applied security measures among private server administrators. This tutorial shows how to plan and implement that segmentation, from topology design to specific firewall rules.

Why a flat network is a risk

On a flat network, if an attacker compromises the web server (usually the most exposed and most attacked component, since it runs a CMS or PHP panel), they gain direct network access to the database and the GameServer, because there's no barrier between them. A vulnerability in a login form on the site becomes, within a few steps, a full dump of the accounts and items database. Network segmentation breaks this chain: even if one component is compromised, the attacker can't "jump" laterally to the others without passing through an explicit firewall rule.

Typical MU server components and their ideal exposure

ComponentFunctionRecommended exposure
ConnectServerGame client entry pointPublic (port ~44405)
GameServerGame logic, characters, itemsInternal network only
DatabaseAccounts, characters, items, logsInternal network only, access restricted to GameServer
Web panel/siteRegistration, ranking, shopPublic (ports 80/443), but isolated from GameServer
DataServer (if applicable)Intermediary between GameServer and databaseInternal network only

The general rule: only the ConnectServer and the site need to be directly reachable from the internet. Everything else should live behind a firewall that blocks by default and opens only what's necessary.

Designing the network segments

A reference topology with three segments:

[ Internet ]
     |
[ Public Segment ]  -- ConnectServer, Site/Web Panel
     |  (rule: only specific ports opened)
[ Application Segment ]  -- GameServer, DataServer
     |  (rule: only GameServer talks to the database)
[ Database Segment ]  -- MSSQL/MySQL

Each arrow represents an explicit firewall rule, not an open path. Traffic between segments should be a documented exception, never the default.

Implementing with VPC and Security Groups (cloud)

If the server runs on a cloud provider (AWS, Azure, GCP, or local providers with VPC), segmentation is done via private subnets and security groups. An example VPC structure:

VPC: 10.0.0.0/16
├── Public Subnet:      10.0.1.0/24  → ConnectServer, Site
├── Application Subnet: 10.0.2.0/24  → GameServer, DataServer
└── Database Subnet:    10.0.3.0/24  → MSSQL/MySQL

The ConnectServer in the public subnet has an internet-reachable IP (or sits behind a Load Balancer); the GameServer and database live in private subnets, with no direct route to the internet, reachable only via internal IP.

Firewall rules per segment

The table below summarizes the minimum required rules between segments:

SourceDestinationPortReason
InternetConnectServer44405/TCPGame client connects to the ConnectServer
InternetSite/Web Panel443/TCPHTTPS access to the site
ConnectServerGameServerInternal protocol portConnectServer redirects the session to the GameServer
GameServerDatabase1433/TCP (MSSQL) or 3306/TCP (MySQL)GameServer reads/writes account and character data
Site/Web PanelDatabaseDatabase port, read-only if possibleSite displays ranking, account data (no direct write to item/character)
Any other sourceDatabaseNoneDefault block — nothing else should reach the database

Note that the site has its own path to the database, ideally with a database account with restricted permissions (only SELECT on ranking tables, never UPDATE/DELETE).

Configuring with iptables (dedicated Linux server)

If the components run on your own Linux servers (not managed cloud), iptables or nftables serve the same purpose. An example set of rules on the database server, accepting connections only from the GameServer's internal IP:

# Default policy: block everything
iptables -P INPUT DROP

# Allow loopback
iptables -A INPUT -i lo -j ACCEPT

# Allow only the GameServer on the MySQL port
iptables -A INPUT -p tcp -s 10.0.2.10 --dport 3306 -j ACCEPT

# Allow SSH only from a known management IP
iptables -A INPUT -p tcp -s 198.51.100.5 --dport 22 -j ACCEPT

# Log and drop the rest
iptables -A INPUT -j LOG --log-prefix "IPTABLES-DROPPED: "
iptables -A INPUT -j DROP

Save the rules with iptables-save and make sure they're restored on boot, or a reboot leaves the server unprotected.

Isolating the admin web panel

The admin panel (where GMs manage accounts, items, events) is a particularly sensitive target — it usually has direct write permissions to the database. Never expose it on the same public URL/port as the player-facing site. Recommendations:

  • Put the panel on a separate subdomain or port, protected by VPN or an allowed-IP list.
  • Use two-factor authentication for admin accounts.
  • Restrict the database account used by the panel to only the strictly necessary tables.

Segmenting the management network too (SSH/RDP)

A common mistake is segmenting the game services well but leaving administrative access (SSH, RDP, hosting panels) open to the internet without restriction. Treat management access as another segment: allow SSH/RDP only from an admin VPN or a fixed list of trusted IPs, never 0.0.0.0/0.

Monitoring and auditing the rules

Segmentation without monitoring is a false sense of security. Set up firewall logs (blocks and allows) and review periodically:

What to monitorFrequencyAction if anomalous
Blocked connection attempts to the databaseDaily (automated)Investigate the origin; consider blocking the IP
New firewall rules addedEvery changeReview by a second person before applying to production
Open ports on internal serversWeekly (internal scan)Close undocumented ports immediately
Access to the admin panelDailyConfirm all accesses came from the expected IPs/VPN

Testing the segmentation

After implementing it, actively validate that segmentation works as expected by attempting connections that should fail:

  1. From the public internet, try connecting directly to the database port — it should fail (timeout or connection refused).
  2. From the public segment (ConnectServer), try connecting to the database port — it should fail, since only the GameServer has permission.
  3. From the GameServer, confirm the connection to the database works normally.
  4. Run a port scanner (nmap) from outside the network against the public IP — confirm only the expected ports (ConnectServer, site) show as open.

Common errors and fixes

SymptomLikely causeFix
Database directly reachable from the internetFirewall rule allowing 0.0.0.0/0 on the database portRestrict the source to the GameServer's exact internal IP
GameServer can't connect to the database after segmentationFirewall rule also blocking legitimate trafficConfirm the correct internal IP of the GameServer in the allow rule
Compromised admin panel exposes the entire databasePanel on the same network/permissions as the public siteIsolate the panel in its own segment with VPN and a restricted database account
Firewall rules lost after rebootRules not persisted (iptables without save)Configure persistence via iptables-save/equivalent systemd service
Lateral attack after site compromiseFlat network with no separation between site and GameServer/databaseImplement segmentation into distinct segments as described in this tutorial

Network segmentation checklist

  • Segment topology designed (public, application, database).
  • Only ConnectServer and site directly exposed to the internet.
  • Explicit firewall rules by source/destination/port, block by default.
  • Admin panel isolated with VPN or IP list and 2FA.
  • Management access (SSH/RDP) restricted to VPN or trusted IPs.
  • Firewall rule persistence configured (survives reboot).
  • Active segmentation tests performed (connection attempts that should fail).
  • Firewall monitoring and logs configured with periodic review.

With the GameServer network properly segmented, the logical next step is to apply the same rigor to the data layer — see the database network segregation tutorial to dig deeper into protecting the most sensitive component of the entire server.

Frequently asked questions

Does network segmentation protect against DDoS?

It doesn't eliminate DDoS, but it reduces the impact by concentrating public exposure only on the ConnectServer and/or proxy, keeping the GameServer and database completely unreachable from the internet. To actually mitigate DDoS, combine segmentation with a protection service (Cloudflare Spectrum, OVH Anti-DDoS, or similar) in front of the public entry point.

Do I need expensive network hardware to segment (physical VLANs)?

No, in most cases. With a cloud provider (VPS/cloud), segmentation is done via virtual private networks (VPC) and firewall/security group rules, with no need for physical managed switches. Physical VLANs make more sense when components run on your own hardware in the same server room.

Does the ConnectServer really need to be exposed to the internet?

Yes, it's the entry point the game client first contacts to get the server list and redirect the connection. That's why it should be the only exposed component — everything else (GameServer, database, admin web panel) should sit behind it, unreachable directly from the internet.

How does the GameServer communicate with the database if they're on different segments?

Through a specific firewall rule that opens only the database port (e.g. 1433 for MSSQL, 3306 for MySQL) and only from the GameServer's internal IP, never open to the public network or other segments. That's exactly the definition of segmentation: communication allowed only between specific points, with everything else blocked by default.

Does network segmentation replace backups and other security practices?

No. Segmentation reduces the attack surface, but should be combined with regular backups, OS security updates, strong passwords, and log monitoring. It's one layer of defense, not the only one.

RO
Founder & editor-in-chief

Rodrigo has run ViciadosMU since the portal's early days. A specialist in MU Online server creation and administration, game history and the evolution of the seasons — he wrote much of the archive before 2024.

Keep reading

Related articles