EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   CheckBannedIPs :Banned from my own server, hahaha (https://www.eqemulator.org/forums/showthread.php?t=33125)

Huppy 02-28-2011 11:13 PM

CheckBannedIPs :Banned from my own server, hahaha
 
This one makes me laugh, after sourcing in my backed up database, I was
trying out the compiled login server, and when I logged in to the server list
and tried to connect to the server, it kicked me off, saying I failed the
banned IPs check, LOL This is my own GM account I already had in the DB.
Can't find anything in the banned IP table, checked the toon status, still the
same in accounts, etc. So playing around right now trying to get it sorted.

Fulcrum 02-28-2011 11:36 PM

You must have caught yourself using an exploit and simply banned yourself. ;)

Huppy 02-28-2011 11:45 PM

Quote:

Originally Posted by Fulcrum (Post 197339)
You must have caught yourself using an exploit and simply banned yourself. ;)

It might of been the rude remarks I made to Ella Foodcrafter in Misty, lol

Not sure whats happening with it, I even set the rule value to false in checking for
banned IPs and its still giving me grief. It will let me log on if I disable that, but as
soon as I enable it again, it kicks me off. Maybe a corrupt bannedIP table or something.

Huppy 03-01-2011 01:17 AM

Well, tried simply deleting the account, and creating a brand new one.
Still got the same failed bannedIPcheck message. Its the same database I
have had for a long time, only difference, is it's on a remote host now.
I tried it patched in to the public login, and got the same thing. I hope I
get this prob fixed without having to trash my DB, too much work in to it, lol
Its not a problem if I disable the banned IP check, but I didn't want to leave
it like that.
This is the error I am getting :

Code:

12446 [02.28. - 23:03:23] [WORLD__CLIENT] Checking inbound connection 70.64.216.39 against BannedIPs table
12446 [02.28. - 23:03:23] [WORLD__CLIENT] Connection from 70.64.216.39 FAILED banned IPs check.  Closing connection.


lerxst2112 03-01-2011 02:07 AM

This is the query it uses:

if (RunQuery(query, MakeAnyLenString(&query, "SELECT ip_address FROM Banned_IPs WHERE ip_address='%s'", loginIP), errbuf, &result)) {

It will also fail if the query doesn't run correctly. You might try modifying the CheckBannedIPs function to log the progress to the log file instead of using cout and cerr so you can check if that's the case.

Huppy 03-01-2011 02:20 AM

Thanks lerxst, but I sourced this to create a new table and seems to work
fine now. I seen an error before that I couldn't find in the logs, it was saying
the table didn't exist, but it was there and empty, so a new one seemed to
fix the problem. I am not sure why it ended up that way, just from transferring
the DB to another host, but turned out all good.

Code:

DROP TABLE IF EXISTS `Banned_IPs`;
CREATE TABLE `Banned_IPs` (`ip_address` varchar(32) NOT NULL,`notes` varchar(32) default NULL);


Huppy 03-02-2011 10:00 PM

Just an update to this, after finding a another table screwed up,
(vwbotcharactermobs) which was causing a message when trying to create
a bot "That name is already in use .....", turns out (because of linux being
case sensitive), some of the code has to be altered a bit (in this case, bots.cpp),
before its compiled. (or re-compiled)

See here: http://www.eqemulator.org/forums/arc...p/t-30281.html

In the case of the banned_ips the fix above creates Banned_IPs

Now I am looking for something to fix the bot spells I added previous to my DB transfer,
(such as the cleric spells I have added lvl 71-85) they are no longer casting.

lerxst2112 03-02-2011 11:20 PM

You can probably fix this without altering code by changing the mysql setting lower_case_table_names. It defaults to 1 on Windows and 0 on Linux.

http://dev.mysql.com/doc/refman/5.0/...nsitivity.html

Huppy 03-03-2011 03:19 PM

Quote:

Originally Posted by lerxst2112 (Post 197371)
You can probably fix this without altering code by changing the mysql setting lower_case_table_names. It defaults to 1 on Windows and 0 on Linux.

http://dev.mysql.com/doc/refman/5.0/...nsitivity.html

Hey thanx lerxst, I'd rather have amore permanent fix, rather than having to
change the code, everytime that particular source file was updated through
svn.

Huppy 03-03-2011 08:56 PM

Quote:

Originally Posted by lerxst2112 (Post 197371)
You can probably fix this without altering code by changing the mysql setting lower_case_table_names. It defaults to 1 on Windows and 0 on Linux.

http://dev.mysql.com/doc/refman/5.0/...nsitivity.html

I did some testing on this and it appears taking that route you suggested
does not really present a solution for it.
After re-sourcing my database, (with all tables in lower case),

I did a mysqladmin variable check and it was set to 0 by default.
So I changed it to 1 using the /etc/mysql/my.cnf with the line:

lower_case_table_names=1 (and restarted mysqld)

This did change the variable to 1, but when I tried to log my toon in to
world, I got the same error, (failed banned ip check).

I got to thinking afterwards, (I am no expert here, so I am just asking),
If the code in the source is set to query a table with mixed/upper/lower case
letters, doesn't setting that mysql to 1, simply just force the use of lower
case table names and really doesn't do anything for the app that is querying
the database ? (the query is still looking for Banned_IPs, not banned_ips).
When I tried this using the EQEmuLoginServer, mysql couldn't find the logindb,
when I restarted itbecause the table names are in a mixture of upper/lower
case.
So you get the same result. whether the lower_case_table_names is set to
0 or 1

I'm guessing maybe there is something I am missing, since it's evident that
others are running linux servers, without these problems :)

lerxst2112 03-03-2011 09:03 PM

Setting it to 1 should make it work like Windows does, but I'm no expert.

This may be relevant:

Quote:

If you plan to set the lower_case_table_names system variable to 1 on Unix, you must first convert your old database and table names to lowercase before stopping mysqld and restarting it with the new variable setting.
Looking at the database on my Windows box all the tables are lowercase, and it does say that MySQL converts all table names to lowercase on storage and lookup in those docs.

Huppy 03-03-2011 09:48 PM

Quote:

Originally Posted by lerxst2112 (Post 197398)
Setting it to 1 should make it work like Windows does, but I'm no expert.

This may be relevant:



Looking at the database on my Windows box all the tables are lowercase, and it does say that MySQL converts all table names to lowercase on storage and lookup in those docs.

Your right lerxst, all of the tables in the database, by default from the current
download, (rev 1751) are all in lower case, which is confusing, since some of
the code, (like the query you posted from database.cpp), is set to look for a
table with mixed case. (Banned_IPs) (this is current source rev1873)

Huppy 03-03-2011 10:45 PM

Doing the little DB fixes is not a problem for this stuff, I don't mind that, but
the one problem I am having is my main priority right now. First of all, on my
home windows server, which is using the exact same database, I have a bit
of work put in to the bot spells, so if I log in with a level 82-85 toon and
create a cleric bot, after grouping, it will automatically cast Gallantry on my
toon. Also, if I type #bot delete, that functions as it should.
Since I transfered this same DB over to my linux server, the cleric bot no
longer recognizes any of the spell entries past lvl 70, so it will only buff my
lvl 85 toon with symbol of elushar, instead of gallantry. I checked the entries
that I had in there, and they still exist, so not sure why this is happening.

Huppy 03-04-2011 05:25 AM

UPDATE: Well, after deleting all the records of the bot spell entries I had put
in to the npc_spell_entries, then re-doing them all, the bots are now casting
the added spells. I also found some info on the #bot delete not working and
its just a matter of clicking off the bot buffs, then it will let you delete the
bot. (another linux thing I guess, lol)

Hool 07-08-2012 12:54 AM

I know this is old, but wanted to make a contribution.

When migrating from windows to linux, i had a case issue with the Banned_IPs table getting converted to lower case.

here is the fix...

Code:

DROP TABLE IF EXISTS `banned_ips`;
CREATE TABLE `Banned_IPs` (`ip_address` varchar(32) NOT NULL,`notes` varchar(32) default NULL);


note the case.


All times are GMT -4. The time now is 01:58 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.