Jump to content

how to configure wan connoctions to mangos three ?


Nagilum

Recommended Posts

Posted

Hi there,

i have installed mangos three server Cataclysm, using the installation guid works like a charm for local host.

Now i am trying to connect from the outside, meaning wan connection. i've changed realm from 127.0.0.1 to mydomain.com, changed hostfile but i can't connect not local and not remote .

Running on win 2k8 server, my sql 64, and wow client version 4.3.4 (15595). i can login, see realm but after clicking okay nothing happens.

When running mangos two (wotlk) all works fine, lan and wan.

What do i miss here?

Help Someone plzzz

Posted

Thanks Antz that problem is solved, but now when using my wan ip adress i can't connect from server of lan. any idea's?

Checked out the trinity way, they use a second column in the realm config "localip" but i don't know if that's a solution.

Posted
Thanks Antz that problem is solved, but now when using my wan ip adress i can't connect from server of lan. any idea's?

Checked out the trinity way, they use a second column in the realm config "localip" but i don't know if that's a solution.

Use LAN IP and forward to the lan IP from the WAN router. This way everyone should connect fine.

Posted

Thanks Madmax, but this doesn't work for me,

Lan ip works fine for lan and local but then my wan connection can't connect.

With server two and domain name it was easy, just add your domain name to oyur host file and it works fine.

But maybe i'm doing something wrong:

Server running on :192.168.1.1

lan 192.168.1.X/24

Wan 210.123.12.34/24

How can i change the wan ip number to my lan ip number?

i have tried full access, all ports are correct but wan client wil not go further then logon and cannot connect to world datbase server.

Found a workaround for now but there has to be a better way i guess.

Anyway thanks for the input,

Nagilum

Posted
Thanks Madmax, but this doesn't work for me,

Lan ip works fine for lan and local but then my wan connection can't connect.

With server two and domain name it was easy, just add your domain name to oyur host file and it works fine.

But maybe i'm doing something wrong:

Server running on :192.168.1.1

lan 192.168.1.X/24

Wan 210.123.12.34/24

How can i change the wan ip number to my lan ip number?

i have tried full access, all ports are correct but wan client wil not go further then logon and cannot connect to world datbase server.

Found a workaround for now but there has to be a better way i guess.

Anyway thanks for the input,

Nagilum

Hey,

Have you tried the lan IP in the mangosd.conf and the wan IP as the realm IP in the realmlist table in the database?

Maybe [MENTION=2]antz[/MENTION] can help with this. How i just said above is how I personally run it on my home network so it does work.

Posted

Hey Madmax,

just for me to understand, i have to change:

mangosd conf

LoginDatabaseInfo = "127.0.0.1;3306 to 192.168.1.1

WorldDatabaseInfo = "127.0.0.1;3306 to 192.168.1.1

CharacterDatabaseInfo = "127.0.0.1;3306 to 192.168.1.1

and the

Realm conf

LoginDatabaseInfo = "127.0.0.1;3306 to 210.123.12.34

I will try thanks again,

Nagilum

Posted
Hey Madmax,

just for me to understand, i have to change:

mangosd conf

LoginDatabaseInfo = "127.0.0.1;3306 to 192.168.1.1

WorldDatabaseInfo = "127.0.0.1;3306 to 192.168.1.1

CharacterDatabaseInfo = "127.0.0.1;3306 to 192.168.1.1

and the

Realm conf

LoginDatabaseInfo = "127.0.0.1;3306 to 210.123.12.34

I will try thanks again,

Nagilum

No keep all the .conf files on the lan ip.

Go into the database with a program like sqlyog or what you use and go to the realmlist table and set the realm server IP to your wan one. I've not done this in awhile so could be wrong.

Posted

If you don't want to fiddle around with IP configurations and are not afraid of getting your hands dirty by messing around in the code, then shlainn's workaround might be another option for you.

What it does basically, is a DNS lookup of the domain name and returns the IP-Address to the client, instead of the domain name.

  • 2 months later...
Posted
Thanks Antz that problem is solved, but now when using my wan ip adress i can't connect from server of lan. any idea's?

Checked out the trinity way, they use a second column in the realm config "localip" but i don't know if that's a solution.

another solution utilized by myself and a few friends is to set up 2 entries in the realm list one with the WAN IP and the second with the LAN IP if you would like to hide the LAN realm from anyone else you may set the allowedSecurityLevel field or even setting the realm in a different timezone would do the trick

  • 1 month later...
Posted

Now i just ran into a problem of getting a new IP from my ISP and i wrote a little script that im using on a Cronjob (written in perl) to grab the External IP address and updating the information in the realmlist table to help in keeping a steady connection

this is the ipupdate.pl (i keep mine in the bin directory of mangos)

#!/usr/bin/perl -w

# DBI is the standard database interface for Perl
# DBD is the Perl module that we use to connect to the Mysql database
# LWP will be used for using web addresses
use LWP::Simple;
use DBI;
use DBD::mysql;

use warnings;

#----------------------------------------------------------------------
# grab the external ip of our server for updating
chomp(my $eip = get('http://ifconfig.me/ip'));
print "External IP: ",$eip,"\n";

# open the accessDB file to retrieve the database name, host name, user name and password
open(ACCESS_INFO, "<..\/etc\/dynRealm") || die "Can't access login credentials: ..\/etc\/dynRealm";

# assign the values in the accessDB file to the variables
my $database = <ACCESS_INFO>;
my $host = <ACCESS_INFO>;
my $userid = <ACCESS_INFO>;
my $passwd = <ACCESS_INFO>;

# the chomp() function will remove any newline character from the end of a string
chomp ($database, $host, $userid, $passwd);

# close the accessDB file
close(ACCESS_INFO);
#----------------------------------------------------------------------

# invoke the ConnectToMySQL sub-routine to make the database connection
$connection = ConnectToMySql($database);

# set the value of your SQL query

$querySel = "SELECT id,name,address FROM realmd.realmlist WHERE id = 1";
$queryIns = "UPDATE realmd.realmlist SET address = ? WHERE id = 1";

# prepare your statement for connecting to the database
$statement = $connection->prepare($queryIns);
$statement2 = $connection->prepare($querySel);

# execute your SQL statement
$statement->execute($eip);
$statement2->execute();

# retrieve the values returned from executing your SQL statement
@data = $statement2->fetchrow_array();

# print the first (and only) value from the @data array
# we add a \n for a new line (carriage return)
print join("\t",@data),"\n";


# exit the script
exit;

#--- start sub-routine ------------------------------------------------
sub ConnectToMySql {
#----------------------------------------------------------------------

my ($db) = @_;

# assign the values to your connection variable
my $connectionInfo="dbi:mysql:$db;$host";

# make connection to database
my $l_connection = DBI->connect($connectionInfo,$userid,$passwd);

# the value of this connection is returned by the sub-routine
return $l_connection;

}

#--- end sub-routine --------------------------------------------------

here is the dynRealm file i have mine set up in the mangos/etc directory (sticking with the style of the developers)

realmd
localhost
USERNAME
PASSWORD

change the USERNAME and PASSWORD fields to match your installation this script can be ran using a cron job (and because an ISP shouldnt really change your lease very offten you can safely run this about once a week or you can also place the perl script (Above) in your /etc/cron.weekly/ to let the cron daemon run this on a weekly basis if you do this you should also change the paths in this line: open(ACCESS_INFO, "<..\/etc\/dynRealm") || die "Can't access login credentials: ..\/etc\/dynRealm"; to match the location of your dynRealm connection file

As a note you dont need FULL database permissions for this user only need UPDATE and SELECT on realmd

  • 2 months later...
Posted
Thanks Madmax, but this doesn't work for me,

Lan ip works fine for lan and local but then my wan connection can't connect.

With server two and domain name it was easy, just add your domain name to oyur host file and it works fine.

But maybe i'm doing something wrong:

Server running on :192.168.1.1

lan 192.168.1.X/24

Wan 210.123.12.34/24

How can i change the wan ip number to my lan ip number?

i have tried full access, all ports are correct but wan client wil not go further then logon and cannot connect to world datbase server.

Found a workaround for now but there has to be a better way i guess.

Anyway thanks for the input,

Nagilum

whats your work arownd i'm having the exact same problem

Posted
whats your work arownd i'm having the exact same problem

My workaround "on my lan adapters for the lan pc's i've added an additional ip adres in the same range as the wan adres" works like a charm even though is not the best way.

Nagilum

Posted

The feature to have both a wan and a lan ip has been added do zero and one, and will be added to the later versions once I get around to doing my build system update.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use