Announcement
Collapse
No announcement yet.
fail2ban & WordPress Plugin: some help with PHP please?
Collapse
This topic is closed.
X
X
-
Wouldn't mind being there right now... It's freeeeeeeeeeezing here in Seattle.
- Top
- Bottom
Leave a comment:
-
Because it's scrubbing bad guy traffic out of the flow, so that ServerPi receives only good guy traffic.Originally posted by Feathers McGraw View PostDid you choose the name "ScrubPi" because it's likely to catch fire, or because it's "scrubbing" IP addresses?
What does scrubbing have to do with fires? Is this yet another instance of where you guys over there just can't speak English correctly?
- Top
- Bottom
Leave a comment:
-
True! I'll have a think about it. Just realised I wouldn't have to use ProxyPass, I could probably just do a port forward, since "ScrubPi" isn't trying to filter HTTP traffic and redirect it based on the domain/subdomain.
Did you choose the name "ScrubPi" because it's likely to catch fire, or because it's "scrubbing" IP addresses?
Thinking about it, my OpenWrt router could do the same job as ScrubPi.
- Top
- Bottom
Leave a comment:
-
Thinking out loud (er, with fingers...)Originally posted by Feathers McGraw View PostOut of interest though, how would you run fail2ban on "scrubpi" based on the logs of the other machine?
Whenever Fail2Ban detects something in the logs on ServerPi, create the corresponding iptables rule on ScrubPi. This would require some bash scripting, I suspect. Sounds like a good reason to learn it
You'd have another handy tutorial to post.
- Top
- Bottom
Leave a comment:
-
Don't encourage me, I have 4 already!Originally posted by SteveRiley View PostMaybe you should buy another Pi.
Was thinking maybe I could upgrade to that ChromeBox I posted about in another thread: my previous experiences with ProxyPass indicated that connecting the two with TLS uses a lot of CPU on both machines (no wonder Google didn't encrypt communications between their data centres before the Snowden leaks!).
Out of interest though, how would you run fail2ban on "scrubpi" based on the logs of the other machine?
- Top
- Bottom
Leave a comment:
-
Correct.Originally posted by Feathers McGraw View PostSo if I understood that correctly, whitelisting is probably faster if you can reliably predict who will use the website, as legitimate traffic will meet the first rule and won't be passed through the rest of them.
Also correct.Originally posted by Feathers McGraw View PostUnfortunately, that won't work for me because I don't know who will want to visit the site ahead of time
Yep, the plugin is doing much more work than iptables.Originally posted by Feathers McGraw View PostI suppose passing traffic through iptables is still faster than what the Akismet plugin is doing to filter spam though, right? From what I can tell it connects to the Akismet server every time and runs the comment past them, waits for the sever to tell it whether or not it's spam and then moves it to the spam folder if it is.
Maybe you should buy another Pi. Call it ScrubPi, place it in front of the server. Run all your blocking/filtering processes on ScrubPi. Then send the resulting clean traffic to ServerPi.
- Top
- Bottom
Leave a comment:
-
So if I understood that correctly, whitelisting is probably faster if you can reliably predict who will use the website, as legitimate traffic will meet the first rule and won't be passed through the rest of them.
Unfortunately, that won't work for me because I don't know who will want to visit the site ahead of time
I suppose passing traffic through iptables is still faster than what the Akismet plugin is doing to filter spam though, right? From what I can tell it connects to the Akismet server every time and runs the comment past them, waits for the sever to tell it whether or not it's spam and then moves it to the spam folder if it is.
- Top
- Bottom
Leave a comment:
-
A little slice of CPU time is indeed required for each rule evaluation. Whether iptables places a load on your server depends on your specific configuration. How many rules? More rules --> more CPU usage. Given that Fail2Ban removes entries after a while, do you find your rules to still be quite large at any one time?
Useful background reading:
http://blog.softlayer.com/2012/iptab...le-processing/
http://blog.softlayer.com/2013/iptab...with-iptables/
Probably not too useful since you're relying on Fail2Ban to write your rules. But good to know nevertheless.
- Top
- Bottom
Leave a comment:
-
Another iptables/fail2ban question.
I've been blocking comment spam with an Akismet plugin for Wordpress so far, but I've had problems today with connection to their servers, so some has been getting through.
So, I'm now looking at a local solution. This plugin will write comments that are marked as spam to a log file that fail2ban can go to work on.
My question is, are there any disadvantages to blocking lots of stuff with fail2ban/iptables? I guess it will take some load off the server, and will probably be a good thing in general, but I just wanted to check. For example, if you have loads of rules in iptables, does it slow things down or is the time/processing power taken to check an IP address isn't on a list pretty much negligible?
- Top
- Bottom
Leave a comment:
-
Play time was fun, thanks.
That reminds me of that bit in Life of Brian where they're creeping through the sewers under the palace... hehe.
Feathers
- Top
- Bottom
Leave a comment:
-
How was your play time in the dirt?Originally posted by Feathers McGraw View PostI'll be spending my week digging trenches in the ground, filling them up with water and seeing how long it takes for them to drain.
A little bit of Seattle history for you...Originally posted by Feathers McGraw View PostIsn't civil engineering glamorous?
"The town’s proximity to sea level caused a new problem, literally, to rise up. In 1851, the same year the Denny party arrived, a fancy new device was introduced at the White House. It was called a 'water closet,' and, boy, did these things take off in popularity. Even in the tiny frontier town of Seattle, indoor toilets became the rage. By 1882, the city health commissioner, in his annual report, highlighted the fact that our sewers were operating at full blast, but it wasn't a one-way river. Twice a day when the tides came in, the sewers flowed with it -- backwards. Toilets became fountains!"
Yay!Originally posted by Feathers McGraw View PostSounds good to me! Fail2ban successfully unblocked you after 1 day as planned, so that side of things is all good.
- Top
- Bottom
Leave a comment:
-
Haha it's all right for some! I'll be spending my week digging trenches in the ground, filling them up with water and seeing how long it takes for them to drain.
Isn't civil engineering glamorous?
Sounds good to me! Fail2ban successfully unblocked you after 1 day as planned, so that side of things is all good.
- Top
- Bottom
Leave a comment:
-
Isn't the irony just delicious?
(BTW, your jealousy is showing. bwahahaha)
- Top
- Bottom
Leave a comment:
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.
Leave a comment: