Page Index Toggle Pages: 1
Topic Tools
Normal Topic Guardian & iptables (Read 3,011 times)
Reno Paul
YaBB Newcomer
*
Offline



Posts: 3
Location: Reno, NV

None
Guardian & iptables
Aug 3rd, 2011 at 8:57pm
Post Tools
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!
  
Back to top
 
IP Logged
 
xnoddyx
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline



Posts: 1,591
Location: UK:Scotland/livingston

None
Re: Guardian & iptables
Reply #1 - Aug 10th, 2011 at 3:47pm
Post Tools
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)
Back to top
IP Logged
 
Reno Paul
YaBB Newcomer
*
Offline



Posts: 3
Location: Reno, NV

None
Re: Guardian & iptables
Reply #2 - Aug 10th, 2011 at 5:30pm
Post Tools
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.
  
Back to top
 
IP Logged
 
xnoddyx
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline



Posts: 1,591
Location: UK:Scotland/livingston

None
Re: Guardian & iptables
Reply #3 - Aug 10th, 2011 at 7:13pm
Post Tools
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)
Back to top
IP Logged
 
Guy Whedatley
YaBB Newcomer
*
Offline



Posts: 5
Re: Guardian & iptables
Reply #4 - Nov 18th, 2011 at 9:09pm
Post Tools
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.
  
Back to top
 
IP Logged
 
Reno Paul
YaBB Newcomer
*
Offline



Posts: 3
Location: Reno, NV

None
Re: Guardian & iptables
Reply #5 - Nov 18th, 2011 at 10:39pm
Post Tools
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!
  
Back to top
 
IP Logged
 
Guy Whedatley
YaBB Newcomer
*
Offline



Posts: 5
Re: Guardian & iptables
Reply #6 - Nov 18th, 2011 at 10:45pm
Post Tools
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.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top