View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002119 | unreal | ircd | public | 2004-10-10 20:21 | 2007-04-27 03:52 |
| Reporter | Stealth | Assigned To | |||
| Priority | normal | Severity | tweak | Reproducibility | N/A |
| Status | closed | Resolution | wont fix | ||
| Summary | 0002119: Interface number in listen block. | ||||
| Description | I saw a post on the forums about how someone had an interface with a dynamic IP. He was asking if there were some variable that could be used in the conf so he did not need to change the conf every time the interface or server was reset. I have thought of a solution to such an issue, having an interface with a dynamic IP myself. The idea was to be able to use the interface number in the listen block, such as: listen eth0:6667; This would tell Unreal to get the IP of eth0 and listen on that interface. I am not sure if this is possible in Windows systems, so it might need to be a feature available on *nix only. Just more of a reason for windows users to get a life and get something better. | ||||
| 3rd party modules | |||||
|
|
While this might (via whatever way, I've NFI) work on boot, when the IP gets changed or actually the whole interface goes down/up (like with most dialup,cable,dsl) I don't think unreal will magically use he new ip, nor would it probably get any notification that the IP was changed. Probably you would have to rehash then. Which is in fact, what happens to some daemons here on my (debian) Linux system (like for the BIND nameserver). Would it then still be useful? In fact, I don't really understand when you need this at all :p. I know no people at all that want their ircd only listening on their cable/*dsl IP and not on their 192.168*/10* ip :p. Could you give a good example? |
|
|
This was intended for booting/rehashing Unreal, because usually IP's get changed via DHCP when the machine is rebooted, or the interface is brought up/down. Also, everyone gets disconnected on an IP change. An example: Most *nix boxes wont allow anyone except root to listen on all interfaces, and people really dont like changing the IP in the conf everytime the IP changes with DHCP. In such a case, a netadmin may have a listen block that looks like: listen eth0:6667 This will take whatever the IP of eth0 is on boot/rehash. This way, when the interface IP changes the netadmin wont need to change the them conf. My box has a dynamic IP because the router doesnt want to give it a static one. So in my conf I currently have: listen 192.168.1.101:6667; But if the router/box/interface were to be reset, I would need to change the IP in the conf. Being able to use eth0 instead of the IP would make things easier than needing to change the 5 listen blocks I have. So basically this would just be for restart/rehash of Unreal. (I hope this answered your question) <edit> So Unreal knows that this is an interface it needs to get the IP from, maybe there should be a character to prefix/suffix/enclose the interface number in </edit> edited on: 2004-10-11 02:43 |
|
|
><edit> >So Unreal knows that this is an interface it needs to get the IP from, maybe >there should be a character to prefix/suffix/enclose the interface number in ></edit> I think the lack of a . would work quite well :P edit: codemastr: your quote hack isn't working for multiple lines edited on: 2004-10-11 03:28 |
|
|
> Most *nix boxes wont allow anyone except root to listen on all interfaces I'm not sure why you say that. Both Linux and FreeBSD don't have such default settings. I've only encountered such restrictions on (IRC) shells, which are of course fixed-IP, in fact usually with like xx ip's, not exactly the common home-gateway. |
|
|
I typed something out for a responce, but damned if I remember what I put (stoopid popup ads every 10 secs, and closed the window)... So, I will try again: My Redhat box has a root-only restriction on 0.0.0.0, so I cannot listen on *:6667. >I think the lack of a . would work quite well :P The lack of a . might make Unreal confuse it for a very short IPv6 address... not to sure about it, since I dont care for IPv6. It is still experimental, makeing it useless to make an IPv6 server. >I've only encountered such restrictions on (IRC) shells, which are of course fixed-IP, in fact usually with like xx ip's, not exactly the common home-gateway. One question: huh? Other than that, this feature would have a use, even on shells if it is possible to get your interface number. But, since I have developed this request out of a dead forum topic, more than just me will be using it :P For those wondering, the forum topic is: http://www.phpmemx.net/~unrealir/forums/viewtopic.php?t=792 |
|
|
firstly, windows box's do have interface names... so i presume you can get an ip from them too... secondly, what about using 'listen *:6667;'? that listens on all ips, and if you have a dynamic ip address, chances are you arnt going to be running multiple instances of the ircd bound to diffrent ips (and same port)... Edit: ok, missed the comments when writing this... also, i know that you can get it (on *NIX anyway) with libpcap (not sure if itll work non-root though...) what about like 203.*:6667? does that work? also, you could always remove the restriction about only root binding to 0.0.0.0... oh, also 'Just more of a reason for windows users to get a life and get something better.', redhat isnt much better :P... also, if your dsl gateway wont give you a static 192.168.* ip address (ie, your behind a nat with dmz/port forwarding set), then it dosent matter... give yourself one... dont use dhcp, set the ip manually (below the range your router uses for its dhcp allocations migh be good :P, 192.168.1.10 or something for instance... edited on: 2004-10-11 06:09 |
|
|
>oh, also 'Just more of a reason for windows users to get a life and get something better.', redhat isnt much better :P... Ya, I know RedHat isnt much better... but it works for now (new box fund has precisely $0.00). >what about like 203.*:6667? Dunno, I will try that when the IRCd needs to be restarted (my uptime looks too good) >give yourself one... dont use dhcp, set the ip manually (below the range your router uses for its dhcp allocations migh be good :P, 192.168.1.10 or something for instance... I let the router do it, less stuff to configure on the box (also partly cuz I dont know 100% how to do it...) :P me == LAZY! like it or not :) |
|
|
if you dont know how to do it, you shouldnt really be running a server now should you :P secondly, debian, mandrake and freebsd are all free... *personal preference is the last* :P |
|
|
> if you dont know how to do it, you shouldnt really be running a server now should you :P Well, your wrong. There is nothing that says a netadmin needs to know how to give his box a static IP. And if i needed/wanted to, I can look it up and have the steps to do it in minutes. *points at "Linux for Dummies"* > secondly, debian, mandrake and freebsd are all free... Redhat was free, works, and there is absolutly no need to waste time changing to someone elses OS. The saying "Dont fix it if it aint broke" comes to mind. Lets not turn this into a discussion about operating systems. This is a feature suggesting that is here for the mentally challenged *points to self*, and for those who would like to see such a feature in Unreal. I think such a feature in Unreal will be a great improvement and make managability a lot easier for those who have boxes with restrictions. P.S. - I may call myself mentally challeneged, but im sure my mental stability is better than 90% of the Unreal users :P edited on: 2004-10-12 04:54 |
|
|
Can they not listen *:port; ? This will not bind to a specific address then it will just accept connections from anywhere and everywhere edit: my apologies, ignore what i said, didnt notice your issues with listen * in previous comments. for a quick 'n nasty fix until this problem is resolved, you could listen lanip:port; and then use your firewall to redirect, for example on *bsd with pf: $ExtIF="iface of internet ip" rdr pass on $ExtIF inet proto tcp to port 6667 -> lan.ip.here port 6667 |
|
|
One way you could do this, is have a small little script to (re)generate something like a listen.conf from a template when run. Something like this: #!/bin/bash IP=`ifconfig | grep -A 1 $1 | tail -n 1 | cut -d: -f2 | cut "-d " -f1` sed s/%IP%/${IP}/ < listen.conf.template > listen.conf [ -r ircd.pid ] && kill -HUP `cat ircd.pid` Then all you'd have to do is set up a listen.conf.template with your ports, and include it from unrealircd.conf :) . Set up the script in cron or something and you're in business. |
|
|
> if you dont know how to do it, you shouldnt really be running a server now should you :P Heh, redhat has a somewhat tortuous system for hiding such things as network settings ... last time i needed to change the ip on a rehat box i had to dig through almost 10 different files to figure out what it was actually doing |
|
|
I still haven't seen any good argument why this should be added. People here say, in case you have dynamic ip... but why don't you simply listen on all interfaces then? Why would you listen on <your inet iface> but not on <your LAN iface> ? That doesn't make much sense to me. [and of course listen * is better since then you won't have to make it rehash and stuff] As mentioned in my post both Linux and FreeBSD can listen on all interfaces and have the ability to do so _by default_ [and if you got some odd settings, well it's your own box so change it to allow it], only on IRC shell boxes they tend to turn restrictions on so user X can only bind to IP Y, but guess what.. those shell boxes don't have dynip! so the IP stays the same, so then you won't be using the interface thingy. So: for who are we making this feature for?? I see very very limited use, but again.. prove me wrong.. I haven't seen any (technical) reply to my comment from 2004-10-11 (only confirmation of my thoughts or talk about distributions.. :P) I'm not against implementing it, just seeing very very little use until someone proves otherwise. If anyone writes a proper patch.. fine.. I'll put it in. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2004-10-10 20:21 | Stealth | New Issue | |
| 2004-10-10 20:46 | syzop | Note Added: 0007945 | |
| 2004-10-11 02:41 | Stealth | Note Added: 0007948 | |
| 2004-10-11 02:43 | Stealth | Note Edited: 0007948 | |
| 2004-10-11 03:28 | aquanight | Note Added: 0007949 | |
| 2004-10-11 03:28 | aquanight | Note Edited: 0007949 | |
| 2004-10-11 03:29 | syzop | Note Added: 0007950 | |
| 2004-10-11 05:41 | Stealth | Note Added: 0007951 | |
| 2004-10-11 06:01 | Neo-Vortex | Note Added: 0007953 | |
| 2004-10-11 06:03 | Neo-Vortex | Note Edited: 0007953 | |
| 2004-10-11 06:04 | Neo-Vortex | Note Edited: 0007953 | |
| 2004-10-11 06:09 | Neo-Vortex | Note Edited: 0007953 | |
| 2004-10-11 06:16 | Stealth | Note Added: 0007954 | |
| 2004-10-11 06:21 | Neo-Vortex | Note Added: 0007955 | |
| 2004-10-12 04:52 | Stealth | Note Added: 0007986 | |
| 2004-10-12 04:54 | Stealth | Note Edited: 0007986 | |
| 2006-01-06 20:34 | montarotech | Note Added: 0010931 | |
| 2006-01-06 20:35 | montarotech | Note Edited: 0010931 | |
| 2006-01-06 20:41 | montarotech | Note Edited: 0010931 | |
| 2006-01-07 15:35 | aquanight | Note Added: 0010949 | |
| 2006-01-08 01:03 | Nazzy | Note Added: 0010952 | |
| 2006-01-08 08:27 | syzop | Note Added: 0010953 | |
| 2007-04-27 03:52 |
|
Status | new => closed |
| 2007-04-27 03:52 |
|
Resolution | open => wont fix |