Change the dns of ts3

Pain

Member
Feb 20, 2016
102
17
53
Hi, Is it possible to change the dns automatically every day
Ex :
Day 1 : ts1.example.com
Day 2 : tsblablabla.example.com
It's possible ? of it's possible to make a script ?
i have this a idea for nothing hahaha , just asking
 

Asphyxia

Owner
Administrator
Apr 25, 2015
1,844
2
2,197
327
Pretty sure this was already answered here: http://forum.teamspeak.com/threads/77251-TSDNS-Add-parameter

You would just automate the mentioned process it sounds like.

you can already just edit/append to the tsdns_settings.ini file and then run the tsdns binary with the --update parameter.
This could also be done automatically by application if you want to.

There is no need to stop the service to update the settings, you just start a second instance with the --update parameter which will tell the already running instance to use the new settings. Afterwards the second instance will exit.

If you were to add an input field (or other means for you / your customer) to the your Customer Service Center you could then have the script / application that receives the Input when the user confirms the changes automatically edit the File and run the tsdns with the --update parameter. Though there might be problems with concurrent editing if you have many customers editing at the same time, so this might not be a solution for a large scale environment.

For larger scale environments you could save all the TSDNS Names for your customers in an SQL Database which could easily be updated from your customer service center page. A script would then run every 5 minutes using crontab / task scheduler reading the Entries from the database, create the tsdns_settings.ini from these records and then have this script call the tsdns server with the --update parameter. This way you would be able to offer your customers the ability to update their TSDNS address automatically with a reasonable delay. The small delay shouldn't really hurt as updating the TSDNS Name shouldn't happen frequently.

If you automate this, you should be good. Another way this could be accomplished is by using SRV records and the Cloudflare API. Not sure what you are trying to do, can you explain in more detail why you want to do this or what you are trying to do this for?

I could see this being useful if for example your TS3 server goes offline, so you automatically switch. :cool:
 
Last edited:

Pain

Member
Feb 20, 2016
102
17
53
@Asphyxia , Thanks for the answer, what I want to do is that the dns of my server to change its name every 24 hours,
Ex : Today 30-04 my dns name is : (127.0.0.1:9987) : server.myts.com , but into 24 hours i need that the dns change the name for (127.0.0.1:9987) : othername.myts.com , every 24Hours a another name, so people can't join in my ts if i don't have the new dns name.
I need it to change automatically every 24 hours , it's a secret teamspeak server :), you can join today, but after 24 hours not more because the dns is another name.
 

Pain

Member
Feb 20, 2016
102
17
53
@Joxiii that's good for me, but i don't have that script, and im bad with php, do you know of someone have of here in the r4p3 forum ? thankyou men.
 

Asphyxia

Owner
Administrator
Apr 25, 2015
1,844
2
2,197
327
@Joxiii that's good for me, but i don't have that script, and im bad with php, do you know of someone have of here in the r4p3 forum ? thankyou men.
https://docs.planetteamspeak.com/ts3/php/framework/index.html#example4

Glancing at the documentation, you can see there are plenty of examples.

You want to change virtualserver_password= --- as opposed to the server GFX banner url, etc.

Then you want this to execute every 24 hours. Do you think you can do it or do you need help? :p

Keep in mind that would do all servers.
 
Apr 30, 2017
8
0
33
Helpful website to check DNS worldwide -

https://dnschecker.org

You can check record A, AAAA, NS, MX, NS, CNAME, PTR, SOA, TXT
in 21 countries for free, just paste your domain name

Remember that domain registrar will update your DNS up to 72 hours
 

DCFroMLiFe

Member
Dec 12, 2015
10
2
35
You can do it easily with SRV record + hosting panel API(plesk, cpanel etc). But there is a problem about chancing DNS address. People can find your ip and port(127.0.0.1:9987) then they can join with it even you change your DNS address.
Other option is chancing password with script:

PHP:
<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php");

$ts3_VirtualServer = TeamSpeak3::factory("serverquery://username:[email protected]:10011/?server_port=9987");

$ts3_VirtualServer->modify(array(
 "virtualserver_password" => "NewPassword"
 ));

?>
 
Top