Jump to content
  • 0

Connecting LAN Server to localhost db


gugagom

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/31/19
  • Last Seen:  

I'm trying to put an offline server, which was setup with localhost in conf, to lan, but I don't want to put the database in my server outside of localhost. How can I configure the server on those requirements?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/31/19
  • Last Seen:  

Thanks for the help guys, by the time I'm seeing these answers I resolved my issue by digging a little in openserver config. Tomorrow, for purposes of information I will update this topic on how I did it. Thank you all for your help Anacondaqq and Tanlor.

I'm really very gratefull.

Enoyable... Evening? I'm from Brazil and here is late afternoon.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   14
  • Joined:  07/23/18
  • Last Seen:  

You can install a Software called Xampp, and use it to create a database on Localhost.

 

https://github.com/rathena/rathena/wiki/XAMPP_Installation

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/31/19
  • Last Seen:  

Sorry I didn't state it, I should be more clear. I'm using OpenServer, I used Anacondaqq's offline server as it's really faster and easier. I'm trying to change the config to use it in hamachi, that's why I don't want to change the database in there. Could you help me pointing which setting I change to make the server connect in the hamachi IP?

Oh, and thanks for the help anyway.

Edited by gugagom
Thanking for the support.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   14
  • Joined:  07/23/18
  • Last Seen:  

So you need to store your database on localhost/anacondaqq but you need that other people connect to you server via Hamachi?

If yes, you can change the database configurations on ~/conf/inter_athena.conf and point it to Localhost/Anacondaqq, and then use the Hamachi IP as Login/Char/Server IP, editing the files login_athena.conf, char_athena.conf and map_athena.conf also on ~/conf/ folder.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   345
  • Joined:  02/26/12
  • Last Seen:  

5 hours ago, gugagom said:

I'm trying to put an offline server, which was setup with localhost in conf, to lan, but I don't want to put the database in my server outside of localhost. How can I configure the server on those requirements?

Ideally without  hamachi and tons of issues https://gist.github.com/anacondaqq/3eae8e4afb5d3c3880d08b95b2c54b78

What about hamachi... As far as I remember (but not tested) you will make a private network (new network interface, where all traffic will go) and need edit just sclientinfo.xml and the emulator will work just fine. What about exposing your data to someone else, by default in OpenServer you have an option which blocks all outgoing connections from your host (mysql database too) But not sure it will work for hamachi. Optionally you can restrict with any firewall (for example windows one) just to make sure that nothing exposed next ports: 80, 443, 3306, it will be enough to protect your server.

Edited by Anacondaqq
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   14
  • Joined:  07/23/18
  • Last Seen:  

I'm from Brazil too ?

If you want, ask me by private message, so we can talk in Portuguese. o/

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/31/19
  • Last Seen:  

After some testing with my colleagues, Hamachi is not the best way to put this server, as they were experiencing 10 second lags randomly across the gameplay. Still the idea of putting the server to LAN or any other VPN service that is better than hamachi makes me want to go deeper in this experiment.

It is actually very simple if you know what to do:

First of all, making the SQL server localhost and making the server connect to it from another IP is really slow and I think that's why the connection was lagging with the other hosts.

Very insecure method, if you don't know what you are doing, please avoid unless your connection is protected via external ways.

Spoiler

To change the location of the SQL server with OpenServer you will need to access the settings by clicking with the right button in the notification area icon of OpenServer. Remember to "Stop server" before changing any settings.

In the settings, go to the 'Server' tab and change the IP from 127.0.0.1 to the IP of your LAN or your VPN service IP (say you're using Hamachi, your IP will be 25.xxx.xxx.xxx format). Look for the part in yellow.

OpenServer is a b* about domains, it won't let you change the IP address and keep it 'localhost', so let's change it to something else, like 'serverrag'. Change to domains tab, keep the first setting 'Autosearch' and then... be creative!

Now you save and start your server to see if it connects. If it fails, it probably means you put the wrong IP.

 

Changing the confs to interconnect the server with the new database location:

There's only one .conf you should change actually, it's the inter_conf.txt, located in 'your emulator directory'/conf/import. A bunch of xxxxs means 'your IP here'.

I would tell how to change the permissions to making the connection from another IP but I believe at this time you already did it so, be it.

Later tader, and thank you all!

 

 

Edited by gugagom
Putting a spoiler and a warning about connection security. As reminded by Anacondaqq in earlier posts.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...