YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
Guardian & iptables (Read 2,693 times)
 Aug 3rd, 2011 at 8:57pm
There are no actions to perform.  

Reno Paul 
YaBB Newbie
*
Offline
Posts: 3
Reno, NV


YaBB 2.5
Guardian & iptables
Hello all, I've been running YaBB on my servers for a few years, and after upgrading to 2.5 AE, noticed the "The Guardian" feature.  Newbie to this forum though.

I'd love to modify the code to add any abuse address that's been added to the .htaccess file, so it also does a system call to firewall the ip address too.

This is running on my server, not a hosted server.

My perl experience is very "old school", and not up to date.

Looks to me that Sources/Guardian.pl, starting after line 468 is the area to add the code

if ($action eq "add") {
print HTA "Deny from $value\n";
system("iptables  -A INPUT -s $value -j DROP");
}
print HTA "$htfooter\n";

Comments? Suggestions?  Wrong forum?

Thanks in advance!
 
 
IP Logged  
 Reply #1 - Aug 10th, 2011 at 3:47pm
There are no actions to perform.  

xnoddyx 
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline
Posts: 1,552
UK:Scotland/livingston


YaBB 2.5
Re: Guardian & iptables
Reno Paul wrote on Aug 3rd, 2011 at 8:57pm:
Hello all, I've been running YaBB on my servers for a few years, and after upgrading to 2.5 AE, noticed the "The Guardian" feature.  Newbie to this forum though.

I'd love to modify the code to add any abuse address that's been added to the .htaccess file, so it also does a system call to firewall the ip address too.

This is running on my server, not a hosted server.

My perl experience is very "old school", and not up to date.

Looks to me that Sources/Guardian.pl, starting after line 468 is the area to add the code

if ($action eq "add") {
print HTA "Deny from $value
";
system("iptables  -A INPUT -s $value -j DROP");
}
print HTA "$htfooter
";

Comments? Suggestions?  Wrong forum?

Thanks in advance!

hi there the Guardian adds ip's to the .htaccess file for the forum
and if you have a list of abuse address then you can enter them here
Admin Center >> The Guardian >> and in Global and Server Settings
Enter IP addresses or (partial) domain names you want blocked on server level, one per line
hope this helps you  Wink
 
YaBB install help video
1. what yabb forum are you running and the url
2. describe in as much detail as you can what happens and also post screenshots if you can
3. please be patient we live in different time zones and have other commitments but we will help you
as bill and ted say (Be excellent to each other)
WWW xnoddyx xnoddyx1  
IP Logged  
 Reply #2 - Aug 10th, 2011 at 5:30pm
There are no actions to perform.  

Reno Paul 
YaBB Newbie
*
Offline
Posts: 3
Reno, NV


YaBB 2.5
Re: Guardian & iptables
xnoddyx wrote on Aug 10th, 2011 at 3:47pm:
Reno Paul wrote on Aug 3rd, 2011 at 8:57pm:
Hello all, I've been running YaBB on my servers for a few years, and after upgrading to 2.5 AE, noticed the "The Guardian" feature.  Newbie to this forum though.

I'd love to modify the code to add any abuse address that's been added to the .htaccess file, so it also does a system call to firewall the ip address too.

This is running on my server, not a hosted server.

My perl experience is very "old school", and not up to date.

Looks to me that Sources/Guardian.pl, starting after line 468 is the area to add the code

if ($action eq "add") {
print HTA "Deny from $value
";
system("iptables  -A INPUT -s $value -j DROP");
}
print HTA "$htfooter
";

Comments? Suggestions?  Wrong forum?

Thanks in advance!

hi there the Guardian adds ip's to the .htaccess file for the forum
and if you have a list of abuse address then you can enter them here
Admin Center >> The Guardian >> and in Global and Server Settings
Enter IP addresses or (partial) domain names you want blocked on server level, one per line
hope this helps you  Wink


I understand how that operates, and I'm using that.  However, with the surge of events being trapped by The Guardian, I was looking for a way to automate this process server wide.

This works fine on the single domain YaBB is installed, but since I'm hosting a few other domains, I'd love to automate it one step further.  I figure that if one domain is getting hit, and The Guardian is trapping those, why not use it to help protect the other domains.

With my limited perl experience for security issues, I just want to make sure my adding that line won't break YaBB.

Thanks for your response.
 
 
IP Logged  
 Reply #3 - Aug 10th, 2011 at 7:13pm
There are no actions to perform.  

xnoddyx 
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline
Posts: 1,552
UK:Scotland/livingston


YaBB 2.5
Re: Guardian & iptables
Reno Paul wrote on Aug 10th, 2011 at 5:30pm:
I understand how that operates, and I'm using that.  However, with the surge of events being trapped by The Guardian, I was looking for a way to automate this process server wide.

This works fine on the single domain YaBB is installed, but since I'm hosting a few other domains, I'd love to automate it one step further.  I figure that if one domain is getting hit, and The Guardian is trapping those, why not use it to help protect the other domains.

With my limited perl experience for security issues, I just want to make sure my adding that line won't break YaBB.

Thanks for your response.


ah i get you now  Roll Eyes
you mite be better posting on here http://www.boardmod.org/ if one of the Development Team dont get back to you here

hope this helps  Wink
 
YaBB install help video
1. what yabb forum are you running and the url
2. describe in as much detail as you can what happens and also post screenshots if you can
3. please be patient we live in different time zones and have other commitments but we will help you
as bill and ted say (Be excellent to each other)
WWW xnoddyx xnoddyx1  
IP Logged  
 Reply #4 - Nov 18th, 2011 at 9:09pm
There are no actions to perform.  

Guy Whedatley 
YaBB Newbie
*
Offline
Posts: 5


None
Re: Guardian & iptables
I've been trying to block IP in The Guardian using wildcards for the last two octets. Examle:
29.159.***.***
I now realize this is incorrect. For one thing it doesn't work. (My server does support .htaccess) I also noticed that you're only allowed one wildcard per line.
My first question is, "What is the wildcard character?" I assumed "*."
Second, will the correct syntax be 29.159.268.*?

Thank for any help you can give.
 
 
IP Logged  
 Reply #5 - Nov 18th, 2011 at 10:39pm
There are no actions to perform.  

Reno Paul 
YaBB Newbie
*
Offline
Posts: 3
Reno, NV


YaBB 2.5
Re: Guardian & iptables
With thanks to the other responses to my previous posts.

From what I understand about wildcards in .htaccess, in order to block with a wildcard, just stop at "." with no wildcard character.  For instance, to block 29.159.***.***, simply

order allow,deny
deny from 29.159.
allow from all

A google search for "htaccess ip block" may bring you more methods, or even prove or disprove my example.

Good luck!
 
 
IP Logged  
 Reply #6 - Nov 18th, 2011 at 10:45pm
There are no actions to perform.  

Guy Whedatley 
YaBB Newbie
*
Offline
Posts: 5


None
Re: Guardian & iptables
Reno Paul wrote on Nov 18th, 2011 at 10:39pm:
With thanks to the other responses to my previous posts.

From what I understand about wildcards in .htaccess, in order to block with a wildcard, just stop at "." with no wildcard character.  For instance, to block 29.159.***.***, simply

order allow,deny
deny from 29.159.
allow from all

A google search for "htaccess ip block" may bring you more methods, or even prove or disprove my example.

Good luck!



Thanks. I'm pretty sure you've set me on the right path. I'll read up on htaccess and give it a shot.
 
 
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.