PDA

View Full Version : How to make proper startup files for Mini-Login use


Angelox
08-07-2008, 07:45 PM
I keep seeing the same 'ol mistakes, for some reason, really a lot lately.
First, let me explain about your LAN and your IP address;
127.0.0.1 means 'localhost' which in turn means the computer you are at, and no others. Any any incoming requests, that you point to 'localhost' will result in the originating request seeing his/her own PC and not yours. Sooo, you need to not use 127.0.0.1 or 'localhost' in your ini files, regardless of what you see posted elsewhere.
I've always had LANs since the DOS days, my first LAN was a 'Novel Lite" floppy-run LAN. I hope I have learned something about it all by now.
I always keep static IPs on which ever PCs I might use for work I'm doing. I keep an index card with the names and ips assigned to each machine, so they will always be the same, even on a full, OS re-install. currently, my LAN has 4 static ips, and 2 dynamic.
Your server should be static and also your client. You don't need to do this, but life will be nicer if you don't have to worry about your LAN IP changing when you least expect it.
Keep in mind, you're working from with in your LAN, so you should be looking at all LAN related IPs (192.168.*.*) if with whatever method you use you come up with an ip that doesn't start with '192.168.', then you got the wrong IP. If you plan on inviting players from outside your LAN (the Internet), that can be done also - I'll show you how later. First, get your LAN play running.
How to make your XP machine static; go to network places > network connections > select 'properties' > and 'interenet protocol TCP/IP' 'properties' will reveal it all.
Lets say you set your 'server' machine to 192.168.2.105, here are the way your two config files should look,
eqemu_config.xml;
<?xml version="1.0">
<server>
<world>
<shortname>classic</shortname>
<longname>Angelox Classic 2008</longname>
<!-- Only specify these two if you really think you need to. -->
<address>192.168.2.105</address>
<localaddress>192.168.2.105</localaddress>

<!-- Loginserver information. -->
<loginserver>
<host>192.168.2.105</host>
<port>5999</port>
<account></account>
<password></password>
</loginserver>
<unlocked></unlocked>
<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>kiw9083wdfgesiwud</key>
<!-- Enable and set the port for the HTTP service. -->
<http port="9080" enabled="true" mimefile="mime.types" />
</world>

<!-- Database configuration, replaces db.ini. -->
<database>
<host>localhost</host>
<port>3306</port>
<username>eq</username>
<password>databasepassword</password>
<db>ax_classic</db>
</database>
</server>

and the loginserver.ini;
# READ README.TXT

[LoginServer]
loginserver=192.168.2.105
#loginserver2=
loginport=5999
#loginport2=
#worldname=
#worldaddress=
#locked=false
#account=
#password=

[WorldServer]
Defaultstatus=
Unavailzone=

[ChatChannelServer]
worldshortname=
chataddress=
chatport=

[LoginConfig]
ServerMode=MiniLogin
ServerPort=5999

Since 'ServerMode=MiniLogin' you have to make the change in your MySql Database table 'variables' under 'LoginType' to 'MiniLogin' 'too.
All eqhost.txt files incuding if you have a client on the server should read like this;
[LoginServer]
Host=192.168.2.105:5999

This is exactly what I have, I have tested on my windows and Linux servers, they work fine.

Firewalls: if you are behind a router, you don't really need it, you can disable it. Routers have 'hardware' firewall, which is better, unless of course you have someone in the family that likes to download anything, browses like a crazy person, and takes anything anyone gives them (because its free). Then you have to 'not share' any drives to that PC in the LAN, they can get a virus (probably will), and spread via shared drives you might have. Also, you could password -protect your drives from others in the LAN. But outside your LAN, your router will take care of you.

That's it for now, if a Mod or Admin will please sticky this thread, I'll continue build on it, and explain other stuff such as internet play into the LAN.

Angelox
08-08-2008, 08:43 AM
Most all of us have dynamic ips (IP address that changes everytime the modem resets). So, in order for players to be able to find you, you'll need to set up a dynamic IP. I use http://www.dynip.com/, Eventually, you have to pay them, but there are free services such as http://www.dyndns.com/. In my case, my dns is blackwater.dynip.com, so I'll use myself as an example.
Here's my eqemu_config.xml (192.168.2.105 and blackwater.dynip.com are pointed/belong to the same machine, 192.168.2.105 is LAN ip and blackwater.dynip.com Internet ip);
<?xml version="1.0">
<server>
<world>
<shortname>classic</shortname>
<longname>Angelox Classic 2008</longname>
<!-- Only specify these two if you really think you need to. -->
<address>blackwater.dynip.com</address>
<localaddress>192.168.2.105</localaddress>

<!-- Loginserver information. -->
<loginserver>
<host>192.168.2.105</host>
<port>5999</port>
<account></account>
<password></password>
</loginserver>
<unlocked></unlocked>
<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>ko898odhus77iwud</key>
<!-- Enable and set the port for the HTTP service. -->
<http port="9080" enabled="true" mimefile="mime.types" />
</world>

<!-- Database configuration, replaces db.ini. -->
<database>
<host>localhost</host>
<port>3306</port>
<username>eq</username>
<password>lansing222</password>
<db>ax_classic</db>
</database>
</server>
And my LoginServer.ini;
[LoginServer]
loginserver=blackwater.dynip.com
#loginserver2=
loginport=5999
#loginport2=
#worldname=
#worldaddress=
#locked=false
#account=
#password=

[WorldServer]
Defaultstatus=
Unavailzone=

[ChatChannelServer]
worldshortname=
chataddress=
chatport=

[LoginConfig]
ServerMode=MiniLogin
ServerPort=5999

The clients from the Internet eqhost.txt file should look like this;
[LoginServer]
Host=blackwater.dynip.com:5999

The clients from within the LAN, might need to have different eqhost.txt files;
[LoginServer]
Host=192.168.2.105:5999

or you can make a HOST file on your client with this entry;
192.168.2.105 blackwater.dynip.com
then you can use;
[LoginServer]
Host=blackwater.dynip.com:5999

The idea is to let the server know you are coming from within the LAN, and not use your Internet ip. This way you can play from as many clients in the LAN as you wish, and still get players from outside the LAN (Internet).

Ports on your router that need to be opened;
3306/udp, 5999/udp, 9000/udp, 7000-7010/udp, 5999/tcp, 3306/tcp, 7000-7010/tcp
ports 7000-7010 are variable, pending on how many dynamic and static zones you start up. If you use 5 dynamic zones and 5 static, then 7000-7010, is ok, if you start more, then increase the amount accordingly.

Demdadar
08-19-2008, 10:28 AM
Hello again Angelox.


I have modified almost everything that you said. The only thing I can't seem to change is the MYSQL Minilogin setting, basically because I sourced the database via commands at ms-dos, and I simply don't know how to modify a variable from ms-dos... Also I have tried using a front-end like SQLyog but for some reason it gives me "Error 1405" denied access, so I was forced to do it via ms-dos.

However I tried it (modified everything correctly but the mysql) and the server detected the client and it's IP. But, it stays "Connecting to the login server" for about half a minute, and then I guess the connection goes timeout and it disconnects me (Removes my client). But at least it recognizes me.

Well, the point now I think it's, how to modify the minilog setting variable at the mysql via ms-dos?

Thank you once again...

Andrew80k
08-19-2008, 11:49 AM
update variables set value='MiniLogin' where varname='LoginType';

Demdadar
08-19-2008, 03:18 PM
Thank you Andrew80k..

Sadly I have encountered a new problem. I no longer can access to mysql via ms-dos, getting the error I got before (access denied, 1045).

However, now I can get there via SQLyog. But, under the table "Variables" all I can see is 2 folders... One for "Columns" and another one for "Indexes".

When I view the data at variables, I can't see the "LoginType" no where. All I do see is:

MOTD
disablecommandline
PersistentZoneState
decaytime 1 54
decaytime 55 100
Max_AAXP
ZSPassword
loglevel
MerchantsKeepItems
GuildWars
leavecorpses
holdzones
ailevel

And that's all. I tried applying the code you gave me but nothing happened after all.

Is my database too old, maybe? Btw, I can't understand how now happens the inversa that happened before (Now I can login via SQLyog and not in ms-dos, when before it was the contrary) Too strange if you ask me :/

Any ideas...? Or should I just start over/change database?

Thank you very much, don't know what would I do without your help...

Angelox
08-19-2008, 04:02 PM
This should work;
INSERT INTO variables VALUES ("LoginType","Minilogin","Set this to Minilogin to login using a minilogin server :)","10/26/2006 2:36:01 PM");

But I don't understand why you don't have that already what version and typ database are you using?

Demdadar
08-19-2008, 04:26 PM
It didn't worked :/ When I start minilogin I get "Server mode: Standalone" even after all the changes. I'm quite sure the problem is the old database. I wanted to try running a EQemu 4.4...

For now i'll try using a newer one in this PC and see if i've got the same problems.

Andrew80k
08-19-2008, 04:56 PM
It didn't worked :/ When I start minilogin I get "Server mode: Standalone" even after all the changes. I'm quite sure the problem is the old database. I wanted to try running a EQemu 4.4...

For now i'll try using a newer one in this PC and see if i've got the same problems.

Yup, you're database is older than what we are currently at with the code, but there are some folks out there running some old versions of the emu. They might be able to help you. I myself don't know much about the older versions though so can't help with it. If you want to start with the newer stuff, grab the latest peq installer and that should get you going pretty quick.

GeorgeS
09-03-2008, 12:02 AM
Stickified - good info here - even learned something from this!

GeorgeS

Congdar
09-03-2008, 09:04 PM
Tip: When you download the MiniLogin6.2.zip file(is there a newer one?), it comes with an opcodes.conf file. Don't use it. It doesn't have all the opcodes. Use the opcodes.conf file that comes with the latest build.
You only need the MiniLogin.exe and the LoginServer.ini files.

Angelox
09-10-2008, 08:22 AM
This package (http://forums.nahunta.org/viewtopic.php?f=14&t=119&start=0)contains Leslamarch's launcher, and Aerewen's PHP IPFixer (instructions are in the PHP script).
Once set up, you won't need to be setting account IPs in the database for yourself or anyone else, and, if you have at least a 'shallow' understanding of PHP ( I do!), you can alter it all and make it look real nice.

ChaosSlayer
09-25-2008, 12:57 PM
you may want to include a LINK to wher actualy download the Mini Login software - I just tried finding it starting of main page and it took me like 20 min :cool:

http://sourceforge.net/project/showfiles.php?group_id=88515

wicapirate
10-19-2008, 10:47 AM
Angelox
Will that zip allow me to run EQ on a LAN with no internet access?

Angelox
10-19-2008, 11:01 AM
Angelox
Will that zip allow me to run EQ on a LAN with no internet access?

I don't know which zip you're talking about, but Minilogin is for LAN or the client can be with the same machine as the server , so you don't need internet or even a LAN.
What I have posted at my site are packages I thought would make it all easier for you (granted you follow the instructions).

cubber
02-04-2009, 01:42 PM
Thank you for this, I have had minilogin running under linux in the past but this made it much simpler to get away from the Public loginserver hell. I never new there was a web tool published to create your own gimp public server with minilogin. It is perfect for my setup after some modifications.

One thing you may want to note in the guide is that it is necessary to forward "UDP" port 5999 to your server on your firewall in order to allow public access to the minilogin server.

Second I see that accounts and passwords are limited to "9" characters on the web tool. This is not practical since some of my old users had account names greater than 9 characters with passwords greater than 9 characters. Granted when you switch from public to this type of login all of thier passwords are set to "blank" as far as minilogin is concerned they still have the same usernames. So you will need to go in and add passwords for thier accounts in your db in order for them to log in. In order to change the 9 character limit edit these lines in the index.php file:

<td width="326" align="left" valign="top"><input name="username" type="text" class="formelements" id="username" size="40" maxlength="9" />

to

<td width="326" align="left" valign="top"><input name="username" type="text" class="formelements" id="username" size="40" maxlength="25" />

to increase the username to 25 characters

and

<td align="left" valign="top"><input name="password" type="password" class="formelements" id="password" size="40" maxlength="9" />

to

<td align="left" valign="top"><input name="password" type="password" class="formelements" id="password" size="40" maxlength="25" />

to increase the password size to 25

cubber
02-05-2009, 09:53 AM
Ports on your router that need to be opened;
3306/udp, 5999/udp, 9000/udp, 7000-7010/udp, 3306/tcp, 5999/tcp, 7000-7010/tcp
ports 7000-7010 are variable, pending on how many dynamic and static zones you start up. If you use 5 dynamic zones and 5 static, then 7000-7010, is ok, if you start more, then increase the amount accordingly.

I appologize, I did not see this part of the guide. You already did mention the port. But one thing to note is that you do not need to open any TCP ports. It is all UDP.

These are the ports I use on my firewall, and all works fine. I used to forward both tcp and udp ports until FNW told me on IRC a while back that it was a big misconception and that EQEMU only uses UDP.


UDP Uplink ANY : 7779 => 192.168.42.4 : 7779 EQEMU Mail

UDP Uplink ANY : 7778 => 192.168.42.4 : 7778 EQEMU Chat

UDP Uplink ANY : 5999 => 192.168.42.4 : 5999 EQ Minilogin

UDP Uplink ANY : 9000 => 192.168.42.4 : 9000 EQEMU

UDP Uplink ANY :
7000 - 7010 => 192.168.42.4 : 7000 - 7010 EQEMU


BTW: what is 3306 for? I never use that port.

Andrew80k
02-05-2009, 02:02 PM
The mysql database is on port 3306.

cubber
02-05-2009, 02:16 PM
You don't need to forward that only the server uses that port. Unless your mysql server and eqemu server are located in two physically separate locations with 2 different internet connections. Or if you had a web server located somewhere on the internet and had it querying your mysql database to show information. In either case it would just have to be forwarded on the network with the MYSQL server.

But for a regular EQEMU server with the MYSQL DB server istalled on the localhost or even a separate server on the same LAN you do not need to forward the MYSQL port.

Angelox
02-05-2009, 03:14 PM
I do a lot of EqEmu work that's spread out over four machines in my network - My server is Linux, and only used for the EqEMu server and some other assorted email and whatever servers.
I compile and try to pre-test everything in windows and Linux, so the database is shared through out the LAN and even to a few friends over the net.
Since many people were having so much trouble getting MiniLogin up and running. I posted a detailed explanation and example of what I know is working, because it's what I have working at my LAN - since I like to test everything I do before I preach it to some one else, I posted what I have running and am sure works.

Andrew80k
02-05-2009, 03:40 PM
You don't need to forward that only the server uses that port. Unless your mysql server and eqemu server are located in two physically separate locations with 2 different internet connections. Or if you had a web server located somewhere on the internet and had it querying your mysql database to show information. In either case it would just have to be forwarded on the network with the MYSQL server.

But for a regular EQEMU server with the MYSQL DB server istalled on the localhost or even a separate server on the same LAN you do not need to forward the MYSQL port.
yes, I know. But you asked what the port was... I don't see any need for you to open it up unless you have a specific need to like Angelox does.

Angelox
02-05-2009, 08:18 PM
The port is open, but admin would still have to set up your IP/host with MySql, even if you knew username/password you're not admitted. And only allow user admin privs on the server machine.

cubber
02-05-2009, 10:22 PM
unless you did one of these then they could access it from any ip address:

GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;


But yes you are both correct, my point was that it is not needed for a regular home brew server, only for special cases like Angelox's. So basically if you are not sure that you need it then you probably don't. As for the other ports try turning off all of the tcp ports and just leave the udps I bet you will have no issues. Just a more secure firewall. You may need to leave tcp on port 9000 if you use the telnet feature, I usually only use this through vpn if I need to though, since telnet by default is unsecure.

Angelox
02-06-2009, 09:31 AM
unless you did one of these then they could access it from any ip address:

GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;


But yes you are both correct, my point was that it is not needed for a regular home brew server, only for special cases like Angelox's. So basically if you are not sure that you need it then you probably don't. As for the other ports try turning off all of the tcp ports and just leave the udps I bet you will have no issues. Just a more secure firewall. You may need to leave tcp on port 9000 if you use the telnet feature, I usually only use this through vpn if I need to though, since telnet by default is unsecure.

That would defeat what I was pointing out; the port is secure as long as it points to the mysql database and user privs only accessible by the root/server. "GRANT ALL PRIVILEGES" is not always a good idea, and will make the database insecure.

cubber
02-06-2009, 09:59 AM
Yup, that is what I was saying. Some people blindly follow guides for mysql or anything for that matter, and I have seen that line in quite a few of them. So if you are trying something but do not quite know what you are doing you may end up throwing that line in your mysql and accidentally open it up to the world without knowing about it.

I think you have a great guide here, I was just trying to help elaborate a bit so someone does not follow this guide blindy and introduce possible security holes if they don't know exactly what they are doing.