Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2011, 11:13 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default 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.
Reply With Quote
  #2  
Old 02-28-2011, 11:36 PM
Fulcrum
Sarnak
 
Join Date: Sep 2010
Location: EC Tunnel
Posts: 81
Default

You must have caught yourself using an exploit and simply banned yourself.
Reply With Quote
  #3  
Old 02-28-2011, 11:45 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Quote:
Originally Posted by Fulcrum View Post
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.
Reply With Quote
  #4  
Old 03-01-2011, 01:17 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

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.
Reply With Quote
  #5  
Old 03-01-2011, 02:07 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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.
Reply With Quote
  #6  
Old 03-01-2011, 02:20 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

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);
Reply With Quote
  #7  
Old 03-02-2011, 10:00 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

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.
Reply With Quote
  #8  
Old 03-02-2011, 11:20 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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
Reply With Quote
  #9  
Old 03-03-2011, 03:19 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Quote:
Originally Posted by lerxst2112 View Post
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.
Reply With Quote
  #10  
Old 03-03-2011, 08:56 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Quote:
Originally Posted by lerxst2112 View Post
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
Reply With Quote
  #11  
Old 03-03-2011, 09:03 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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.
Reply With Quote
  #12  
Old 03-03-2011, 09:48 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Quote:
Originally Posted by lerxst2112 View Post
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)
Reply With Quote
  #13  
Old 03-03-2011, 10:45 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

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.
Reply With Quote
  #14  
Old 03-04-2011, 05:25 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

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)
Reply With Quote
  #15  
Old 07-08-2012, 12:54 AM
Hool
Fire Beetle
 
Join Date: May 2010
Location: Texas
Posts: 16
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:09 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3