Unix Diablo II Server

What is a Diablo II Open Server?

A Diablo II Open Server means that your character is not stored on PvPGN like on the real Battle.net (TM). When you play on Battle.net (TM), your player is stored on their server. In Open Battle.net (TM) game play, your character is stored on your local computer instead. This only requires PvPGN to be running on the server side. It has several advantages & disadvantages.

Advantages:
 * Single player character can be used to play on Battle.net (TM)
 * Backups can be made of your character in case your character file gets hosed or lost

Disadvantages:
 * Players can easily cheat, like using trainers and hacks
 * Admin has very little to no control over player's characters

To play on an Open Battle.net (TM) Server:
 * Start Diablo II or Diablo II LOD
 * Select the Gateway of the machine you want to connect to
 * Click on the Other Multiplayer button
 * Click on the Open Battle.net (TM) button

What is a Diablo II Closed Server?

A Diablo II Closed Server means that your character is stored on the PvPGN server just like the real Battle.net (TM). This requires D2CS, D2DBS & D2GS to be running in addition to PvPGN on the server side. It has several advantages & disadvantages as well.

Advantages:
 * Hacks & trainers are much easier to detect
 * Players have a much harder time trying to cheat
 * The admin of the server has more control over player's characters

Disadvantages:
 * Single player characters cannot be used
 * Backups can't be made of the character by the player
 * Slow servers or bandwidth can cause lagging or additional wait time
 * Player is at the mercy of the admin, should the admin wish to delete the character
 * If you don't log in frequently, your account could be deleted, along with your character

To play on an Closed Battle.net (TM) Server:
 * Start Diablo II or Diablo II LOD
 * Select the Gateway of the machine you want to connect to
 * Click on the Battle.net (TM) button

You may run both an open & closed server at the same time. The player, in such a situation, would then choose which game play they would like to use (open or closed).

What is a Diablo II closed realm?

A Diablo II closed realm is the realm that you play in, on a Diablo II closed server.

UNIX configuration for Diablo II Server
What you need to configure:


 * bnetd.conf
 * realm.conf
 * d2cs.conf
 * d2dbs.conf
 * address_translation.conf
 * versioncheck.conf
 * autoupdate.conf (optional)
 * Router / Firewall

Edit bnetd.conf
Open the /etc/bnetd.conf file in your preferred editor

(I’ll use vi or vim, a text based editor):

[root@mybox]# cd /etc/ [root@mybox]# vi bnetd.conf

After opening the file in the editor, search for the client verification and upgrades section and look for the following line:

allowed_clients = all

Now you must setup your own options for the clients you will allow to connect to your server:

allowed_clients = d2dv,d2xp

Edit realm.conf
Open the /etc/realm.conf file in your preferred editor

(I’ll use vi or vim, a text based editor):

[root@mybox]# cd /etc/ [root@mybox]# vi realm.conf

After opening the file in the editor, look for the following line:


 * 1) "D2CS"                "PvPGN Closed Realm"            1.2.3.4:6113

Now you must uncomment the line by deleting the # and enter the LAN IP Address

(Lets say your LAN IP is 192.168.1.2):

"MyRealm"                "PvPGN Closed Realm"            192.168.1.2:6113

Edit d2cs.conf
Open the /etc/d2cs.conf file in your preferred editor

(I’ll use vi or vim, a text based editor):

[root@mybox]# cd /etc/ [root@mybox]# vi d2cs.conf

After opening the file in the editor, search for the server major settings section and look for the following line:


 * 1) realmname             =       D2CS

Now you must uncomment the line by deleting the # and enter the realm name exactly as you set it in realm.conf:

realmname             =       "MyRealm"

Next look for the following line:

gameservlist		=	,

Now you must enter the LAN IP Address of D2GS Server

(Lets say your LAN IP is 192.168.1.3):

gameservlist		=	192.168.1.3

Lastly look for the following line:

bnetdaddr		=	:6112

Now you must enter the LAN IP Address of PvPGN Server

(Lets say your LAN IP is 192.168.1.2):

bnetdaddr		=	192.168.1.2:6112

Edit d2dbs.conf
Open the /etc/d2dbs.conf file in your preferred editor

(I’ll use vi or vim, a text based editor):

[root@mybox]# cd /etc/ [root@mybox]# vi d2dbs.conf

After opening the file in the editor, search for the server major settings section and look for the following line:

gameservlist           =       ,

Now you must enter the LAN IP Address of D2GS Server

(Lets say your LAN IP is 192.168.1.3):

gameservlist		=	192.168.1.3

Edit address_translation.conf
Open the /etc/address_translation.conf file in your preferred editor

(I’ll use vi or vim, a text based editor):

[root@mybox]# cd /etc/ [root@mybox]# vi address_translation.conf

After opening the file in the editor, search for the Game Translations for clients/games (client data ports) section.

Look for the following line:


 * 1) 192.168.1.10:6112  1.2.3.4:6118      192.168.1.0/24,10.0.0.0/8  ANY

Now you must uncomment the line by deleting the # and enter your LAN IP Address of Gaming Computer, Internet IP Address, and your LAN Subnet.

(Lets say your Internet IP is 74.22.125.199 and your LAN IP for the Gaming Computer is 192.168.1.2):

192.168.1.2:16112  74.22.125.199:16112      192.168.1.0/24  ANY

If you have more than one Gaming Computer on the LAN, you will need to create a new entry for each computer with a unique port.

Next, you must search for the Diablo II Character Server translation (d2cs) section.

Look for the following line:


 * 1) 192.168.1.10:6113  1.2.3.4:6113       192.168.1.0/24          ANY

Now you must uncomment the line by deleting the # and enter your LAN IP Address of PvPGN Server, Internet IP Address, and your LAN Subnet.

(Lets say your Internet IP is 74.22.125.199 and your LAN IP for PvPGN Server is 192.168.1.2):

192.168.1.2:6113  74.22.125.199:6113       192.168.1.0/24          ANY

Next, you must search for the Diablo II Game Server Translation (d2gs) section.

Look for the following line (optional):


 * 1) 192.168.1.100:4000 1.2.3.4:4000       NONE                    ANY

Now you must uncomment the line by deleting the # and enter your LAN IP Address of D2GS Server, Internet IP Address, and your LAN Subnet.

(Lets say your Internet IP is 74.22.125.199 and your LAN IP for D2GS Server is 192.168.1.3):

192.168.1.3:4000 74.22.125.199:4000       NONE                    ANY

Edit versioncheck.conf
Open the /etc/versioncheck.conf file in your preferred editor.

(I’ll use vi or vim, a text based editor):

[root@mybox]# cd /etc/ [root@mybox]# vi versioncheck.conf

After opening the file in the editor, search for the -=- Latest Versions -=- No Update Required -=- section.

Look for the following entries:

"A=3845581634 B=880823580 C=1363937103 4 A=A-S B=B-C C=C-A A=A-B" \ IX86ver1.mpq \ IX86 \ D2XP \ "Game.exe 03/09/10 04:10:51 61440" \ 0x0000000d \ 1.0.13.0 \  0x7686beca \ D2XP_113C
 * 1) Diablo II - LoD (Expansion) 1.13c
 * 1) Diablo II 1.13c

"A=3845581634 B=880823580 C=1363937103 4 A=A-S B=B-C C=C-A A=A-B" \ IX86ver1.mpq \ IX86 \ D2DV \ "Game.exe 03/09/10 04:11:00 57344" \ 0x0000000d \ 1.0.13.0 \  0xfc04b9f6 \ D2DV_113C

If those entries exist, then you have the current version checks for Diablo II. You can customize this to allow only certain version of Diablo II to connect to your server.

Do this by removing the version check entries for the version you don't want to connect to your server.

Download the latest versioncheck.conf if you don't have those entires.

http://cvs.berlios.de/cgi-bin/viewcvs.cgi/*checkout*/pvpgn/pvpgn/conf/versioncheck.conf

[root@mybox]# cd /etc/ [root@mybox]# wget http://cvs.berlios.de/cgi-bin/viewcvs.cgi/*checkout*/pvpgn/pvpgn/conf/versioncheck.conf

Edit autoupdate.conf (optional)
Open the /etc/autoupdate.conf file in your preferred editor.

(I’ll use vi or vim, a text based editor):

[root@mybox]# cd /etc/ [root@mybox]# vi autoupdate.conf

After opening the file in the editor, search for the Diablo II Expansion (LoD) section.

Look for the following entries:


 * 1) ===================== Diablo II Expansion (LoD) ===========================
 * 2) Note: the following assumes that you want to upgrade all Diablo II clients
 * 3) to version 1.12a.  If you are still running a 1.10 or 1.09d realm, you
 * 4) will need to modify these entries accordingly.
 * 1) IX86   D2XP    D2XP_107        D2XP_IX86_1xx_113C.mpq
 * 2) IX86   D2XP    D2XP_108        D2XP_IX86_1xx_113C.mpq
 * 3) IX86   D2XP    D2XP_109        D2XP_IX86_1xx_113C.mpq
 * 4) IX86   D2XP    D2XP_109B       D2XP_IX86_1xx_113C.mpq
 * 5) IX86   D2XP    D2XP_109C       D2XP_IX86_1xx_113C.mpq
 * 6) IX86   D2XP    D2XP_109D       D2XP_IX86_1xx_113C.mpq
 * 7) IX86   D2XP    D2XP_110        D2XP_IX86_1xx_113C.mpq
 * 8) IX86   D2XP    D2XP_111        D2XP_IX86_1xx_113C.mpq
 * 9) IX86   D2XP    D2XP_111B       D2XP_IX86_1xx_113C.mpq
 * 1) Incremental update from version 1.12a --> 1.13c
 * 2) IX86   D2XP    D2XP_112A       D2XP_IX86_112A_113C.mpq
 * 1) The next one is a Diablo II LoD wildcard entry.
 * 2) IX86   D2XP    D2XP_1xx        D2XP_IX86_1xx_113C.mpq

Now you must uncomment the line by deleting the # from every line:

IX86   D2XP    D2XP_107        D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_108        D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_109        D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_109B       D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_109C       D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_109D       D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_110        D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_111        D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_111B       D2XP_IX86_1xx_113C.mpq IX86   D2XP    D2XP_112A       D2XP_IX86_112A_113C.mpq IX86   D2XP    D2XP_1xx        D2XP_IX86_1xx_113C.mpq
 * 1) ===================== Diablo II Expansion (LoD) ===========================
 * 2) Note: the following assumes that you want to upgrade all Diablo II clients
 * 3) to version 1.12a.  If you are still running a 1.10 or 1.09d realm, you
 * 4) will need to modify these entries accordingly.
 * 1) Incremental update from version 1.12a --> 1.13c
 * 1) The next one is a Diablo II LoD wildcard entry.

Next do the same with the Diablo II (DV) section.

After the autoupdate.conf has been configured, you will need to download the update files.

The bnftp utility is what we'll use to download the update files:

[root@mybox]# cd /var/files/ [root@mybox]# bnftp --client=D2XP --arch=IX86 --file=D2XP_IX86_1xx_113C.mpq uswest.battle.net 6112 [root@mybox]# bnftp --client=D2XP --arch=IX86 --file=D2XP_IX86_112A_113C.mpq uswest.battle.net 6112 [root@mybox]# bnftp --client=D2DV --arch=IX86 --file=D2DV_IX86_1xx_113C.mpq uswest.battle.net 6112 [root@mybox]# bnftp --client=D2DV --arch=IX86 --file=D2DV_IX86_112A_113C.mpq uswest.battle.net 6112

Configure Router / Firewall
You will need to forward ports 6112-6114 and 4000 to your pvpgn server, and forward port 16112 to your Gaming Computer.

Also ensure these ports are allowed through any firewall(s) on the applicable computer(s).

Configure Router / Firewall
You will need to forward port 6112 to your pvpgn server, and forward port 16112 to your Gaming Computer.

Also ensure these ports are allowed through any firewall(s) on the applicable computer(s).

Configure Game Data Port (optional)
To play these games on the same LAN as the pvpgn server, you will need to change the port that these games use, since PvPGN is already the default port (6112). Change the Game Port to the unique port you specified in the address_translation.conf.


 * click Start --> Run --> regedit
 * Ok

After opening the Registry Editor, browse to HKEY_CURRENT_USER\Software\Battle.net.


 * click on Configuration
 * right-click on the right half of the window and create a new DWORD value
 * name the new DWORD value Game Data Port
 * right-click on Game Data Port value and select Modify
 * enter 16112 and select Decimal