How to do it?

Talk about pretty much anything here, but DO NOT USE FOR SUPPORT.

Moderator: Supporters

Post Reply
k4be
Posts: 29
Joined: Sun Jan 09, 2005 12:19 pm
Location: Poland

How to do it?

Post by k4be » Sun Oct 08, 2006 9:08 pm

I want to ban (akill, gline etc.) ~*@* excepting *@*.pl but this exception may not affect other z: or g:lines. Using Unreal and Anope. How to do it?

Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth » Mon Oct 09, 2006 4:11 am

Add ban user and except ban blocks to your unrealircd.conf

ban user { mask ~*@*; reason "Whatever"; }
except ban { mask ~*@*.pl }

IIRC those should work properly... If not, you should be able to replace the ~* with "unknown" such as "unknown@*" and "unknown@*.pl"

k4be
Posts: 29
Joined: Sun Jan 09, 2005 12:19 pm
Location: Poland

Post by k4be » Mon Oct 09, 2006 6:22 pm

but... if i /gline for example user@*.adsl.tpnet.pl, will this except override this /gline?

tdw
Posts: 105
Joined: Sat Aug 06, 2005 12:40 pm

Post by tdw » Mon Oct 09, 2006 6:37 pm

yep.

Jobe1986
Official supporter
Posts: 1179
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe1986 » Mon Oct 09, 2006 9:30 pm

Use an allow block to only allow users with a .pl tld to connect then use the ban user line Stealth suggested with no other allow blocks or others changed to a similar hostname mask. For example:

Code: Select all

allow {
	ip             NOBODY;
	hostname       *@*.pl;
	class           clients;
	maxperip 5;
};
ban user { mask ~*@*; reason "Whatever"; } ;
Somebody correct me with the ip value if its wrong please.

Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth » Mon Oct 09, 2006 11:25 pm

tdw wrote:yep.
No

Except ban blocks are only for what is set in the conf and K:Lines. except tkl blocks are for everything else.

Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth » Mon Oct 09, 2006 11:25 pm

Jobe1986 wrote:Use an allow block to only allow users with a .pl tld to connect then use the ban user line Stealth suggested with no other allow blocks or others changed to a similar hostname mask. For example:

Code: Select all

allow {
	ip             NOBODY;
	hostname       *@*.pl;
	class           clients;
	maxperip 5;
};
ban user { mask ~*@*; reason "Whatever"; } ;
Somebody correct me with the ip value if its wrong please.
Allow blocks will not override any kind of ban

Jobe1986
Official supporter
Posts: 1179
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe1986 » Tue Oct 10, 2006 12:38 am

If you re-read the first post he/she wants to disallow all connections from users with no ident response. This means the ban line givern only bans users with no ident response regardless of whether they have a .pl extention but still allows users with a .pl extention and ident response.

You can use the except ban provided by Stealth below as well.

k4be
Posts: 29
Joined: Sun Jan 09, 2005 12:19 pm
Location: Poland

Post by k4be » Tue Oct 10, 2006 12:30 pm

Jobe1986 wrote:If you re-read the first post he/she wants to disallow all connections from users with no ident response. This means the ban line givern only bans users with no ident response regardless of whether they have a .pl extention but still allows users with a .pl extention and ident response.
I want to ban connections with no ident response from any address, but if the user has .pl tld, it should allow him even without an ident.
I will try solution in the first reply.

Jobe1986
Official supporter
Posts: 1179
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe1986 » Tue Oct 10, 2006 1:45 pm

The first sollution suggested by STealth should work for what you need. And after thinking about it i realized i mis-interpreted what you wanted so i would like to appolagize for any confusion i may have caused.

Post Reply