Page Index Toggle Pages: 1 Print
Guardian Domain and IP Banning (Read 8196 times)
Captain John
Ex Member


Guardian Domain and IP Banning
Sep 25th, 2007 at 3:14am
Print Post  
Guardian Domain Banning

In YaBB you have three ban options, being IP number (or partial number), user id or email address (and any combo of three).

If your friend comes from eg. Ip adress 111.222.123.123 and the admin adds exactly that address to the ban system only that particular address is banned (cookies or not). 
If the admin however enters only 111.222 the whole IP block 111.222.0.0 upto 111.222.255.255 gets banned.  (this partial IP is considered a wildcard entry)

In Admin Center > Member Ban
enter e.g \.ru to block a countries mailing domain
Just use "\.whatever" (make sure to backslash the .). Change the highlighted to the domain desired

NOTE:  Search wildcards such as * ? etc. are NOT allowed in IP or Domain banning !
« Last Edit: Sep 2nd, 2011 at 3:44pm by »  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Guardian Domain and IP Banning
Reply #1 - Jul 28th, 2008 at 4:02pm
Print Post  
An Enhanced Email Blocker for Y2.1


****************************************************
Edited Register.pl

find this
Code
Select All
} elsif ($dummy eq "E") {    # EMAIL BANNING
	foreach $emailbanned (@banned) {
	  if (lc $emailbanned eq lc $ban_email) {
	    fopen(LOG, ">>$vardir/ban_log.txt");
	    print LOG "$ban_time|$emailbanned ($user_ip)\n";
	    fclose(LOG);
	    &UpdateCookie("delete", $ban_user);
	    $username = "Guest";
	    &fatal_error("E: $security_txt{'678'}$security_txt{'430'}!");
	    &redirectinternal;
	  }
	} 




replace with...

Code
Select All
} elsif ($dummy eq "E") {    # EMAIL BANNING
	foreach $emailbanned (@banned) {
	  my $result = -1;
	  my $result = index(lc $ban_email, lc $emailbanned);
	  if ($result > -1){
	    fopen(LOG, ">>$vardir/ban_log.txt");
	    print LOG "$ban_time|$emailbanned ($user_ip)\n";
	    fclose(LOG);
	    &UpdateCookie("delete", $ban_user);
	    $username = "Guest";
	    ###  &fatal_error("E: $security_txt{'678'}$security_txt{'430'}!");   replaced with below
	    &fatal_error("Error: The email address you are attempting to register with ($ban_email) has been banned from use on this forum.");
	     &redirectinternal;
	  }
	} 




Now all you need to do is put:

@mail.ru (or whatever the address in question) NO ASTERICK
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Print
 
  « Board Index ‹ Board  ^Top