Page 1 of 1
IP in a variable
Posted: Thu Aug 26, 2004 10:00 am
by VegetaSan
isnt there some variable for the
IP that
unrealircd is running on. for example: my IP is
63.223.21.234
thenn..
in config file... wrote:listen @ip:*
{
options
{
ssl;
};
};
here is
@ip = 63.223.21.234
I asked if there is something like this because... when I
reboot or something .. then my
IP is different then before.. and the config file will be configed wrong.
if there isnt something like this. Then I recommend making one

Posted: Thu Aug 26, 2004 10:06 am
by Dukat
Does that listen block REALLY work?
It's syntax is wrong.
Use:
Code: Select all
listen <ip:port> {
options {
<option>;
<option>;
...
};
};
Anyway: If you don't have a static IP, buy one.
Or just don't use your dynamic IP in the listen block and listen on *:
Code: Select all
listen *:7000 {
options {
ssl;
};
};
Posted: Thu Aug 26, 2004 2:47 pm
by VegetaSan
yeah. I got one of those. But ... I need to type the IP there .. but what if the IP changed. . then you will connect to the wrong IP.
Posted: Thu Aug 26, 2004 3:04 pm
by Dukat
Why exactly do you NEED to type the IP there?

Posted: Thu Aug 26, 2004 3:38 pm
by VegetaSan
yeah .. the "link" (IP)
for example:
IP: 120.232.23.22
Static DNS: blabla.unreal.com
I needed to type "120.232.23.22" but .. what if the comp got rebooted and the ip changed to "120.232.24.168" then connecting to "blabla.unreal.com" wont work nomore.
Posted: Thu Aug 26, 2004 5:14 pm
by Psadi
First thing I would do is make sure the DNS gets the right IP.
If you are using a services like dyndns there is several programs for both windows and unix that will do the trick for you.
Posted: Thu Aug 26, 2004 7:15 pm
by VegetaSan
I dont have any idea how to get these programs .. or what they are called. could you tell me the names , thx
Posted: Thu Aug 26, 2004 7:22 pm
by Stealth
About the original post:
Putting the computers IP in a variable will not work. If there are more than 1 interface on a computer (such as a shell), how will Unreal know what IP to put in this variable? The only way I can think of is to bind to all the IP's that it can find and see which ones it can access, but that just doesnt make any sense. And if you were to do that, what would happen if there is more than 1 IP that Unreal can bind to?
There are just too many problems that such a feature can cause. Something like this just wont be done.
Posted: Thu Aug 26, 2004 8:21 pm
by Psadi
It depends on which dns service you are using
Im using dyndns and there it works well with
http://ddclient.sourceforge.net/ for unix, this one should work with other dns services as well.
for windows you have several also.
DynDns has this page with several clients that works
https://www.dyndns.org/services/dyndns/clients.html
Or you could run your own DNS server but that is over my head

Posted: Thu Aug 26, 2004 11:34 pm
by AngryWolf
Everyone who replied here miss an important thing. Let's say, your IP address is 1.2.3.4. You type listen 1.2.3.4:6667; in your conf. Your IP then changes to 5.6.7.8. Because Unreal doesn't listen on 5.6.7.8:6667, you can't connect to the server anymore. You lose all clients connected to the server. You must update your listen block. or they won't be able to reconnect. So you need an automatic update of the configuration file everytime the IP changes (and a /rehash is required as well, of course).
Posted: Fri Aug 27, 2004 2:22 am
by aquanight
Well, if you're not on a shell (i.e. your own box), just listen *:blah and be done with it ;p .
Posted: Fri Aug 27, 2004 6:48 am
by Psadi
AngryWolf I didnt miss the point

I just a similary config.
I have dynamic IP and from reading the doc I came to the conclusion that its was better to as aquanight says to listen to *:port then to each time I get a new IP go in a change that, not fun to find out the server was down just becuase of a IP change. To have a static way to get to the server i got myself a DNS name and then I use dyndns to keep the DNS name poiting to my IP that is dynamic. So far its been working very well.
I think that this is a better way then to have a variable in the config file to pull the IP in.
If you had that then you would need a mechanism to detect in the IRCd server when the server gets a new IP and then pull the new IP into the config file and then rehash it automaticly.
Posted: Fri Aug 27, 2004 10:31 am
by AngryWolf
Ok, sorry.

Posted: Fri Aug 27, 2004 11:19 am
by VegetaSan
I assume I need the program called "3DWatch" ... for Win32.
well anyways .. thanks for all the info guys .. you helped me out alot. thx again.
Posted: Sat Aug 28, 2004 5:20 pm
by Stealth
This post is getting a little off topic. See my earlier post, the one that actually applied to the original topic.
If you want to continue your discussion about dynamic DNS's and dynamic IP's, make a new post in the "Off Topic" forum.