Help With Dedicated Server And Dynamic Dns
ninet9
Join Date: 2004-10-13 Member: 32245Members
Hi all,
I have an administrator scenario that I have not been able to find a solution for. I’m running a half life server on Linux (Fedora 2), and I have a question about the startup. I have written a shell script that starts the server. The script contains the following
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
./hlds_run -game ns +maxplayers 19 +ip nine.homelinux.com +map ns_nancy &> server.log &
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I get the error message
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
“WARNING: UDP_OpenSocket: port: 27015 bind: Cannot assign requested address”
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Which implies to me that half life is not getting the correct IP address for my DNS name. Now if I do:
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
nslookup nine.homelinux.com
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I get the output:
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
…
Non-authoritative answer:
Name: nine.homelinux.com
Address: 68.251.183.75
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
So the command
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
./hlds_run -game ns +maxplayers 19 +ip 68.251.183.75 +map ns_nancy
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
starts the server, and all of my friends outside of my LAN can connect via my DNS name. I’m not sure why this has stopped working, it worked yesterday, and every day before that. Second, my IP is dynamic, and SBC will assign me a new IP about every ½ an hour if no clients are connected to my computer. When this happens, my dyndns.org account is updated automatically by my dynamic domain client. This has worked for over a year, so this is not an issue with my server. The problem is that half life is requiring an IP as an argument when the half life server starts, therefore it is no longer a valid server if my IP gets renewed, and my friends can’t connect without logging in via ssh and bouncing the half life server. Can anyone give me a hand with the DNS/IP issues?
Thanks,
Todd
I have an administrator scenario that I have not been able to find a solution for. I’m running a half life server on Linux (Fedora 2), and I have a question about the startup. I have written a shell script that starts the server. The script contains the following
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
./hlds_run -game ns +maxplayers 19 +ip nine.homelinux.com +map ns_nancy &> server.log &
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I get the error message
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
“WARNING: UDP_OpenSocket: port: 27015 bind: Cannot assign requested address”
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Which implies to me that half life is not getting the correct IP address for my DNS name. Now if I do:
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
nslookup nine.homelinux.com
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I get the output:
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
…
Non-authoritative answer:
Name: nine.homelinux.com
Address: 68.251.183.75
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
So the command
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
./hlds_run -game ns +maxplayers 19 +ip 68.251.183.75 +map ns_nancy
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
starts the server, and all of my friends outside of my LAN can connect via my DNS name. I’m not sure why this has stopped working, it worked yesterday, and every day before that. Second, my IP is dynamic, and SBC will assign me a new IP about every ½ an hour if no clients are connected to my computer. When this happens, my dyndns.org account is updated automatically by my dynamic domain client. This has worked for over a year, so this is not an issue with my server. The problem is that half life is requiring an IP as an argument when the half life server starts, therefore it is no longer a valid server if my IP gets renewed, and my friends can’t connect without logging in via ssh and bouncing the half life server. Can anyone give me a hand with the DNS/IP issues?
Thanks,
Todd
Comments
is your problem this must always be an IP address as hlds can not resolve FQDN's (Fully Qualified Domain Name)
your IP address is dynamic so just do not use the +IP "flag"
various game scanners will return the server info as ip 127.0.0.1:27015 however you can still connect to it via you dynamic DNS name record of
nine.homelinux.com which will always resolve to the correct IP address, just make sure if you're using a router, that all the HLDS ports are being forwarded to your server machine, or people will not be able to connect