Call of Duty: Modern Warfare 2 (IW4x) Server Guide

📋 Quick Info

Server Specifications

🔌 Ports & Firewall Configuration

IW4x Modern Warfare 2 servers use configurable ports. Default configuration typically uses:

Port Protocol Purpose Required
28960 (configurable) UDP Game port Yes
Same as game port TCP RCON remote control Optional

Firewall Examples

UFW (Ubuntu/Debian):

sudo ufw allow 28960/udp comment 'MW2 IW4x Game Port' sudo ufw allow 28960/tcp comment 'MW2 IW4x RCON'

FirewallD (CentOS/RHEL/Fedora):

sudo firewall-cmd --permanent --add-port=28960/udp sudo firewall-cmd --permanent --add-port=28960/tcp sudo firewall-cmd --reload

Windows Firewall:

netsh advfirewall firewall add rule name="MW2 IW4x UDP" dir=in action=allow protocol=UDP localport=28960 netsh advfirewall firewall add rule name="MW2 IW4x TCP" dir=in action=allow protocol=TCP localport=28960

⚙️ Installation & Setup

System Requirements

Installation Steps

  1. Install Modern Warfare 2: You must have legitimate MW2 game files
  2. Download IW4x: Obtain IW4x client from official IW4x website (https://iw4x.org)
  3. Extract IW4x: Extract IW4x files into your MW2 game directory
  4. Create Server Config: Create server.cfg in userraw folder
  5. Configure Firewall: Allow game ports through Windows Firewall

📝 Configuration

Basic server.cfg Example

// Server Name set sv_hostname "My MW2 IW4x Server" // Network Settings set net_port 28960 // Server Type set dedicated 1 // Player Limits (MAX 18 for IW4x) set sv_maxclients 18 // RCON Password set rcon_password "your_secure_password_here" // Game Settings set g_gametype "war" // dm, war, sab, koth, sd, arena, dd, ctf, oneflag set sv_maxPing 350 // Map Rotation set sv_mapRotation "gametype war map mp_terminal gametype war map mp_highrise gametype war map mp_rust" // Password Protection (leave empty for public) set g_password "" // Friendly Fire set scr_team_fftype 0 // 0=off, 1=on, 2=reflect // Kill Cam set scr_game_allowkillcam 1 // Hardcore Mode set scr_hardcore 0 // Game Log set g_log "games_mp.log" set g_logsync 2 // Voice Chat set sv_voice 0 // Anti-Lag set sv_fps 20 // Auto-Balance set scr_teambalance 1 // IW4x-Specific Settings set party_enable 0 set party_maxplayers 18

🚀 Startup Parameters

Parameter Description Example
-dedicated Run as dedicated server -dedicated
+set net_port Server port +set net_port 28960
+set sv_maxclients Maximum player slots (MAX 18) +set sv_maxclients 18
+set rcon_password RCON password for remote admin +set rcon_password "secret123"
+exec Execute config file on startup +exec server.cfg
+map_rotate Start map rotation from config +map_rotate
+map Start with specific map +map mp_terminal

Example Startup Command

iw4x.exe -dedicated +set net_port 28960 +set sv_maxclients 18 +exec server.cfg +map_rotate

Example Batch File (start_server.bat)

@echo off title MW2 IW4x Dedicated Server iw4x.exe -dedicated +set net_port 28960 +set sv_maxclients 18 +exec server.cfg +map_rotate pause

🔧 Troubleshooting

Server Not Appearing in Server Browser

Issue: Players cannot see the server in IW4x browser.

Solutions:

Server Crashes on Startup

Issue: Dedicated server crashes immediately after launch.

Solutions:

Connection Problems

Issue: Players cannot connect or timeout.

Solutions:

High Lag/Ping Issues

Issue: Players experience significant lag.

Solutions:

Player Limit Issues

Issue: Cannot set more than 18 players.

Solutions:

RCON Not Working

Issue: Cannot connect via RCON.

Solutions:

🎮 Game Types

Modern Warfare 2 (IW4x) supports the following game modes:

🗺️ Default Maps

Modern Warfare 2 includes the following multiplayer maps:

Base Game Maps

DLC Maps

Popular server modifications compatible with IW4x:

📚 Resources

Important Notes