Call of Duty 4: Modern Warfare Server Guide

📋 Quick Info

Server Specifications

🔌 Ports & Firewall Configuration

Call of Duty 4: Modern Warfare servers require specific ports to be open for proper operation:

Port Protocol Purpose Required
28960 UDP Game port (default, configurable) Yes
28960 TCP RCON remote control Optional
20500-20510 UDP PunkBuster (if enabled) Optional

Firewall Examples

UFW (Ubuntu/Debian):

sudo ufw allow 28960/udp comment 'CoD4 Game Port' sudo ufw allow 28960/tcp comment 'CoD4 RCON' sudo ufw allow 20500:20510/udp comment 'CoD4 PunkBuster'

FirewallD (CentOS/RHEL/Fedora):

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

iptables:

sudo iptables -A INPUT -p udp --dport 28960 -j ACCEPT sudo iptables -A INPUT -p tcp --dport 28960 -j ACCEPT sudo iptables -A INPUT -p udp --dport 20500:20510 -j ACCEPT

⚙️ Installation & Setup

System Requirements

Linux Installation

  1. Download Server Files: Obtain Call of Duty 4: Modern Warfare dedicated server files
  2. Create Server Directory:
    mkdir -p ~/cod4server cd ~/cod4server
  3. Extract Files: Extract server files to the directory
  4. Install 32-bit Libraries (64-bit Linux):
    sudo apt-get install lib32gcc1 lib32stdc++6 # Debian/Ubuntu sudo yum install glibc.i686 libstdc++.i686 # CentOS/RHEL
  5. Set Permissions:
    chmod +x cod4_lnxded
  6. Create Configuration: Create server.cfg in the main directory

Windows Installation

  1. Install Call of Duty 4: Modern Warfare dedicated server files
  2. Create a server.cfg file in the main directory
  3. Ensure Windows Firewall allows the game ports
  4. Install latest Visual C++ Redistributables if needed
  5. Run iw3mp.exe with appropriate parameters

📝 Configuration

Basic server.cfg Example

// Server Name set sv_hostname "My Call of Duty 4 Server" // Network Settings set net_ip "0.0.0.0" set net_port 28960 // Server Type (1=LAN, 2=Internet) set dedicated 2 // Player Limits set sv_maxclients 32 // RCON Password set rcon_password "your_secure_password_here" // Game Settings set g_gametype "war" // dm, war, sab, koth, sd, hq set sv_maxPing 350 set sv_minPing 0 // PunkBuster (0=off, 1=on) set sv_punkbuster 1 // Map Rotation set sv_mapRotation "gametype war map mp_crash gametype war map mp_backlot gametype war map mp_strike" // 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 1 set sv_voiceQuality 1 // Anti-Lag set sv_fps 20 // Downloads set sv_allowDownload 1 // Pure Server (verify client files) set sv_pure 1 // Spectating set scr_game_spectatetype 2 // 0=disabled, 1=team only, 2=free // Auto-Balance set scr_teambalance 1 // Anti-Cheat set sv_cheats 0

🚀 Startup Parameters

Parameter Description Example
+set dedicated Server mode (1=LAN, 2=Internet) +set dedicated 2
+set net_ip Bind to specific IP address +set net_ip "0.0.0.0"
+set net_port Server port (default: 28960) +set net_port 28960
+set fs_basepath Base installation directory +set fs_basepath "/home/user/cod4"
+set fs_homepath Config and log directory (deprecated in CoD4) +set fs_homepath "/home/user/.callofduty4"
+set fs_savepath Save path for logs and user data +set fs_savepath "/home/user/cod4data"
+set fs_game Mod folder (if using mods) +set fs_game "mods/pam4"
+set sv_punkbuster Enable PunkBuster (0=off, 1=on) +set sv_punkbuster 1
+exec Execute config file on startup +exec server.cfg
+set rcon_password RCON password for remote admin +set rcon_password "secret123"
+set sv_maxclients Maximum player slots +set sv_maxclients 32
+map_rotate Start map rotation from server.cfg +map_rotate
+map Start with specific map +map mp_crash

Example Startup Command (Linux)

./cod4_lnxded +set dedicated 2 +set net_ip "0.0.0.0" +set net_port 28960 +set sv_maxclients 32 +set sv_punkbuster 1 +set fs_savepath "/home/user/cod4data" +exec server.cfg +map_rotate

Example Startup Command (Windows)

iw3mp.exe +set dedicated 2 +set net_ip "0.0.0.0" +set net_port 28960 +set sv_maxclients 32 +set sv_punkbuster 1 +exec server.cfg +map_rotate

🔧 Troubleshooting

Server Not Appearing in Browser

Issue: Players cannot see the server in the in-game 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:

RCON Not Working

Issue: Cannot connect via RCON.

Solutions:

Mod/Custom Map Issues

Issue: Custom maps or mods not loading.

Solutions:

🎮 Game Types

Call of Duty 4: Modern Warfare supports the following game modes:

🗺️ Default Maps

Call of Duty 4: Modern Warfare includes the following default multiplayer maps:

Base Game Maps

Variety Map Pack (DLC)

Popular server modifications compatible with Call of Duty 4: Modern Warfare:

📚 Resources

Important Notes