Call of Duty: Modern Warfare 2 (IW4x) Server Guide
📋 Quick Info
Server Specifications
- Game: Call of Duty: Modern Warfare 2 (2009) - IW4x Client
- Platform: Windows (IW4x community project)
- Default Port:
Varies (configurable)
- Max Players: 18 (IW4x limitation)
- Control Protocol: RCON
- Executable: iw4x.exe
- Special: Community-maintained client with enhancements
🔌 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
- OS: Windows 7/8/10/11 or Windows Server 2016+
- CPU: 2+ cores @ 2.5GHz recommended
- RAM: 2GB minimum, 4GB recommended
- Disk: 15GB for game files
- Network: Low latency connection, 10Mbps+ bandwidth
- Requirements: Original MW2 game files + IW4x client
Installation Steps
- Install Modern Warfare 2: You must have legitimate MW2 game files
- Download IW4x: Obtain IW4x client from official IW4x website (https://iw4x.org)
- Extract IW4x: Extract IW4x files into your MW2 game directory
- Create Server Config: Create
server.cfg in userraw folder
- 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:
- Verify
-dedicated parameter is set
- Ensure UDP port is open in Windows Firewall
- Check IW4x master server connectivity
- Try direct connect using IP:PORT
- Verify latest IW4x version is installed
Server Crashes on Startup
Issue: Dedicated server crashes immediately after launch.
Solutions:
- Check
games_mp.log for error messages
- Verify all required MW2 game files are present
- Ensure
server.cfg syntax is correct
- Update to latest IW4x version
- Verify
sv_maxclients does not exceed 18
- Check that IW4x files are not corrupted
Connection Problems
Issue: Players cannot connect or timeout.
Solutions:
- Verify firewall rules allow traffic on game port
- Check
sv_maxPing setting
- Ensure server is not full (max 18 players)
- Disable password if testing:
set g_password ""
- Verify clients are using same IW4x version
High Lag/Ping Issues
Issue: Players experience significant lag.
Solutions:
- Increase
sv_fps setting (recommended: 20)
- Reduce
sv_maxclients if server is overloaded
- Check server CPU and RAM usage
- Verify network bandwidth is sufficient
- Lower
sv_maxPing to restrict high-ping players
Player Limit Issues
Issue: Cannot set more than 18 players.
Solutions:
- IW4x has a hard limit of 18 players - this is by design
- Do not attempt to exceed this limit as it will cause crashes
- This is a limitation of the IW4x engine modification
RCON Not Working
Issue: Cannot connect via RCON.
Solutions:
- Verify
rcon_password is set in server.cfg
- Ensure TCP port is open (same port as game UDP port)
- Use IW4x-compatible RCON tools
- Test RCON from in-game console first
🎮 Game Types
Modern Warfare 2 (IW4x) supports the following game modes:
- dm - Deathmatch (Free-for-all)
- war - Team Deathmatch
- sab - Sabotage
- koth - Headquarters
- sd - Search & Destroy
- arena - Arena
- dd - Demolition
- ctf - Capture the Flag
- oneflag - One Flag CTF
🗺️ Default Maps
Modern Warfare 2 includes the following multiplayer maps:
Base Game Maps
- mp_afghan - Afghan
- mp_derail - Derail
- mp_estate - Estate
- mp_favela - Favela
- mp_highrise - Highrise
- mp_invasion - Invasion
- mp_checkpoint - Karachi
- mp_quarry - Quarry
- mp_rundown - Rundown
- mp_rust - Rust
- mp_boneyard - Scrapyard
- mp_nightshift - Skidrow
- mp_subbase - Sub Base
- mp_terminal - Terminal
- mp_underpass - Underpass
- mp_brecourt - Wasteland
DLC Maps
- Stimulus Package: Bailout, Salvage, Storm, Overgrown (CoD4 remake), Crash (CoD4 remake)
- Resurgence Pack: Carnival, Fuel, Trailer Park, Strike (CoD4 remake), Vacant (CoD4 remake)
Popular server modifications compatible with IW4x:
- B3 (Big Brother Bot) - Python-based admin bot with RCON wrapper, player warnings, ban management, statistics tracking, and automated moderation for Call of Duty servers
- IW4x Scripts - Custom GSC scripts for enhanced gameplay
- Custom Maps - Community-created maps compatible with IW4x
📚 Resources
- Official Website: https://iw4x.org
- Community Discord: IW4x Discord server
- Forums: IW4x community forums
- Documentation: IW4x wiki and guides
Important Notes
- IW4x is a community-maintained client that provides dedicated server functionality and bug fixes for MW2
- Maximum 18 players - this is a hard limit in IW4x and cannot be exceeded
- You must own legitimate Modern Warfare 2 game files to use IW4x
- IW4x uses different command-line syntax than older CoD games (-dedicated flag instead of +set dedicated)
- IW4x includes built-in anti-cheat and security improvements
- Custom maps and mods are supported through IW4x
- Always use the latest IW4x version for best compatibility and security
- Regular backups recommended for server configurations
- IW4x is Windows-only (no Linux dedicated server)