Page 1 of 1
Unrealircd 3.2.3 redirect user connection
Posted: Mon Sep 26, 2005 3:09 pm
by robbtek
I want to redirect users from specific ip (or subnet) to a specific server .
I'm trying with :
Code: Select all
allow {
ip *@XXX.XXX.XXX.XXX;
hostname *@XXX.XXX.XXX.XXX;
class clients;
redirect-server my.second.server;
};
allow {
ip *@*;
hostname *@*;
class clients;
};
But it dont work , where is the error ?
Thanks
Posted: Mon Sep 26, 2005 3:47 pm
by Dukat
Please read the documentation about allow blocks, robbtek:
http://www.vulnscan.org/UnrealIRCd/unre ... allowblock
(especially the part "About matching" could be interesting for you...)
Posted: Mon Sep 26, 2005 7:41 pm
by robbtek
I've read it , but I dont understand .
I've tryed with :
Code: Select all
allow {
ip *@*;
hostname *@*;
class clients;
};
allow {
ip *@XXX.XXX.XXX.XXX;
hostname NOBODY;
class clients;
redirect-server irc2.myserver.com;
};
and ...
Code: Select all
allow {
ip *@*;
hostname *@*;
class clients;
};
allow {
ip *@XXX.XXX.XXX.XXX;
hostname *@XXX.XXX.XXX.XXX;
class clients;
redirect-server irc2.myserver.com;
};
and ...
Code: Select all
allow {
ip *@*;
hostname *@*;
class clients;
};
allow {
ip *@XXX.XXX.XXX.XXX;
class clients;
redirect-server irc2.myserver.com;
};
It doesn't work

Posted: Mon Sep 26, 2005 8:48 pm
by Stealth
You need to make another class that is always full. The redirect-server ONLY works when that class is full, otherwise, clients will be able to connect.
Posted: Mon Sep 26, 2005 9:34 pm
by robbtek
Code: Select all
allow {
ip *@XXX.XXX.XXX.XXX;
hostname NOBODY;
class clients;
maxperip 0;
redirect-server irc2.myserver.com;
};
allow {
ip *@XXX.XXX.XXX.XXX;
hostname NOBODY;
class clients;
redirect-server irc2.myserver.com;
};
?
Posted: Mon Sep 26, 2005 10:16 pm
by Stealth
No, you need to make another CLASS. The maxperip setting is not another class.
Posted: Wed Sep 28, 2005 3:24 pm
by robbtek
Code: Select all
class redirect_user {
pingfreq 90;
maxclients 0;
sendq 100000;
recvq 8000;
};
allow {
ip *@XXX.XXX.XXX.XXX;
hostname NOBODY;
class redirect_user;
maxperip 0;
redirect-server irc2.myserver.com;
};
??
DOnt work

Posted: Wed Sep 28, 2005 5:05 pm
by mexx3k
checkout the module "m_jumpserver" ... with that you can redirect user, either new connections, all connections ... you can specify the new server with port and ssl-instructions ...
we're using that when upgrading servers to redirect users in the IRC on another server before the shutdown ... works great

Posted: Wed Sep 28, 2005 7:47 pm
by Stealth
mexx3k, please read his posts
The allow block that is redirecting users MUST BE THE LAST ALLOW BLOCK IN THE CONF! You obviously did NOT read the documentation about matching like we told you, and you said.
Posted: Wed Sep 28, 2005 8:11 pm
by Syzop
Also, a class with maxclients set to 0 is illegal.
I'm afraid you are trying to (ab)using a feature for something it wasn't designed for ;). The redirect-server stuff is meant for when a class or server is full, not some means for users to choose the closest server or anything.
You are aware of DNS round robin? (irc.blah.net pointing to several ips)
Posted: Thu Sep 29, 2005 8:15 am
by robbtek
I dont think that rr is a good idea , because I want to redirect certain kind of connection (like by nationality) .
example : usa user redirect to usa server , eu user to eu server , specific subnet user to specific server ... etc ...
Posted: Thu Sep 29, 2005 10:48 am
by Dukat
Use different DNS pools (eu.irc.yourdomain.com, usa.irc.yourdomain.com).
You could also use "views" in BIND 9, i guess (see the documentation of BIND).
BIND 9 Administrator Reference Manual wrote:The view statement is a powerful new feature of BIND 9 that lets a name server answer a DNS query
differently depending on who is asking.
Posted: Thu Sep 29, 2005 12:01 pm
by robbtek
I havent write that I have dns amministration , I've ask how to redirect user to another server .
Posted: Thu Sep 29, 2005 12:42 pm
by mexx3k
Stealth wrote:mexx3k, please read his posts

okay, "redirect by origin" doesn't work ... i just saw the "redirect"-aspect
