Ok, so you want to host your own server.. and you want to know how. I hope you are willing to sacrifice a good amount of time and bandwith almost everyday to be a good host!
Step ONE:
If you are willing to play the game on the same computer, you are going to have to create another installation of the game. Since you will be replacing a few files in the directory. And also, for safe keeping, create back-ups of whatever you're replacing!
Step TWO:
Now that you have created another install of the game, you want to download the dedicated server files. This is a link that is directly taken from the alterIWnet forums, make sure you give them a visit too. This is the latest update to the dedicated server to avoid cheaters: Just search on the aIW forums.
Step THREE:
Extract all the files from the ...RCONFIX.zip to a folder. Copy all the contents of the newly created folder to the SECOND copy of your game (not the one you have a profile on). You will notice that you now have a new .exe file called iw4.exe
Step FOUR:
Create a shortcut to 'iw4.exe'. Right click the shortcut, and click on Properties. In the properties window you should see a text field labled 'Target'. The text field contains the path to the actual iw4.exe file. What you want to do here is, you want to add more to the field. So without deleting the path to iw4.exe, add this command-line arguement.
+set party_maxplayers 18 +set net_port 28961 +exec server.cfg +map mp_rust +map_rotate
Step FIVE
Notice the command-line tells the shortcut to execute a file called 'server.cfg'. This file contains the server (and game) options, like map-rotation, setting up the name for your dedicated server, team balance and so on. The contents to that should basically be this. (again, this is taken from NTAuthority's post from the same link as above)
// --- QUERY INFORMATION --------------------------------
set sv_hostname "Enter Server name here"
// optional settings returned by query, server listings may use this
sets _Admin "Admin Name"
sets _Email "adminsemail@example.com"
sets _Website "
http://alteriw.net/"
sets _Location "AU - Sydney"
// --- NON-GAMEPLAY CONFIGURATION -----------------------
set rcon_password "" // password for rcon, empty = disabled
set privateMatch_serverPassword "" // game password, leave empty for a public game
set sv_maxPing "300" // maximum ping, any higher and players will get kicked
set g_inactivity "0" // time in seconds before a player gets kicked if not moving
set g_inactivitySpectator "0" // time in seconds before a spectator gets kicked
set g_logSync "1" // 1 = always flush games_mp.log, 0 = only flush on game end
set g_log "games_mp.log" // game log file
set aiw_sayName "^7Console" // name server-side 'say' commands show up as
// --- BASE GAME CONFIGURATION --------------------------
set g_gametype "war" // game type
// war - Team Deathmatch
// dm - Free-for-all
// dom - Domination
// koth - Headquarters
// sab - Sabotage
// sd - Search and Destroy
// arena - Arena
// dd - Demolition
// ctf - Capture the Flag
// oneflag - One-Flag CTF
// gtnw - Global Thermo-Nuclear War
// uncomment below commands for some
**** **** //set g_hardcore "1"
//set ui_hud_hardcore "1"
//set scr_hardcore "1"
//set scr_player_maxhealth "30"
//set scr_team_fftype "1" // 1 = on, 2 = reflect, 3 = shared
//set scr_player_healthregentime "0"
set scr_thirdperson "0" // third-person mode
set scr_game_hardpoints "1" // killstreaks, 1 = on
set scr_game_perks "1" // perks, obviously
set scr_game_allowkillcam "1" // 1 = allow, 0 = disallow
set scr_diehard "0" // die-hard mode
set scr_teambalance "1" // player difference for game to consider 'unbalanced'
set scr_game_spectatetype "2" // by request?
// --- GAMETYPE CONFIGURATION ---------------------------
// - Team Deathmatch
set scr_war_scorelimit "10000"
set scr_war_timelimit "15" // timelimit, in minutes
set scr_war_playerrespawndelay "-1" // -1 is no respawn delay, 0 is automatic, > 0 is X seconds
set scr_war_waverespawndelay "0" // wave spawning, might be more 'tactical'
set scr_war_numlives "0" // number of lives
set scr_war_promode "0" // unknown
set scr_war_roundlimit "1" // maximum amount of rounds
set scr_war_winlimit "1" // amount of wins needed to win a round-based game
// - Domination
set scr_dom_scorelimit "200"
set scr_dom_timelimit "15" // timelimit, in minutes
set scr_dom_playerrespawndelay "-1" // -1 is no respawn delay, 0 is automatic, > 0 is X seconds
set scr_dom_waverespawndelay "0" // wave spawning, might be more 'tactical'
set scr_dom_numlives "0" // number of lives
set scr_dom_promode "0" // unknown
set scr_dom_roundlimit "1" // maximum amount of rounds
set scr_dom_winlimit "1" // amount of wins needed to win a round-based game
// - FFA
set scr_dm_scorelimit "10000"
set scr_dm_timelimit "15" // timelimit, in minutes
set scr_dm_playerrespawndelay "-1" // -1 is no respawn delay, 0 is automatic, > 0 is X seconds
set scr_dm_numlives "0" // number of lives
set scr_dm_promode "0" // unknown
// - Search and Destroy
set scr_sd_scorelimit "1"
set scr_sd_timelimit "2.5" // timelimit, in minutes
set scr_sd_playerrespawndelay "-1" // -1 is no respawn delay, 0 is automatic, > 0 is X seconds
set scr_sd_waverespawndelay "0" // wave spawning, might be more 'tactical'
set scr_sd_numlives "1" // number of lives
set scr_sd_promode "0" // unknown
set scr_sd_roundlimit "0" // maximum amount of rounds, 0 is 'until someone wins'
set scr_sd_winlimit "6" // amount of wins needed to win a round-based game
set scr_sd_roundswitch "4" // after X rounds, switch sides?
set scr_sd_bombtimer "45"
set scr_sd_defusetime "5"
set scr_sd_multibomb "0" // allow multiple people to 'have the bomb'?
set scr_sd_planttime "5"
// ... other gametypes might be easy to figure out, or come in a future update of the template ...
// --- AUTOMATED ROTATION -------------------------------
set sv_mapRotation "gametype war map mp_afghan gametype war map mp_boneyard gametype war map mp_brecourt gametype war map mp_checkpoint gametype war map mp_derail gametype war map mp_estate gametype war map mp_favela gametype war map mp_invasion gametype war map mp_nightshift gametype war map mp_quarry gametype war map mp_rundown gametype war map mp_subbase gametype war map mp_terminal gametype war map mp_underpass gametype dom map mp_afghan"
Save all the above contents to a text file named 'server.cfg' in the MAIN folder. Note this is the main folder in the SECOND aIW install.
Step SIX:
The command line arguement also has 'party_maxplayers 18 +set net_port 28960'. party_maxplayers 18 is basically the amount of people you want on your server. And net_port 28960 is the port your server runs on. I recommend changing this port to another number (+1.. eg: 28961), why? because you cant play on the same port that you are hosting on. So, in short, if you are playing on the same computer, change the port. If not, its fine.
Step SEVEN:
Most of the easiest stuff is done. Now comes the port-forwarding. The place many people fail at. I just got lucky, really. To do this, you will have to connect to your router. This can be done by opening you web browser of choice and entering '192.168.0.1' or '192.168.1.1' or '192.168.2.1' (to get this number, it should be on your modem/router. Or the packaging for the router.)
Once you've typed it in the browser and hit enter, you will be prompted for a password to access the router configuration. By default, the username:password is admin:admin (unless you've changed it in the past.)
Ok, so now you're in. Now, find a menu item called, NAT or Virtual Server or Port Forwarding.
Since we all have different routers, this is really hard for me to explain. My router had a different method of forwarding the ports. But a VERY VERY VERY helpful guide can be found here.
http://portforward.com/ -> select your router model.
Step EIGHT:
So by now you should have
Installed MW2 (1 is the one you play with, Second is the one you host with. You cannot play with only one install)
Downloaded the Server Files (
http://alteriw.net/dedicate/beta/aiw-dedicated-0.3b-RCONFIX.zip)
Extracted the .zip file and copied all folders to the MW2 directory you made for the server.
Created a server.cfg file. See the code above.
Created a shortcut to iw4.exe and added the command line arguement also given above.
Credits: Minight & Killswitch.