Announcement

Collapse
No announcement yet.

fail2ban & WordPress Plugin: some help with PHP please?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Feathers McGraw
    replied
    Well you wouldn't want to be in the scrub, it might catch fire!

    Leave a comment:


  • SteveRiley
    replied
    Wouldn't mind being there right now... It's freeeeeeeeeeezing here in Seattle.

    Leave a comment:


  • Feathers McGraw
    replied
    Think Australia...

    Leave a comment:


  • SteveRiley
    replied
    Originally posted by Feathers McGraw View Post
    Did you choose the name "ScrubPi" because it's likely to catch fire, or because it's "scrubbing" IP addresses?
    Because it's scrubbing bad guy traffic out of the flow, so that ServerPi receives only good guy traffic.

    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?

    Leave a comment:


  • Feathers McGraw
    replied
    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.

    Leave a comment:


  • SteveRiley
    replied
    Originally posted by Feathers McGraw View Post
    Out of interest though, how would you run fail2ban on "scrubpi" based on the logs of the other machine?
    Thinking out loud (er, with fingers...)

    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.

    Leave a comment:


  • Feathers McGraw
    replied
    Originally posted by SteveRiley View Post
    Maybe you should buy another Pi.
    Don't encourage me, I have 4 already!

    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?

    Leave a comment:


  • SteveRiley
    replied
    Originally posted by Feathers McGraw View Post
    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.
    Correct.

    Originally posted by Feathers McGraw View Post
    Unfortunately, that won't work for me because I don't know who will want to visit the site ahead of time
    Also correct.

    Originally posted by Feathers McGraw View Post
    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.
    Yep, the plugin is doing much more work than iptables.

    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.

    Leave a comment:


  • Feathers McGraw
    replied
    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.

    Leave a comment:


  • SteveRiley
    replied
    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.

    Leave a comment:


  • Feathers McGraw
    replied
    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?

    Leave a comment:


  • Feathers McGraw
    replied
    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

    Leave a comment:


  • SteveRiley
    replied
    Originally posted by Feathers McGraw View Post
    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.
    How was your play time in the dirt?

    Originally posted by Feathers McGraw View Post
    Isn't civil engineering glamorous?
    A little bit of Seattle history for you...
    "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!"

    Originally posted by Feathers McGraw View Post
    Sounds good to me! Fail2ban successfully unblocked you after 1 day as planned, so that side of things is all good.
    Yay!

    Leave a comment:


  • Feathers McGraw
    replied
    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.

    Leave a comment:


  • SteveRiley
    replied
    Isn't the irony just delicious?

    (BTW, your jealousy is showing. bwahahaha)

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X