Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] Diablo → D2GS Proxy - DieTesseract

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 35

1 (edited by GecKoTDF 12.08.2017 13:04)

Topic: D2GS Proxy - DieTesseract

Hi Guys,

After a few days of developent I finish the project D2GS Proxy, I call it DieTesseract - You Know... the long history we can't build the D2GS of Tesseract2048 and make it work.-

This guide will have two parts:

1 - Simple Guide = For people just want to make it work - Download the File, Start, Configure IP, and ready to go.-
2 - Full Guide = For people who want to build the D2GS proxy by his own, to adapt the specific enviroment.-

Of course the Full guide, talk about everything it's inside and how works... so, probably you want to understand how works de D2GS Proxy.

---

INTRODUCTION
===========

The D2GS have a problem with a Hex code, if you send it, you crash the process, and all the games shut down.-
Tesseract make modifications in theory to avoid this crash and create individual enviroment for every game (D2GS.exe process) - But nobody can make it work, so it's like nothing.-
The basic Idea was create a Proxy, to filter the packet and avoid hit the D2GS.exe process with that bad code.-

In this case I create a virtual machine, with a Linux SO, with a graphical enviroment, Wine installed, modify with a file build it by HarpyWar.-
This allow to use D2GS.exe without problem - This virtual Linux have a IPTable rule who DROP the packet if have that bad Hex Code.-

---

IMPORTANT PERFORMANCE NOTES
=======================

Take in mind a virtualization need aditional resources, for example you will need to have free 512 MB for RAM and this solution can't be put it inside a VPS (in theory).-
A VPS it's a virtual machine, have a virtual machine inside a virtual machine have a HUGE impact in performance it's almost imposible to do nothing.-
If you have a dedicated PC/Server (normal) with Windows (XP or more newer), you will not have any problem.-
The last solution it's always try, may be your VPS can handle or have special CPU instructions with good performance.-

CONFIGURATION SCENARIOS
===================

This is only for guide purposes.-

- PVPGN (Linux) + D2GS (Emulated Wine) = Normal Config - no NAT port required.-

- PVPGN (Windows) with Virtual Machine (NAT) inside = Normal Config - Just be sure the NAT ports are open in VM.-

- HOST >> Virtual Machine (Windows) ++ Virtual Machine (D2GS) in NAT = Normal Config - be sure in the PVPGN Windows machine you put the IP of the HOST because you are in NAT so you go "outside" using the HOST don't forget to Enable ports in VM.-
So when the packet travel searching port 4000 or 8888, the NAT rule say "You need to go to this virtual machine" and hit D2GS.-

- HOST >> Virtual Machine (Windows) ++ Virtual Machine (D2GS) with own IP = Normal Config - put the IP of the D2GS in the PVPGN, no NAT port required.-

---

1 - SIMPLE GUIDE
============

- You need to Download - VirtualBox for Windows: https://www.virtualbox.org/wiki/Downloads or you can use VMWare Player/Workstation (it's pay).-

- Download the Virtual Machine and extract:
   - VirtualBox: www.mediafire.com/file/2cs47k41r … _Proxy.rar (2.0 GB) / PASSWORD: GecKoTDF-PVPGN
   - VMWare: www.mediafire.com/file/abagwjo03 … VMWARE.rar (3.7 GB)/ PASSWORD: GecKoTDF-PVPGN

This guide it's for VirtualBox, in the case of VMWare it's almost the same, with a few interface differences.

- Install it, it's freeware no activation need - Open the software and press "Control + A" this will allow you to select the virtual machine to add.-

- Start the Virtual Machine, the NAT rules are add it by default.-

- Open the terminal icon "LXTerminal" and put "wine notepad" this will open a notepad like Windows, go to the "D2GS.reg" it's located in the main user folder "/home/pvpgn/d2gs" and edit, don't forget to save.-

- Open the terminal icon "LXTerminal" and put "wine regedit" this will open the Regedit like Windows, go and import the file "D2GS.reg" you modify before.-

- Open the terminal icon "LXTerminal" - And press "Up arrow key" a few times that will show the code "./Start_D2GS.sh" (without quotes) or just write in the terminal manually.-

- Press Enter, and see in the task manager Window the D2GS.exe process, if it running, you are ready to go - If not, check your D2GS.reg file have all OK.


NOTE: This will avoid the HACK and avoid to use the overhead chat using !text - This is to avoid use RedVex hacks, if any user use the overhead chat, the text don't appear and after a few seconds will be kicked.-

If you still want to use the overhead chat, just go to the tiny black icon, press secondary boton over "Start_D2GS.sh" and press over "LeafPad" and put a # in front of the "Chat Block" IPTable rule, this will disable this function, save it and finally start again in the terminal using "./Start_D2GS.sh"

ADDITIONAL INFORMATION
==================

Default User: pvpgn Password: iptablesgod
Root User: root Password: dietesseract

- Warden it's desactivated in the d2server.ini config.
- The D2GS it's 1.14b but you have the folder with the file to 1.13c just replace.-
- The D2GS folder have all the Diablo II expansion stock files, ready to use.-



2 - Full Guide
=========

Here I am going to explain how build your own D2GS proxy in GNU/Linux Debian based distributions like Ubuntu.

- First, create a virtual machine setup with any virtualization system you like, if you are going to use NAT don't forget to open the ports in the Virtual Machine, for example in VirtualBox this is the way:

Press over the Virtual Machine and press "Control + S" to open the configuration - Go to "LAN" press in "Advance" and open "Ports" and add like this the 4000 port, and the 8888 port (TELNET) if you change the 8888 port put, what you change there in the same way.-

The UDP ports are not strictly necessary but try in this way to discart problems, then if works, you can remove the UDP ports.-

- Then you need to download the sock.c modify and the source code of Wine:
Sock. c >> https://gist.github.com/HarpyWar/cd3676fa4916ea163c50
Wine Source code >> https://sourceforge.net/projects/wine/f … 0.1.tar.xz

- Extract the files and replace the sock.c in wine/server - Then you will need to install a few things before to compile:

sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install libx11-dev:i386
sudo apt-get install libfreetype6-dev:i386

- Go to the Wine folder and compile, one by one line:

./configure (Ignore compilations errors, it's normal in virtualizations)
make (This will take a lot of time)
make install (It's quick)

- Copy your D2GS files and all that stuff, for example in VirtualBox to create a shared folder you add in the program, and then in a terminal in root mode write:

mount -t vboxsf FolderNAME /home/USER/share

Where FolderNAME it's the name of the shared folder, and USER you put the name of the username you create in the virtual machine.-

- Now here it's the important part read well - In root mode you have this two lines, the first avoid the hack, this stop the FF01 String and DROP that packet, only search port 4000 - The second line it's to desactivate the Overhead chat, that will block any atemp to use for example !hello If that happend the packet will be rejected and the user kicked.-

#Block HACK
iptables -A INPUT -p tcp --dport 4000 -m string --hex-string '|FF01|' --algo bm -j DROP

#Block overhead chat
iptables -A INPUT -p tcp --dport 4000 -m string --hex-string '|1400|' --algo bm -j REJECT

You can change the "bm" algorithm for example, depend on you:

bm = Good Performance MAYBE escape some packet.
kmp = More CPU impact but perfect packet string search.

A few nice commands to take in mind, this will LIST all the IPTables rules you have
iptables -L

This will "Flush" remove all the IPTables rules you have
iptables -F

I recommend use this Guide if you never make a PVPGN Network.-
https://pvpgn.pro/d2gs_installation.html

In personal experience it's not necessary to touch the Address_Translation file, just only the w3route server ip translation in the case you want to enable Warcraft 3 and all that stuff.-
Then just follow the guide above - My scenario it's a Host with two virtual machines inside running in parallel, Windows PVPGN, and the DieTesseract using NAT.-

[video]

2

Re: D2GS Proxy - DieTesseract

https://forums.pvpgn.pro/uploads/images/2017/08/07/tumblr_inline_mksxioe58l1qz4rgp.gif

D2PK - Diablo II PvP Realm
Start a Duel

d2pk.info

3

Re: D2GS Proxy - DieTesseract

Finish guide!

4 (edited by jairfabricio 13.08.2017 05:10)

Re: D2GS Proxy - DieTesseract

Great work, you have a solution for bot players?

5

Re: D2GS Proxy - DieTesseract

I believe that not posible via Hex code - Its something related with the patch of the d2gs and scanning process.

6

Re: D2GS Proxy - DieTesseract

al tut work fine, but how to add files (1.13c) and other txt to debian folder.

7

Re: D2GS Proxy - DieTesseract

The 1.13c files are in the D2GS folder inside the home of the user, like I say in the post.-

And what .txt file are you talking about ?

8

Re: D2GS Proxy - DieTesseract

I have a modified d2gs.exe file
I need to import, it's version 1.13c

9

Re: D2GS Proxy - DieTesseract

You need to create a Shared Folder, like say in the post, and reeplace al the files you want in the D2GS folder:

- Copy your D2GS files and all that stuff, for example in VirtualBox to create a shared folder you add in the program, and then in a terminal in root mode write:

mount -t vboxsf FolderNAME /home/USER/share

Where FolderNAME it's the name of the shared folder, and USER you put the name of the username you create in the virtual machine.-

10

Re: D2GS Proxy - DieTesseract

I followed everything step by step
But I can not create games


https://forums.pvpgn.pro/uploads/images/2017/08/17/d2loader1.13c_2017-08-17_11-48-49.png

11

Re: D2GS Proxy - DieTesseract

You enter via Telnet and put maxgames 100 ? - Sometimes the regedit value of maxgames not apply

12

Re: D2GS Proxy - DieTesseract

If that doesn't work it looks like your D2GS isn't hooked up correctly to PvPGN.

Admin of Slash Diablo & Diablo2.org (coming soon).

Also check out Slash's Character Armory!

13

Re: D2GS Proxy - DieTesseract

This option increases the ping on the server

14

Re: D2GS Proxy - DieTesseract

Depends on escenario, if you are making a NAT its imposible to have more lag because its internal - Make a ping to the NAT IP will be <1ms
If you are using two publics ip's its OK because you are using internet.-
Another escenario but very imposible it's the virtual machine was extreme slow - But how much ping difference you have ?

15

Re: D2GS Proxy - DieTesseract

I have a virtual private serve rBasic:

Properties:
1 vCore
3,1 GHz
2 GB de RAM
25 GB

16

Re: D2GS Proxy - DieTesseract

You have the virtual machine inside that VPS ?

17

Re: D2GS Proxy - DieTesseract

GecKoTDF wrote:

You have the virtual machine inside that VPS ?

Yes, but work fine

18

Re: D2GS Proxy - DieTesseract

Can't be any reason to have more lag using a D2GS inside the virtual machine - To be sure, make a ping to the internal IP of the D2GS the "NAT" IP - But im very sure you are going to have <1 ms -
How much ms difference you have with normal D2GS and in a Virtual Machine ?

19

Re: D2GS Proxy - DieTesseract

Congratulations and thanks for the tutorial, I'm going to try it right now

I've heard that in tesseract d2gs it's possible to check the Patch_D2.mpq and don't let the user enter games with wrong patch, there's a way to do this ?

20

Re: D2GS Proxy - DieTesseract

b1n wrote:

Congratulations and thanks for the tutorial, I'm going to try it right now

I've heard that in tesseract d2gs it's possible to check the Patch_D2.mpq and don't let the user enter games with wrong patch, there's a way to do this ?

Thats not part of the versioncheck.conf ?

21

Re: D2GS Proxy - DieTesseract

GecKoTDF wrote:
b1n wrote:

Congratulations and thanks for the tutorial, I'm going to try it right now

I've heard that in tesseract d2gs it's possible to check the Patch_D2.mpq and don't let the user enter games with wrong patch, there's a way to do this ?

Thats not part of the versioncheck.conf ?

Pretty sure that versioncheck just checks the Game.exe file

22

Re: D2GS Proxy - DieTesseract

Oh thats true - Well this method will not work to check the patch version because this only check the hex code of packets

23

Re: D2GS Proxy - DieTesseract

I've successfully installed in two servers running Windows Server 2016 + Virtual Box with your Debian, very easy to setup. Soon I'll post some results about runing this

Got some problems in another machine, this one with Windows Server 2008, any idea what's the problem?

http://www.d2evo.com/imgs/mstsc_2017-10-01_02-01-01.png

http://www.d2evo.com/imgs/mstsc_2017-10-01_12-09-09.png

After this it freezes in a black screen.

24

Re: D2GS Proxy - DieTesseract

b1n wrote:

I've successfully installed in two servers running Windows Server 2016 + Virtual Box with your Debian, very easy to setup. Soon I'll post some results about runing this

Got some problems in another machine, this one with Windows Server 2008, any idea what's the problem?

http://www.d2evo.com/imgs/mstsc_2017-10-01_02-01-01.png

http://www.d2evo.com/imgs/mstsc_2017-10-01_12-09-09.png

After this it freezes in a black screen.

Looks like its searching a device, probably a floppy, or DVD unit, or something like that.-
Or its not mounting a disk - You must check probably its something related with that server.

25

Re: D2GS Proxy - DieTesseract

strangee.. with me it works!

D2PK - Diablo II PvP Realm
Start a Duel

d2pk.info

26

Re: D2GS Proxy - DieTesseract

Character disconnected after transferring gold, there's any log of the blocked and rejected connections?

[video]

27

Re: D2GS Proxy - DieTesseract

this proxy developed by GecKoTDF in Linux not as simple as it seems, each server has to adapt its filter rules, otherwise it can happen these problems, even more when you use modified patch. sad

Added: 06.10.2017 09:52

when I say modified patch.. I mean not only the MPQ files, but the DLLs that work with game.exe

D2PK - Diablo II PvP Realm
Start a Duel

d2pk.info

28

Re: D2GS Proxy - DieTesseract

Feofilaktt wrote:

this proxy developed by GecKoTDF in Linux not as simple as it seems, each server has to adapt its filter rules, otherwise it can happen these problems, even more when you use modified patch. sad

Added: 06.10.2017 09:52

when I say modified patch.. I mean not only the MPQ files, but the DLLs that work with game.exe

I've just modified the patch_d2.mpq and players use the d2gfx.dll that allows multiple screens, just that

There's a way to identify if the packets crashing my d2gs are attacks or patch problems?

Just the first ladder of my server has been without d2gs crashes, there's several months with d2gs crashes almost every day..
thanks

29

Re: D2GS Proxy - DieTesseract

b1n wrote:

I've just modified the patch_d2.mpq and players use the d2gfx.dll that allows multiple screens, just that

There's a way to identify if the packets crashing my d2gs are attacks or patch problems?

Just the first ladder of my server has been without d2gs crashes, there's several months with d2gs crashes almost every day..
thanks

I also do not know an exact way to identify problems in d2gs

my experiences, when it is attack, a log is almost always generated in D2GS-Hack.txt, but not always..

if it is a patch problem, you can use the "d2txtanalyser" tool to find any possible failures in your *.TXT files

As we commented in another post, most of the attacks come from Argentina sad

What's your experiences hosting a PVPGN?
https://forums.pvpgn.pro/viewtopic.php?id=1858

D2PK - Diablo II PvP Realm
Start a Duel

d2pk.info

30

Re: D2GS Proxy - DieTesseract

b1n, if you are capturing and saving all your packet sends, then it should be easy.

I'd use something like PeerBlock to train what connections you have coming through and also manually track your logs. When it does get attacked and crashed, it'll be easy to line up the timestamps, nuke the IP, boom.

Is there a particular reason you want the exact packets? If it is being attached, it should be easy to see.  PM if you need any further help.

Admin of Slash Diablo & Diablo2.org (coming soon).

Also check out Slash's Character Armory!

31 (edited by b1n 31.10.2017 03:38)

Re: D2GS Proxy - DieTesseract

Feofilaktt wrote:
b1n wrote:

I've just modified the patch_d2.mpq and players use the d2gfx.dll that allows multiple screens, just that

There's a way to identify if the packets crashing my d2gs are attacks or patch problems?

Just the first ladder of my server has been without d2gs crashes, there's several months with d2gs crashes almost every day..
thanks

I also do not know an exact way to identify problems in d2gs

my experiences, when it is attack, a log is almost always generated in D2GS-Hack.txt, but not always..

if it is a patch problem, you can use the "d2txtanalyser" tool to find any possible failures in your *.TXT files

As we commented in another post, most of the attacks come from Argentina sad

What's your experiences hosting a PVPGN?
https://forums.pvpgn.pro/viewtopic.php?id=1858

in the past people said that would be certainly patch problems.. but after all those conversations I'm seeing that it's not sure it is patch problems.. I through that if it was the patch it will crash always with the same action of anyone, but that doesn't happen in this way..

Meanski wrote:

b1n, if you are capturing and saving all your packet sends, then it should be easy.

I'd use something like PeerBlock to train what connections you have coming through and also manually track your logs. When it does get attacked and crashed, it'll be easy to line up the timestamps, nuke the IP, boom.

Is there a particular reason you want the exact packets? If it is being attached, it should be easy to see.  PM if you need any further help.

All i want is a stable server sad
The reason to know the packets it's to see if is there any patch problems or if its really attack problems, I don't have this answer yet

Yeah I'll pm you to know more about that, unfortunately I'm dummy at linux and advanced network settings, I'm just a civil engineer aficionado by this game haha

32

Re: D2GS Proxy - DieTesseract

b1n wrote:
Feofilaktt wrote:
b1n wrote:

I've just modified the patch_d2.mpq and players use the d2gfx.dll that allows multiple screens, just that

There's a way to identify if the packets crashing my d2gs are attacks or patch problems?

Just the first ladder of my server has been without d2gs crashes, there's several months with d2gs crashes almost every day..
thanks

I also do not know an exact way to identify problems in d2gs

my experiences, when it is attack, a log is almost always generated in D2GS-Hack.txt, but not always..

if it is a patch problem, you can use the "d2txtanalyser" tool to find any possible failures in your *.TXT files

As we commented in another post, most of the attacks come from Argentina sad

What's your experiences hosting a PVPGN?
https://forums.pvpgn.pro/viewtopic.php?id=1858

in the past people said that would be certainly patch problems.. but after all those conversations I'm seeing that it's not sure it is patch problems.. I through that if it was the patch it will crash always with the same action of anyone, but that doesn't happen in this way..

Meanski wrote:

b1n, if you are capturing and saving all your packet sends, then it should be easy.

I'd use something like PeerBlock to train what connections you have coming through and also manually track your logs. When it does get attacked and crashed, it'll be easy to line up the timestamps, nuke the IP, boom.

Is there a particular reason you want the exact packets? If it is being attached, it should be easy to see.  PM if you need any further help.

All i want is a stable server sad
The reason to know the packets it's to see if is there any patch problems or if its really attack problems, I don't have this answer yet

Yeah I'll pm you to know more about that, unfortunately I'm dummy at linux and advanced network settings, I'm just a civil engineer aficionado by this game haha

I have the same problem, but I made new iptables rules and all ok not more crash, but there another problem after 1 day or 2 maybe the D2GS.exe gets stuck. the exe still runs but gets stuck,here are the log d2gs_deactive: game server  (id: 3) deactived (0 left)

33

Re: D2GS Proxy - DieTesseract

@gonza_450

What rules you create?

34

Re: D2GS Proxy - DieTesseract

Other PvPGN members also have this problem. It takes me between 10-15 days to halt the D2GS process.

I improved the performance of my D2GS after reviewing the files in my Patch and re-emphasizing an auto-restart on D2GS every 3 days.

I have almost no problems with my D2GS.

D2PK - Diablo II PvP Realm
Start a Duel

d2pk.info

35

Re: D2GS Proxy - DieTesseract

Yes I restart the process 1 time per day the PVPGN and the D2GS and check if the PVPGN have players logged if they are dont reset until go to 0

Posts: 35

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 1 guest, 0 registered users

forums.pvpgn.pro → [EN] Diablo → D2GS Proxy - DieTesseract



Generated in 0.170 seconds (86% PHP - 14% DB) with 20 queries