PDA

View Full Version : Linux and multiple nics


tamarae
10-28-2002, 08:31 PM
I've done a lot of playing around with the emu in the past couple of days. I've installed it onto 2 different windows machines and 1 linux machine, all the way from having to install and config mysql. :) Anyway, I'm not completely stupid.. just feeling a bit dumbish right now. On to my issue and the plea for help:

I have read and tried the NAT Understood thread listed below.

I have EQEmu 0.3.11 running on my linux machine right now. (The Dominare Server) and my friends are able to connect and play without any problems.

I'm stuck with only 1 ip address and unable to connect from within the LAN, just like described in other threads.

I have edited my windows machine (192.168.1.2) host file to read: 192.168.1.1 dominare.homelinux.com, I can ping it from windows and it points to 192.168.1.1 which is the internal ip of my Linux box.

My LoginServer.ini reads dominare.homelinux.com as the worldaddress, and is using the eqemu login servers.

I can run eqw to connect to the login server. I see my server, I see a number of my friends playing on my server, and I get the boot trying to connect to my server to enter the game.

I started the server by running the eqemud startup script, and plugged dominare.homelinux.net in at the top for my public ip.

What else should I try? I'd greatly appreciate any info, even though its been asked and answered before... I'm just frustrated because this wont go. :( Thanks in advance for any info you can manage...

Trumpcard
10-28-2002, 10:38 PM
Compile the changes that btuch listed in the last time. This will tell eqemu to listen on the external interface. I didnt have any luck overloading my ip address either so the code fix was the only thing that would do it for me.

tamarae
10-29-2002, 02:43 AM
Added the said code, compiled it.

Now I'm getting in the world.log:

Error: could not resolve world address
Listening on INADDR_ANY

Now if I only knew why it cant. Any ideas? I'm itching to play again!

btuch
10-29-2002, 04:28 AM
Did you comment out the one line above the code insert? Here is the stuff from my prev post:

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--

also post your LoginServer.ini file.

tamarae
10-29-2002, 05:01 AM
I've now done everything I'm capable of thinking of... hehe

Yes, I did comment out the line in question, then added the rest of the snip minus -snip- underneath it. Compiled fine. Others can still log into my server from the outside world.

Using the eqemud file to start the server - I have tried using both of these lines for zone loading, and either way, the outside world is able to connect to my machine.

My linux machine is 192.168.1.1 and also carries the public IP addy resolved by the dyndns (which is indeed getting the correct ip address - tested by pinging)

PUB_IP=dominare.homelinux.com

./zone '.' $PUB_IP $2 $PUB_IP > $1.log 2> $1.errors &
-or-
./zone '.' $PUB_IP $2 127.0.0.1 > $1.log 2> $1.errors &

Here is my LoginServer.ini file:

[LoginServer]
loginserver=eqlogin1.eqemu.net
loginserver2=eqlogin2.eqemu.net
loginport=5999
loginport2=5999
worldname=The Dominare
locked=false
account=
password=
worldaddress=dominare.homelinux.com

[WorldServer]
Defaultstatus=
Unavailzone=

[LoginConfig]
ServerMode=Standalone
ServerPort=5999
UplinkAddress=
UplinkPort=
UplinkAccount=
UplinkPassword=
enablestats=

Also with this, I have tried both setting my windows HOSTS file to read: 192.168.1.1 dominare.homelinux.com, and tried it without.

world.log reads:
...
Error: could not resolve world address
Listening on INADDR_ANY
World server listening on: port 9000
Connected to LoginServer: eqlogin2.eqemu.net:5999
And sees the zoneservers boot themselves and connect.

When I go to log in, it spams the world.log file with:
80824 New client from ip: 192.168.1.2 port: 2029
Logged in: LS#7160: tamarae
Logged in: LS#7160: tamarae
Logged in: LS#7160: tamarae
(...ad nauseum) until it drops me and the client tells me I've lost connectivity.

What have I missed out in doing? Thanks for the help - I do appreciate it. You guys really seem to know what you're talking about after having read most of the forums last night. :)

btuch
10-29-2002, 05:07 AM
Do this...I had the same problem.....

In your LoginServer.ini file, move the line with worldaddress= above the account= line, so it looks like this.

[LoginServer]
loginserver=eqlogin1.eqemu.net
loginserver2=eqlogin2.eqemu.net
loginport=5999
loginport2=5999
worldname=The Dominare
locked=false
worldaddress=dominare.homelinux.com
account=
password=

I dunno why it fixes that problem, but it does ;)

tamarae
10-29-2002, 05:54 AM
Did as you said, making progress here. The error about not resolving is gone. Woohoo! :)

Everyone else can get it, but I'm still not able to.


Getting the same set of:
Logged in: LS#7160: tamarae

spammed over and over until it gives me the client 1017 error.

I have a feeling I've only missed an itty bitty something somewhere, and I'm determined to find it. Any other ideas?

btuch
10-29-2002, 05:57 AM
Now that you have added in the patch to force the world server to bind to your external IP, make sure you removed your entry from your windows host file. You want normal DNS resolving to go on now.

tamarae
10-29-2002, 06:06 AM
*nod* Made sure that was gone.

Have no firewall running on my windows pc, made sure that the dumb windows xp firewall was disabled, norton is disabled.

*cry* I see people on my server, I wanna play too! lol

windows ip: 192.168.1.2
netmasked properly
gateway: 192.168.1.1

dns servers listed...

is masq'd behind the linux machine.

Random info here, hoping you'll see something off kilter. :P

btuch
10-29-2002, 06:11 AM
I'm diggin here now.....

Are you using the line below in your script so the zone server runs on the same IP at the world server instead of 127.0.0.1?

./zone '.' $PUB_IP $2 $PUB_IP > $1.log 2> $1.errors &

tamarae
10-29-2002, 06:15 AM
Indeed, that's exactly what my line looks like.

I'm still seeing in the world.log that its seeing me logging in from 192.168.1.2. If the server is bound to the external IP, how is it seeing this?

btuch
10-29-2002, 06:31 AM
Because that is the IP your client is running on. The world server is binding to your external IP address and receiving a connection from your internal IP, which is fine.

IS there anything in your world.error log file? (if you have one).

tamarae
10-29-2002, 06:35 AM
Just one line:

Account Attempting to be created: meeko 0

Thinking that was someone who was logged into the server earlier, its been up and running a while now.

Nothing in any of the zone.errors files.

I know my client is patched up to the right stage, because I could connect just fine when I had it running on my windows machine, and when I had 2 public ip addresses. I however, cant do that any longer because my isp stole back my 2nd ip addy..lol.

tamarae
10-29-2002, 06:43 AM
To make sure its not my client or my stupid winbloz machine or anything, I am able to connect to image's server right now, as well as the others I tried on the eqemu server list.

So its my dumb network getting in the way, now to figure out where.

tamarae
10-29-2002, 06:51 AM
I've reread all of the posts that even have anything remotely to do with this topic, still not coming up with any reason why I should be having this problem.

I know the solution has to be close though.. lol.

btuch
10-29-2002, 08:18 AM
The only thing I can think of to try is to start from the beginning. Make a new DIR and copy the compiled files into it, along with other needed files. Start from scratch.

Also might wanna check with ps -ax to see if you possibly have multiple copies of the world server running.

tamarae
10-29-2002, 08:34 AM
I would be led to believe that it would interfere in anyone else's ability to connect and play.

Am installing to a new, clean dir as we speak and killing the current server... cross fingers.

tamarae
10-29-2002, 08:45 AM
Question:

You mentioned multiple world servers..

ps -ax shows me this:

./world
then the 5 zone servers
then 6 instances that deal with mysql
and then 5 more instances of
./world

If I kill the first world, it kills all the others though.
Is this how it should be?

Installed and started error free from a clean directory.

Still the same:

236125 New client from ip: 192.168.1.2 port 1123
Logged in: LS#7160 tamarae
Logged in: LS#7160 tamarae
Logged in: LS#7160 tamarae
(etc)
Removing client from ip:192.168.1.2 port:1128
Logged in: LS#7160 tamarae
Logged in: LS#7160 tamarae
Logged in: LS#7160 tamarae
Removing client from ip:192.168.1.2 port:1128

Ugh. At least everyone else can play
:confused:

tamarae
10-29-2002, 09:34 AM
I could soooo hug you, btuch.. Thanks for all of your input today, its been so very helpful (You too Trumpcard, last night!)

Here's what I changed, for the reference -

In my windoze tcp/ip settings, I changed the gateway to be the external IP rather than the internal of the linux box.

Added the line into the windows hosts file.

Voila... on top of a clean directory. I'm in!

Tell ya what.. I owe ya a drink.. or maybe two :D
Thanks again.

btuch
10-29-2002, 09:35 AM
The world server will spawn multiples of itself...thats ok. I meant kill all the world servers and zone server prior to starting a new one. I forgot to do that a few times.

Thats about all the help I can offer. If I think of something else I'll post it ;)

Trumpcard
10-29-2002, 10:42 AM
gateway set to external ip?

DOH!

btuch
10-29-2002, 10:56 AM
Glad ya got it working.... ;)

External IP? Hmmm thats wierd.

tamarae
10-29-2002, 11:13 AM
Whatever works, right? :)

I'll check later tonight, I dont remember which gateway option it was.. if it was the one on the initial tcp/ip properties box, (under ip and netmask) or if it was the one on one of the tabs.. I hate windows xp anyway...

It wont let me play with lan settings from the lab pc here in class.. lol

Thanks again guys, you're awesome! (btw, drinks on me!) :D