This one I will borrow from ESS and Andreas. He posted so good tutorial I don't need to add anything.
Step 1: Open ports on your router/modem
It's needed to know what kind of system you have for the next steps. So please start with answering the following question.
Do you have more than one PC with access to the Internet? (Do you have a router? Do you have a modem with inbuilt firewall?)
1. No, I only got one PC with access to Internet.
2. Yes. I have a router or a modem with inbuilt firewall.
1.1: If you answered no, go to step 1.3.
1.2: If you answered yes:
Please find the brand and model-number of your router or modem.
It usually stands under the router/modem. When you have found the name and number go to this site:
PortForward.com and try to find your router there.
When you found your router click on the corresponding link.You will get a detailed page which tells you how to open ports on your router. Follow the steps carefully.
If you don't find your router or modem in the list, try search for a similar model or just choose a random router. The principle is the same on all routers and modems.
These ports needs to be opened to be able to run a BF1942 server:
Port Protocol Note
14567 UDP BF1942
14667 TCP
14690 UDP
27900 UDP Game Spy Master Server UDP Heartbeat
28900 TCP Game Spy Master Server List Request
23000 to 23009 (all ports in between) UDP
4711 TCP Remote Console
It will ask you for an internal IP address on Portforward. It will look something like this 192.168.0.101, or 10.0.0.1 as an example. To find out which one you have open the Start Menu and click on Run. Type cmd and press enter. Now type ipconfig and press enter again. Your internal ip-address is on the first row in the command window.
When you have successfully opened the requested ports you can go forward.
Step 1.3:
Now check if you have a software firewall. If you do, add the ports shown in the table above to your firewall.
As this is the most tricky part of making a server it's a good idea to test the server already at this state. Go to the start menu folder of BF1942 and click on "Run dedicated server". Choose a map and set to Internet and then turn the server on. Now open the game, and check if you can see the server in the list. If it doesn't show up, try to join by your external IP. (Note, some router blocks the ability to join through your external IP.) If you are not able to see the server or join it, then something is wrong with the ports.
Step 2: Downloading the server managers
Now it's time to download the Battlefield Server Manager (by BlackBagOps.com). With the Server Manager you're able to manage your server through a easy and user friendly program.
http://elitesniperserver.com/media/downloads-page.asp?folder=Software/Server%20Managers/Server%20Manager&fileID=2
If you want admins to your server then it's a good idea to download Remote Manager. It lets your administrators connect to your server and access the pages you gave the user access to. Usually the player list (ability to kick players).
http://elitesniperserver.com/media/getFile.asp?d=BFRemoteManager20beta3k.zip&folder=Software/Server%20Managers/Remote%20Manager
Step 3: Getting the BF Server Manager working
First open the zip file with the Server manager and then extract it this folder:
C:\Program Files\EA GAMES\Battlefield 1942 Secret Weapons of WWII Demo\
Follow the included Read Me file for more information
Manually Adding Settings:
Go to the Battlefield 1942 folder and open the server program and add the following settings.
Server tab:
Server Tab
Server Name: Change to what your server's name is. This the name that others will see in the list.
Maximum Players: Total number of players you want to allow in your server.
Welcome Message: The message the players see when they have joined your server.
Server Type: If you want a internet server then choose internet else choose LAN.
Game Tab
Game Tab
Modification: Change this to XPack2
Game Mode: Change to the type of game you want. Team death match, Conquest, etc
Rounds Per Level: Change this to 10
Admin Tab
Admin Tab
Enable Remote Console: Change the username to something randomly. You will not use this username later.
Enable Remote Admin: Mark the box. Write a password which you can remember. (you will use this password if you are kicking through console in-game)
Number Reserved Player Slots: This will set a password when it's that number of slots left. Good if you want to give your admins guaranteed access.
Server Reserved Slot Password: The password which you will have to enter if it's only reserved slots left.
Server Monitor Timer Period: Change this to 10. (Lowest)
Enable auto-kick on banned name: Mark the box. Then click Edit BannedNames.con, then write the player names which you don't want in your server.
Enable auto-announce: Mark the box. Then click Edit Announcements.con Here you can write messages which will show regularly in the server, like server rules.
Enable CSV stat logging: Mark the box. (more about CSV stat logging later)
Maps Tab
Maps Tab
Hellendoorn: Mark the box.
Now push Options in the menu in the bottom and do the settings like this picture shows:
Options
Now you're finally done with the settings!
(This is just the basic settings for running a server, you can go back later to optimize the settings)
Step 4: Testing the server
We are finally here! Time to test the server.
Push the Start button in the bottom menu. A black screen will appear. Now go back in the Server manager and push Hide in the bottom menu.
Now if you have done everything right then you should be able to see your server in the game and be able to join without problems!