Georg Grabler (STiAT) - blog

Life is like an endlessly recursive fractal of perverse pain and suffering.

Category Archives: Games

Why CIP and Prolexic are incompetent.

Okay, to be fair, this is going to be a rant, but I’ve been annoyed by those two companies now for month, so have several players of the MMORPG “Tibia”.

The state is, that Tibia is facing heavy DDoS attacks, as they did in the past. They took the step to get a professional DDoS mitigation company to their side, to protect them – since they couldn’t handle the situation themselves, which I consider a good thing to do.

Well, now guess what? Now this “professional” anti DDoS provider can’t either. This has been an on-going problem for two month now.

So – do I have proof for the problem? Yes. And I can get you another mtr report every day if you want, I just have to wait until 18:00 CEST, and can reproduce the problem just fine until midnight – every day.

Note that I filtered my own network and my public IP below – necessary due to this being a public post.

[******@ggpc]$ mtr --report --no-dns --tcp --port 7171 193.200.156.112

Start: Mon Dec 22 21:53:25 2014
HOST: ggpc                        Loss%   Snt   Last   Avg  Best  Wrst StDev
1.|-- <localnet>                0.0%    10    0.8   1.1   0.5   1.7   0.0
2.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0
3.|-- <my-public-ip>               0.0%    10    9.8  12.8   9.1  24.5   4.5
4.|-- 84.116.228.149             0.0%    10   26.2  26.1  22.9  30.5   2.2
5.|-- 84.116.136.118             0.0%    10   22.5  23.7  22.5  25.3   0.7
6.|-- 84.116.132.186             0.0%    10   31.9  24.8  21.9  31.9   3.0
7.|-- 195.219.50.106             0.0%    10   50.0  37.4  33.9  50.0   4.7
8.|-- 195.219.50.110             0.0%    10   24.5  25.0  22.1  28.4   1.9
9.|-- 72.52.48.35                0.0%    10   22.6  24.2  21.6  26.7   1.4
10.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0
11.|-- 72.52.22.94                0.0%    10   40.3  42.1  39.0  44.7   1.8
12.|-- 193.200.156.112           20.0%    10   84.6 977.2  83.4 3096. 1351.2

So what is this? The Server 72.52.22.94 is “unknown.prolexic.com”, until that server there is no issue. The server “behind” the prolexic “entry gate” (which is just one of dozens around the world as it seems, depending on your provider and location you’ll hit this route) is having issues – a lot of issues considering a 20 % package loss and a average response time of 1351,2ms.

Yet, this “professional” provider, failed to do anything. I wonder what kind of company Prolexic is, since a DDoS protection provider they’re obviously not.

So what about CIPSoft? They say, despite of hundreds, maybe thousands of customers having problems, that there is no problem. Way to go! They just state that Prolexic has no problems – what is probably what Prolexic says, but still, they have a lot of traces of their customers and a lot of evidence that there in fact is an issue.

Denying won’t help, not Prolexic, and for sure not CIPSoft. It’s an unprofessional behavior, besides that CIPSoft fails to communicate to their customers – there is no official stance towards the problem.

Tibia in Linux, Hotkey, Razer Naga, Profiles

Okay, may some know, I’m not the gamer within, but there is a special game I like, Tibia. It’s a 2D MMORPG which features a native Linux client.

The only thing which is annoying is, that there is no proper configuration for the Razer Naga mouse I’m using to play the game. So I sat down, and did my own “configuration”, added profiles to TIbia for playing different characters, and did some re-binding of some keys. This here is intended to make it easier for newcomers wanting to play this in Linux to configure.

My Setup

So, how did I set up my system for this. As a side-note I’m currently using KUbuntu with binary NVidia drivers, since I get the best performance out of that.

I created a ~/Games/Tibia folder, where I unpacked the Tibia files. Later, I created another folder in the Tibia folder called “TibiaSettings” which include the profiles for my different characters, named Tibia_Arisyn, Tibia_Stiorra and so on, we’ll get to that later.

As a small piece, my folder structure. Note that I use the StarTibia.sh in the TibiaSettings folder, not the one shipped with TIbia:

schurl@ggpc:~$ find Games/Tibia/ |grep -v map
Games/Tibia/
Games/Tibia/StartTibia.sh
Games/Tibia/TibiaSettings
Games/Tibia/TibiaSettings/StartTibia.sh
Games/Tibia/TibiaSettings/Tibia_Arisyn
Games/Tibia/TibiaSettings/Tibia_Arisyn/Tibia.cfg
Games/Tibia/TibiaSettings/Tibia_Arisyn/Server Log.txt
Games/Tibia/TibiaSettings/Tibia_Arisyn/Tibia.cfg.bak
Games/Tibia/TibiaSettings/Tibia_Arisyn/English Chat.txt
Games/Tibia/TibiaSettings/Tibia_Arisyn/Phoric.txt
Games/Tibia/TibiaSettings/Tibia_Bazhuk
Games/Tibia/TibiaSettings/Tibia_Bazhuk/Tibia.cfg
Games/Tibia/TibiaSettings/Tibia_Bazhuk/Tibia.cfg.bak
Games/Tibia/TibiaSettings/Tibia_Bazhuk/English Chat.txt
Games/Tibia/TibiaSettings/Tibia_Bazhuk/Phoric.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra
Games/Tibia/TibiaSettings/Tibia_Stiorra/Zimmiee.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/Tibia.cfg
Games/Tibia/TibiaSettings/Tibia_Stiorra/Server Log.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/Tibia.cfg.bak
Games/Tibia/TibiaSettings/Tibia_Stiorra/Emily Sofie.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/English Chat.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/Kurotshuchi.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/Local Chat.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/Wanderers.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/Phoric.txt
Games/Tibia/TibiaSettings/Tibia_Stiorra/Tibia.exp
Games/Tibia/TibiaSettings/Tibia_Izolde
Games/Tibia/TibiaSettings/Tibia_Izolde/Tibia.cfg
Games/Tibia/TibiaSettings/Tibia_Izolde/Server Log.txt
Games/Tibia/TibiaSettings/Tibia_Izolde/Tibia.cfg.bak
Games/Tibia/TibiaSettings/Tibia_Izolde/English Chat.txt
Games/Tibia/TibiaSettings/Tibia_Izolde/Phoric.txt
Games/Tibia/TibiaSettings/Tibia_Ahazin
Games/Tibia/TibiaSettings/Tibia_Ahazin/Tibia.cfg
Games/Tibia/TibiaSettings/Tibia_Ahazin/Server Log.txt
Games/Tibia/TibiaSettings/Tibia_Ahazin/Tibia.cfg.bak
Games/Tibia/TibiaSettings/Tibia_Ahazin/Emily Sofie.txt
Games/Tibia/TibiaSettings/Tibia_Ahazin/English Chat.txt
Games/Tibia/TibiaSettings/Tibia_Ahazin/Wanderers.txt
Games/Tibia/TibiaSettings/Tibia_Ahazin/Phoric.txt
Games/Tibia/TibiaSettings/Tibia_Ahazin/Tibia.exp
Games/Tibia/TibiaSettings/Tibia_Ephiroth
Games/Tibia/TibiaSettings/Tibia_Ephiroth/Tibia.cfg
Games/Tibia/TibiaSettings/Tibia_Ephiroth/Tibia.cfg.bak
Games/Tibia/TibiaSettings/Tibia_Ephiroth/English Chat.txt
Games/Tibia/TibiaSettings/Tibia_Ephiroth/Phoric.txt
Games/Tibia/TibiaSettings/AutoHotkey.ahk
Games/Tibia/Patch
Games/Tibia/Tibia
Games/Tibia/libc6
Games/Tibia/libc6/libnss_files.so.2
Games/Tibia/libc6/libpcprofile.so
Games/Tibia/libc6/libresolv-2.7.so
Games/Tibia/libc6/ld-2.7.so
Games/Tibia/libc6/libdl-2.7.so
Games/Tibia/libc6/libpthread-2.7.so
Games/Tibia/libc6/libBrokenLocale-2.7.so
Games/Tibia/libc6/libnsl-2.7.so
Games/Tibia/libc6/libcrypt-2.7.so
Games/Tibia/libc6/libcidn.so.1
Games/Tibia/libc6/libutil.so.1
Games/Tibia/libc6/libnss_dns.so.2
Games/Tibia/libc6/libthread_db-1.0.so
Games/Tibia/libc6/libSegFault.so
Games/Tibia/libc6/libc.so.6
Games/Tibia/libc6/libnss_files-2.7.so
Games/Tibia/libc6/libnss_nisplus.so.2
Games/Tibia/libc6/libmemusage.so
Games/Tibia/libc6/libutil-2.7.so
Games/Tibia/libc6/libBrokenLocale.so.1
Games/Tibia/libc6/librt-2.7.so
Games/Tibia/libc6/libm.so.6
Games/Tibia/libc6/libnss_compat-2.7.so
Games/Tibia/libc6/libanl-2.7.so
Games/Tibia/libc6/libm-2.7.so
Games/Tibia/libc6/libthread_db.so.1
Games/Tibia/libc6/libnss_nis-2.7.so
Games/Tibia/libc6/libanl.so.1
Games/Tibia/libc6/README
Games/Tibia/libc6/libcrypt.so.1
Games/Tibia/libc6/libnss_hesiod.so.2
Games/Tibia/libc6/libpthread.so.0
Games/Tibia/libc6/libc-2.7.so
Games/Tibia/libc6/libdl.so.2
Games/Tibia/libc6/libresolv.so.2
Games/Tibia/libc6/libnss_dns-2.7.so
Games/Tibia/libc6/libnss_compat.so.2
Games/Tibia/libc6/librt.so.1
Games/Tibia/libc6/libnss_hesiod-2.7.so
Games/Tibia/libc6/libnss_nis.so.2
Games/Tibia/libc6/ld-linux.so.2
Games/Tibia/libc6/libnsl.so.1
Games/Tibia/libc6/libnss_nisplus-2.7.so
Games/Tibia/libc6/libcidn-2.7.so
Games/Tibia/Tibia.xpm
Games/Tibia/Tibia.dat
Games/Tibia/Showerror
Games/Tibia/Tibia.pic
Games/Tibia/Tibia.spr

Razer Naga

Oh ye, that is a tough one. By default, the keys for the Razer Naga in Linux are bout to 1-12, but we’ll need them boud to F1-F12. You can achieve that by a simple thing: A Startscript. So I created Script, which gets more and more things added over the course, first is the Razer Naga stuff.

I want to note here that the ground work for this was done by a user (Xaero252) on the Arch Linux forums. I just tweaked it a little, as you can see at my comment int he forum below.

#!/bin/bash

remote_id=$(

xinput list |
	sed -n 's/.*Naga.*id=\([0-9]*\).*keyboard.*/\1/p'
)

[ "$remote_id" ] || exit

mkdir -p /tmp/xkb/symbols
cat &gt;/tmp/xkb/symbols/custom &lt;&lt;\EOF

xkb_symbols "remote" {
	key { [F1, F1] };
	key { [F2, F2] };
	key { [F3, F3] };
	key { [F4, F4] };
	key { [F5, F5] };
	key { [F6, F6] };
	key { [F7, F7] };
	key { [F8, F8] };
	key { [F9, F9] };
	key { [F10, F10] };
	key { [F11, F11] };
	key { [F12, F12] };
};

EOF

This script will set the Razer Naga keys to F1-F12. I added this to the startscript of Tibia on the top.

Keyboard Settings

Well, Tibia is much more convenient playing using the keypad because you can move diagonal there. For that, I usually set the 5 key on the keypad to “down”, and the PAGE UP to SHIFT, and PAGE DOWN to CTRL to have it a little bit more convenient playing. To do this, we need to reassign the keys to new keycodes in X. This can be done by xmodmap.

xmodmap -e 'keycode 84=Down'
xmodmap -e 'keycode 117=Control_L'
xmodmap -e 'keycode 112=Shift_L'

To set the keys back to their original value, you can use the following code:

xmodmap -e 'keycode 84=Begin'

xmodmap -e ‘keycode 117=Next’
xmodmap -e ‘keycode 112=Prior’

Profiles
Yes, I use several different characters, and those who know TIbia know that different characters need different hotkeys. Since CIP did not implement hotkey profiles in the native clients (only in the Flash Client, which does not work very well for me in Linux), there is a workaround to do it.
Therefore, a folder for each character will be created, as described above. I’ll do that with the example of Stiorra and Arisyn, two of my characters.
First, the Script. To get a proper “setting” value to tibia, you need to add starting tibia.

cd ~/Games/Tibia

./Tibia path $1

Pretty easy, isn’t it? But it’s only half of the rent, since you need shortcuts. For that I created desktop shortcuts. Note that those are MY shortcuts with MY pathes:

Arisyn

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=/home/schurl/Games/Tibia/TibiaSettings/StartTibia.sh /home/schurl/Games/Tibia/TibiaSettings/Tibia_Arisyn/
GenericName[en_US]=Tibia Arisyn
GenericName=Tibia Arisyn
Icon=
MimeType=
Name[en_US]=Tibia Arisyn
Name=Tibia Arisyn
Path=/home/schurl/Games/Tibia
StartupNotify=true
Terminal=false
TerminalOptions=\s--noclose
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=none
X-KDE-SubstituteUID=false
X-KDE-Username=

Stiorra

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=/home/schurl/Games/Tibia/TibiaSettings/StartTibia.sh /home/schurl/Games/Tibia/TibiaSettings/Tibia_Stiorra/
GenericName[en_US]=Tibia Stiorra
GenericName=Tibia Stiorra
Icon=
MimeType=
Name[en_US]=Tibia Stiorra
Name=Tibia Stiorra
Path=/home/schurl/Games/Tibia
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

Note that I start Tibia using a shell script passing the path to the folder to be used as profile to Tibia as the first parameter. The script will be posted afterwards as complete script.

The complete Script

This should basically do what you need, put it in your TibiaSettings folder created, and it will. If you only need parts of what I do, you can remove the parts described above seperately, they don’t have any effect on each other.

#!/bin/bash

remote_id=$(
	xinput list |
		sed -n 's/.*Naga.*id=\([0-9]*\).*keyboard.*/\1/p'
)

[ "$remote_id" ] || exit

mkdir -p /tmp/xkb/symbols
cat &gt;/tmp/xkb/symbols/custom &lt;&lt;\EOF

xkb_symbols "remote" {
	key { [F1, F1] };
	key { [F2, F2] };
	key { [F3, F3] };
	key { [F4, F4] };
	key { [F5, F5] };
	key { [F6, F6] };
	key { [F7, F7] };
	key { [F8, F8] };
	key { [F9, F9] };
	key { [F10, F10] };
	key { [F11, F11] };
	key { [F12, F12] };
};

EOF

setxkbmap -device $remote_id -print | sed 's/\(xkb_symbols.*\)"/\1+custom(remote)"/' | xkbcomp -I/tmp/xkb -i $remote_id -synch - $DISPLAY 2&gt;/dev/null
xmodmap -e 'keycode 84=Down'
xmodmap -e 'keycode 117=Control_L'
xmodmap -e 'keycode 112=Shift_L'

cd ~/Games/Tibia
./Tibia path $1

xmodmap -e 'keycode 84=Begin'
xmodmap -e 'keycode 117=Next'
xmodmap -e 'keycode 112=Prior'