Jump to content
  • 0

Interlude Vanganth and Dynamic IP


Question

Posted

Basically i need to setup a L2OFF server with a dynamic ip(this ip changes every time that the modem restarts)

I have a no-ip service,and vangath files ,so i use a noip of 15 letters (it can't containt more than 15 lettters on the dbo.server table)

Example serv67.ddns.net

So When Hauth Loads the server it says External IP "127.0.0.1" ,why not  serv67.ddns.net?

No problem i tried to log in the server but it get stucked on the server seleccion screen.

Both ports are open

 

 

1555.jpg

11 answers to this question

Recommended Posts

  • 0
Posted
14 hours ago, maxicroma said:

The Hauthd have a reload option ,there its some way to call this function every x time ?

 

Probably there is some way but this is much easier:

#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton
from threading import Thread

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name
hauthd = "C:\\l2\\auth\\hauthd.exe" # put correct path here!

class HauthdThread(Thread):
	def __init__(self):
		Thread.__init__(self)
		self.hauthdProcess = None
		self.doRun = True

	def run(self):
		while self.doRun:
			self.hauthdProcess = Popen([hauthd])
			self.hauthdProcess.wait()
			self.hauthdProcess = None

	def stop(self):
		self.doRun = False
		if self.hauthdProcess != None: self.hauthdProcess.kill()

	def restart(self):
		self.hauthdProcess.kill()

currentIp = None
ipUpdated = False
hauthdThread = None

try:
	while True:
		try:
			newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
			if newIp != currentIp:
				inet_aton(newIp) # check IP
				print >> stderr, "New IP address:", newIp
				currentIp = newIp
				isUpdated = False
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't get current IP address, will retry later"
			sleep(period)
			continue

		if isUpdated:
			sleep(period)
			continue

		try:
			popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
			popen.wait()
			isUpdated = True
			if hauthdThread == None:
				hauthdThread = HauthdThread()
				hauthdThread.start()
			else:
				hauthdThread.restart()
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't update IP address, will try later"

		sleep(period)
except:
	hauthdThread.stop()
	hauthdThread.join()
	raise

 

  • 0
Posted

LOL ... in the table place the actual ip of your dedicated.
And point the NO-IP to your dedicated, simple ip.

You do not need to put the ip of your DDNS or NO-IP in the settings, settling to point to pro IP enough.

So simple and they break the head with it!

  • 0
Posted (edited)
#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name

currentIp = None
ipUpdated = False

while True:
	try:
		newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
		if newIp != currentIp:
			inet_aton(newIp) # check IP
			print >> stderr, "New IP address:", newIp
			currentIp = newIp
			isUpdated = False
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't get current IP address, will retry later"
		sleep(period)
		continue

	if isUpdated:
		sleep(period)
		continue

	try:
		popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
		popen.wait()
		isUpdated = True
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't update IP address, will try later"

	sleep(period)

 

EDIT: You'll also need to restart hauthd somehow...

Edited by eressea
  • 0
Posted

Pase por el mismo problema con advext64 y te comento como funciona. Tu licencia se asocia a una direccion IP o dominio, ahi es cuando te registras en NO-IP, te dan un dominio gratuito y dentro de la pagina de NO-ip le asignas tu IP de ISP. (cualesmiip)... Esta misma ip la pones en el campo IP en dbo.server.  Ej

 

NO-IP:

hostname: l2xx.ddns.net

IP / TARGET: le pones el ip de tu isp  (cualesmiip).

 

En la base de datos, en IP pones tu ip de ISP tambien. 

  • 0
Posted
5 hours ago, eressea said:

#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name

currentIp = None
ipUpdated = False

while True:
	try:
		newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
		if newIp != currentIp:
			inet_aton(newIp) # check IP
			print >> stderr, "New IP address:", newIp
			currentIp = newIp
			isUpdated = False
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't get current IP address, will retry later"
		sleep(period)
		continue

	if isUpdated:
		sleep(period)
		continue

	try:
		popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
		popen.wait()
		isUpdated = True
	except KeyboardInterrupt, e:
		raise
	except:
		print >> stderr, "Couldn't update IP address, will try later"

	sleep(period)

 

EDIT: You'll also need to restart hauthd somehow...

The Hauthd have a reload option ,there its some way to call this function every x time ?

  • 0
Posted
13 hours ago, eressea said:

 

Probably there is some way but this is much easier:


#!/usr/bin/env python

from urllib import urlopen
from json import loads
from sys import stderr
from time import sleep
from subprocess import Popen
from socket import inet_aton
from threading import Thread

period = 60.0 # seconds
serverId = 1 # server ID
sqlcmd = "C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\SQLCMD.EXE" # put correct path here!
server = "(local)\SQLExpress" # put correct server string here!
database = "lin2db" # database name
hauthd = "C:\\l2\\auth\\hauthd.exe" # put correct path here!

class HauthdThread(Thread):
	def __init__(self):
		Thread.__init__(self)
		self.hauthdProcess = None
		self.doRun = True

	def run(self):
		while self.doRun:
			self.hauthdProcess = Popen([hauthd])
			self.hauthdProcess.wait()
			self.hauthdProcess = None

	def stop(self):
		self.doRun = False
		if self.hauthdProcess != None: self.hauthdProcess.kill()

	def restart(self):
		self.hauthdProcess.kill()

currentIp = None
ipUpdated = False
hauthdThread = None

try:
	while True:
		try:
			newIp = loads(urlopen("https://api.ipify.org?format=json").read())["ip"]
			if newIp != currentIp:
				inet_aton(newIp) # check IP
				print >> stderr, "New IP address:", newIp
				currentIp = newIp
				isUpdated = False
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't get current IP address, will retry later"
			sleep(period)
			continue

		if isUpdated:
			sleep(period)
			continue

		try:
			popen = Popen([sqlcmd, "-S", server, "-d", database, "-Q", "UPDATE dbo.server SET ip='%s' WHERE id=%s" % (currentIp, serverId, )], shell = True)
			popen.wait()
			isUpdated = True
			if hauthdThread == None:
				hauthdThread = HauthdThread()
				hauthdThread.start()
			else:
				hauthdThread.restart()
		except KeyboardInterrupt, e:
			raise
		except:
			print >> stderr, "Couldn't update IP address, will try later"

		sleep(period)
except:
	hauthdThread.stop()
	hauthdThread.join()
	raise

 

Great how should i run this script ,(seriously ,have no idea )?

  • 0
Posted
4 hours ago, maxicroma said:

Great how should i run this script ,(seriously ,have no idea )?

 

Download and install Python 2.7 https://www.python.org/downloads/release/python-2715/ - use Windows x86-64 MSI installer.

Then just run the script as if it was normal application.

  • 0
Posted
3 hours ago, eressea said:

 

Download and install Python 2.7 https://www.python.org/downloads/release/python-2715/ - use Windows x86-64 MSI installer.

Then just run the script as if it was normal application.

Awesome its working ,thx you dude :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Nice server, bro — 0 online and no crash. 🙂 You keep bragging that it’s online and has people, but in reality there’s nobody there. 😄
    • Wooowww!! Thank you so much bruv!! Really useful!! Thank you for smart solution, work and sharing!!
    • Generate your own. There are tools. 
    • Server Athena x45 C4 is running online since 11 January 2026 without wipe.
    • L2SPIRIT OF LORENA x3 INTERLUDE Discord: Discord SPIRIT OF LORENA < WEBSITE: L2 Spirit of Lorena x3 Interlude WEBSITE: L2-LORENA Network x30 x1200 x5000 PvP GRAND OPENING – 12 JUNE 2026 19:00 UTC+2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ LONG TERM PROJECT NO WIPE CLASSIC INTERLUDE OLD SCHOOL COMMUNITY REAL PROGRESSION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ WHY L2SPIRIT OF LORENA? Are you tired of servers that die after a few weeks? L2Spirit of LORENA was created for players who miss the true Interlude feeling: Clan Wars Castle Sieges Epic Bosses Party Farming Real Economy Long Term Progression No shortcuts. No instant endgame. No seasonal wipes. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SERVER INFORMATION 🛡 Chronicle: Interlude Type: Classic Low Rate Server: Long Term International Community ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RATES EXP/SP x3 Adena x3 Drop x3 Spoil x3 Raid Boss x3 Seal Stones x3 Quest x3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DYNAMIC EXP SYSTEM 1-20 = x3.0 20-40 = x2.7 40-52 = x2.4 52-61 = x2.1 61-70 = x1.8 70-76 = x1.5 76-77 = x1.2 77-78 = x1.1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FEATURES Auto Learn Skills Auto Farm Available 2 Windows Maximum Retail Olympiad Epic Bosses Daily Events Stable Dedicated Server Active Administration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ WHAT MAKES US DIFFERENT? No Wipe Policy Stable Economy Competitive Olympiad Clan Focused Gameplay Retail Feeling Friendly Community ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ THE JOURNEY MATTERS Every level. Every raid. Every item. Every victory. This is the Interlude experience you remember. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SERVER STATUS TOP L2JBRASIL:Top L2JBrasil de Servidores de Lineage2 - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ OPENING DAY 12 June 2026 19:00 UTC+2 Prepare your clan. Prepare for war. The adventure begins. SEE YOU IN SPIRIT OF LORENA!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..