EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=618)
-   -   NAT problem understood (https://www.eqemulator.org/forums/showthread.php?t=1031)

btuch 10-02-2002 02:26 PM

woot!

Adding in the code above allowed me to connect from outside and inside my firewall....

/cheer

-Brian

TheClaus 10-03-2002 02:35 AM

Okay now explain what you have in your loginserver.ini and what your zone ips are pointing too. I am curious and would like to try this out myself.

btuch 10-03-2002 02:51 AM

I am running Login/World/Zone all on the Linux box....

Where it says "my.domain.com" is where my domain name is, which is a public IP.

LoginServer.ini:
--snip--
[LoginServer]
loginserver=my.domain.com
loginserver2=my.domain.com
loginport=5999
loginport2=5999
locked=false
worldname=Testing
worldaddress=my.domain.com
account=
password=

[WorldServer]
Defaultstatus=Public
Unavailzone=

[LoginConfig]
ServerMode=Standalone
ServerPort=
UplinkAddress=
UplinkPort=
UplinkAccount=
UplinkPassword=
--snip--

And in the eqemud script from before, the function launching the zone servers looks like this:

--snip--
PUB_IP=my.domain.com

# syntax startzone zonename port
startzone() {
echo -n " Starting $1: "
#should this not specify the zone name anymore?
./Zone '.' $PUB_IP $2 $PUB_IP > $1.log 2> $1.errors &
echo_success
echo
}
--snip--

Forgot...my eqhosts.txt file points at "my.domain.com:5999" for both inside and outside the Linux box.

-Brian

Trumpcard 10-03-2002 03:15 AM

How are you running a loginserver on linux?

btuch 10-03-2002 03:20 AM

Ah,

I downloaded the old login source posted on www.eqemu.org.

It is the login source....just an old version.

The only problem I have with it is...sometimes it takes several tryes to get into the world server, because the world log says:

Bad/expired session key: ls#1

I am looking at the source to try to fix this.

It usually takes about 2-10 tries for the world server to get in. And to create an account I followed the instructions from the .txt file with the Login binary for windows. My Linux box is also running the MySQL server.

-Brian

Trumpcard 10-03-2002 07:15 AM

Maybe we can convince image and co. to merge this change into the baseline so we don't have to reapply it. Verify that it doesnt cause any problems on the windows version, and I think it's a good solution.

Image, any chance of this happening? Pulling in this change will make it more flexible, I would think this would keep the problem from occuring on the windows side as well. No more worries about where your putting your server, and where youre trying to log in from.

btuch 10-03-2002 07:17 AM

I shot an email off to image about it, hoping he would do the same you suggested ;)

-Brian

Trumpcard 10-03-2002 07:24 AM

I hated it never got rolled in when theCoder worked on it the first time, it was a problem that was driving me nuts, and I never could get the dns override technique to work right for me. Its a simple change, just didnt work. I had a weird shit development server at the time, so no telling.

I'll harass him about it on IRC when I get on tonight. You ought to jump on IRC and join up with the dev team Btuch, you've obviously got some code saavy! The more the merrier!

btuch 10-03-2002 07:43 AM

The only problem I've run into so far is I cannot "telnet my.domain.com 9000" from the machine now to get into the console for the world server. Dunno why. Gotta look at it some more. It takes the login/passwd but then says its wrong...

I'll try to pop in there tonight or Friday ;)

-Brian

penfold1972 10-03-2002 09:25 AM

Silly question, but is your login/password in the account table of MySQL? I seem to always forget to add it when I drop my database and rebuild. BTW, a decent GUI for mySQL and Gnome can be found at: http://www.gnome.org/softwaremap/projects/gmyclient

It's a far cry from character editing and other EQEMU functions available in the admin tool, but for some easy database tweaking (clearing tables, data edits, etc.) I've fallen in love with it.

btuch 10-03-2002 09:31 AM

ahhhhh!

Thanks, fergot to check there. Some how the password field for the accound got cleared.

Can now log into the world server console.

I have always been partial to http://www.phpmyadmin.net/ ;)

Thanks for the tip!

-Brian

penfold1972 10-03-2002 09:50 AM

Yeah, I have some projects to start playing with the phpmyadmin and phpmyedit stuff... just kinda buried in other little projects at the moment. I gave a halfhearted attempt to get it running a couple of weeks ago, but I ran into some glitches, so I went back to my MySQL projects. Who said Attention Deficet Disorder was a bad thing? :)

btuch 10-23-2002 07:52 AM

Image and the other Devs,

Can you please add this into the world code if possible so the world server only binds to one IP address?

In the file ~/world/console.cpp for the line:

address.sin_addr.s_addr = htonl(INADDR_ANY);

and put a // in front of it.

Then below that line paste the lines (without the --snip--):

--snip--
// bind only to the address specified as the world address
hostent* bindaddr = gethostbyname(net.GetWorldAddress());

if (bindaddr != NULL)
{
#ifdef WIN32
memcpy ((char FAR *)&(address.sin_addr), bindaddr->h_addr, bindaddr->h_length);
#else
memcpy ((char*)&(address.sin_addr), bindaddr->h_addr, bindaddr->h_length);
#endif
}
else
{
// could not resolve world address... bind to all interfaces then
cout << "Error: could not resolve world address " << net.GetWorldAddress() << endl;
cout << "Listening on INADDR_ANY" << endl;
address.sin_addr.s_addr = htonl(INADDR_ANY);
}
--snip--

Thanks!

Trumpcard 10-23-2002 09:29 AM

Good solution... If it doesnt find the world address, resort to any incoming..

Image, dont make me beg here.. lol.... I finally got my linux server rebuilt, I want to actually run a server again and be able to log onto it !

Trumpcard 11-04-2002 12:40 PM

Hmmm.. This code change doesnt work for me quite.. The world server reports it's listening on that right interface, but still doesnt get through..

There are at least 2 other places than specify INADDR_ANY,

TCPConnection.cpp and EQNetwork.cpp .

I think they need to be modified to bind properly as well.


All times are GMT -4. The time now is 06:50 PM.

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