![]() |
[TUTORIAL] How to setup L2 OFF server with dynamic ip
Let me make some things clear first
what this is NOT: - tutorial for setting up L2 off server - tutorial for troubleshooting a non working L2 off server I assume that you are already familiar with the processes of L2 server and you know the database the l2 uses well... I assume that your L2 server works well ( you can connect and play on your server ) I assume that the l2authd.exe program runs on the same machine as the MSSQL Database I also assume that your internet connection is on the machine where the l2authd program runs. First of all you need a dynamic domain, dont worry, there are hundreds free out there. I recommend http://www.dyndns.org. For the purpose of this tutorial i will assume you registered l2serv.dyndns.org domain After you made your account and created a Dynamic DNS domain you need a program that can update your ip to the domain every time it changes. Use this one: http://www.directupdate.net/download.html i will explain why. (this is not freeware, expires in 60 days, but i'm sure you will find ways :D ) Install it on the machine where the DSN files reside. ( you will need the lin2db.dsn that you already created. By default it is in: C:\Program Files\Common Files\ODBC\Data Sources\lin2db.dsn) After installation, setup your account that you made at the DynDNS site in the DirectUpdate program. After you make sure that the DirectUpdate updates your ip to the domain correctly every time it changes. You will need the following javascript script that i made for this purpose: Code:
var args = WScript.Arguments;Now you need to open the administration module of direct update and select Actions and do the following: "When a new Ip is detected..." check: Launch the external application click modify Full path: %windir%\system32\wscript.exe Parameters: \your\path\to\updateip.js *IP* Sample image follows: http://users.otenet.gr/~moss/l2/duexample.jpg You can click test to see if it works correctly. If it doesn't then you did something wrong! Let me assure you that terminating and restarting the l2authd server does not crash neither the L2server nor the L2npc and the l2server will always try to reconnect to the l2authd. Now all you need to do is to put the address you registered on the dyndns site to your l2.ini ServerAddr=l2serv.dyndns.org After that you should be able to connect to your server anytime after the ip changes and no further actions should be required ;) Feel free to modify the javascript code and improve it if you like :) It's kind of quick and dirty solution but works :) Give me feedback of success/failure stories :) Hope that tutorial helps :D cheers (excuse my english, I'm greek :P) |
I have to add a few comments...
First of all I have seen people requesting this on ragezone but from ragezone I am really dissapointed people are NOT willing to share there... So there is no way to post this at ragezone... Definately I hate replies of the type: "Use search you noob" and the like when you do search and there is nothing to find. (I am almost convinced that they are deleting usefull posts there, for reasons I cant imagine) I am glad people contribute stuff here so I would like to add my little thing as well :) Keep sharing/contributing, I sure will as much as I can! YOU CANNOT COPY MY POST AND PASTE IT ON RAGEZONE I WILL BE PISSED IF I SEE SOMEONE DO THAT.... You can simply add a link to this post if you wanna help someone there... Thank you (i got it out of my system ) :P |
Well i can tell you that someone will do that. And for u to say DONT DO IT its only one more reason for them to actually DO it.
Anyway thanks for that java script. The update in the db is the only thing i actually needed but thks anyway ;) |
lol wow thats alota stuff, i just had to go into my router admin area and set it so it doesnt change ips auto. ><
|
Quote:
Its not intended for those that use DHCP (duhh omg!) |
Quote:
If people believe that getting credit by using someone elses tutorial actually makes them something, are morons... and of course worthless pieces of shit :P (sorry i cannot control my self :roll: ) |
thanks for guia for noobs moss, but, uny question..
http://img215.imageshack.us/my.php?i...rorjava8ua.jpg please, helpme.. thanks :D |
maybe you edited something that you should not...
|
Very cool. :) Thought I'd give it a whirl, and got this error.
http://img398.imageshack.us/img398/6092/error5hm.jpg Here's my script edited with my paths. Code:
var args = WScript.Arguments; And yes, server is up and fully functional with no errors. |
hmm!
My guess is that the .dsn file has some kind of a problem... Open your lin2db.dsn file with a text editor... it should look like this: Code:
[ODBC]I also noticed that you changed the last Run() function I have a reason for running the authd with a cmd... That is because windows scripting Run() function does not support a working path argument... If you run directly the .exe the working path is not where the executable is placed, this will produce an error in your authd program... Running with cmd first changes drive, then changes directory and then runs the authd... Otherwise it will not work. Code:
Wsh.Run("cmd /D /C D: & CD D:\\ProjectC2-Beta3-Final\\NewAuth & l2authd.exe"); |
|
Quote:
|
OK, my lin2db.dsn looks like that save for the UID and server names.
Quote:
The problem I'm getting is exactly what it says in the screenshot. "It's not a valid compund file." I even tried to compile the different parts of the javascript to see where the error was. So I tried this: Code:
//Connect to MSSQL :banghead: |
I understand your frustration about this, honestly I could not expect a problem like this... I 'll figure out another way to connect to MSSQL and I will post it!
|
Cool. Will be waiting for your update! :)
|
Isn't possible to make a script that connects directly to MSSQL not through ODBC ?
|
| All times are GMT. The time now is 15:40. |