Forum Replies Created

Viewing 15 replies - 61 through 75 (of 135 total)
  • Thread Starter onerock

    (@onerock)

    Thanks for your assistance with this. Yes, I can use the curl command
    curl secure.mydomain.com. It brings up the text of my home page.

    Thread Starter onerock

    (@onerock)

    You are right, it didn’t help out my situation. My debug logs always shows as Subdomain: no.

    Thread Starter onerock

    (@onerock)

    I am on a production CentOS 6 server with Apache, but I am wondering if restarting services will fix it like it did for you.

    Thread Starter onerock

    (@onerock)

    Thanks for the quick response and for the great plugin. I am currently on version 1.3.1. I found the errors while working on other things. I am looking deeper at the logs and I see that they stopped a few days ago, so it looks like that solved it.

    Thanks again!

    Thread Starter onerock

    (@onerock)

    Thanks so much for your help.

    I have verified that the following through debug, see below. After re-saving the info in the plugin, I am still not able to browse my site while logged in.

    [BEGIN WordPress HTTPS Debug Log]
    /wp-admin/ (line 629)
    Version: 3.2.3
    /wp-admin/ (line 630)
    HTTP URL: http://MyDomain.com/
    /wp-admin/ (line 631)
    HTTPS URL: https://secure.MyDomain.com/
    /wp-admin/ (line 632)
    SSL: Yes
    /wp-admin/ (line 633)
    Diff Host: Yes
    /wp-admin/ (line 634)
    Subdomain: No
    /wp-admin/ (line 635)
    Proxy: No

    Thread Starter onerock

    (@onerock)

    If I click the visit site button on the admin bar, I am redirected to http://MyDomain.com, not logged in. If I type in the address bar of an internet browser, https://Secure.MyDomain.com, I redirected to http://MyDomain.com, not logged in.

    Thread Starter onerock

    (@onerock)

    The main reason is that I cannot browse the website while logged in. This is causing hassles with things that I do as logged in and not logged in.

    Thread Starter onerock

    (@onerock)

    After running this for a week, I am running into a few usability related issues. I am now attempting to only secure the WordPress Logins. I have found a few options to do this, but none seem to work for me. I believe that this is because I am using a sub domain for the HTTPS.

    From http://www.thatsgeeky.com/2012/01/wordpress-ssl-login-page-without-ssl-admin/

    I have attempted to edit wp-login.php:

    Change line 565 for WP 3.4.2 of wp-login.php:
    From: $secure_cookie = ”;
    To: $secure_cookie = false;

    Explictly request admin_url() to return the non SSL url by changing line 588 for WP 3.4.1 of wp-login.php:
    From: $redirect_to = admin_url();
    To: $redirect_to = admin_url(”,’http’);

    Can you please offer some assistance with making only the logins secure.

    Thanks in advance Scott

    Thread Starter onerock

    (@onerock)

    Disregard, I have resolved my issue. I missed the fact that I needed to put secure.mydomain.com in the SSL Host box and check the Force SSL Administration box. All of my admin pages are secure, but it hasn’t slowed anything down, so I am good with this.

    Thanks for a great plugin.

    Thread Starter onerock

    (@onerock)

    So far, the above solution is holding strong. I have made no changes to several pages and they report in redbot.org “The resource last changed 2 min 17 sec ago.”

    Thread Starter onerock

    (@onerock)

    Thanks for responding, I appreciate it.

    I am alerted about SSH bans on a regular basis. I am not sure if they are truly blocked.

    I actually got to filter somehow….

    Message from syslogd@vps-1115096-13004 at Nov 6 18:05:34 …
    ¿<28>fail2ban.actions: WARNING [wordpress] Ban 8.8.8.8

    But is doesn’t block anything. I have attempted several actions. Here is the current action.

    From jail.local
    action = sendmail-whois[name=wordpress, dest=root, sender=fail2ban@example.com]
    iptables-multiport[name=Web, port=”80,443″, protocol=tcp]

    The iptables-multiport.conf in the filter.d directory is default.

    Thread Starter onerock

    (@onerock)

    Thanks so much for sticking with this! I changed the filter file as follows, but no luck. 🙁

    failregex = ^%(__prefix_line)sAuthentication failure for .* from <HOST>$

    Could the issue be that __prefix_line isn’t translating correctly?

    Common.conf
    _daemon = \S*

    __pid_re = (?:\[\d+\])

    __daemon_re = [\[\(]?%(_daemon)s(?:\(\S+\))?[\]\)]?:?

    __daemon_combs_re = (?:%(__pid_re)s?:\s+%(__daemon_re)s|%(__daemon_re)s%(__pid_re)s?:)

    __prefix_line = \s*(?:\S+ )?(?:@vserver_\S+ )?%(__daemon_combs_re)s?\s*

    Thread Starter onerock

    (@onerock)

    Thank you for your assistance!

    It appears that the filter isn’t catching the authentication failures.

    Oct 28 19:44:09 wordpress(MyDomain.com)[26603]: Authentication failure for someone from 8.8.8.8
    Oct 28 19:44:33 wordpress(MyDomain.com)[23820]: Authentication failure for someone from 8.8.8.8

    ————————————————–
    # fail2ban-regex /var/log/messages filter.d/wordpress.conf

    Running tests
    =============

    Use regex file : filter.d/wordpress.conf
    Use log file : /var/log/messages

    Results
    =======

    Failregex
    |- Regular expressions:
    | [1] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?wordpress(?:\(\S+\))?[\]\)]?:?|[\[\(]?wordpress(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*authentication failure for .* from <HOST>$
    |

    – Number of matches:
    [1] 0 match(es)

    Ignoreregex
    |- Regular expressions:
    |

    – Number of matches:

    Summary
    =======

    Sorry, no match

    Thread Starter onerock

    (@onerock)

    Through reading other threads and sites on the subject, it seems that garbage collection only runs when a cache miss has happened. I prime my page cache so this never happens on my site which explains the stale cache. I am currently in the middle of trying the following workaround. I use a 7 day expiration so it will be a few days for results.

    I created a page that has no content other than header, footer, and sidebar. I created the simple script below and run it as a cron job once an hour. Logs and headers, so far, show that the cache is missing and being re-created. We’ll see if this works, fingers crossed.

    #!/bin/bash
    #
    # Script to attempt to kick start page cache garbage collection
    #

    # Delete cached page from pgcache folder
    rm -rf /www/wp-content/w3tc/pgcache/test-page

    # Call Test Page in hopes that this will trip garbage collection to fire
    rm /root/index.html
    wget -q MyDomain.com/test-page/

    Thread Starter onerock

    (@onerock)

    Thanks for the assistance with this. I really appreciate it! The jail.local that is working for you causes my fail2ban service to fail on start up. This installation was pre-installed from my VPS provider, so I dug around and mimicked what I found pre-configured for jails for other services. It seems that I have everything running now successfully according to the logs. However, it appears that the filter may not be matching, so nothing is being banned. I have worked with this for some time this evening and am again out of ideas. Can you offer any further advice?

    Here is my messages log excert…

    Oct 27 23:07:29 fail2ban.jail : INFO Creating new jail ‘wordpress’
    Oct 27 23:07:29 fail2ban.jail : INFO Jail ‘wordpress’ uses Inotify
    Oct 27 23:07:29 ¿<30>fail2ban.filter : INFO Added logfile = /var/log/messages
    Oct 27 23:07:29 ¿<30>fail2ban.filter : INFO Set maxRetry = 1
    Oct 27 23:07:29 ¿<30>fail2ban.filter : INFO Set findtime = 600
    Oct 27 23:07:29 fail2ban.actions: INFO Set banTime = 120
    Oct 27 23:07:29 fail2ban.jail : INFO Jail ‘wordpress’ started
    Oct 27 23:08:25 wordpress(MyDomain.com)[16114]: Authentication failure for someone from 108.162.216.245
    Oct 27 23:08:34 wordpress(MyDomain.com)[18147]: Authentication failure for someone from 108.162.216.245
    Oct 27 23:08:43 wordpress(MyDomain.com)[15927]: Authentication failure for someone from 108.162.216.245

    Here is my jail.local

    # This jail blocks WordPress login failures.
    [wordpress]
    enabled = true
    filter = wordpress
    action = sendmail-whois[name=wordpress, dest=root, sender=fail2ban@example.com]
    iptables-multiport[name=wordpress, port=”80,443″, protocol=tcp]
    logpath = /var/log/messages
    maxretry = 1
    bantime = 120

    Here is my wordpress.conf (removed comments only to conserve space in this post)

    [INCLUDES]
    before = common.conf

    [Definition]
    _daemon = wordpress

    failregex = ^%(__prefix_line)sauthentication failure for .* from <HOST>$

    ignoreregex =

    iptables –list | grep fail2ban
    When I run the above command it appears to have the appropriate hooks in the iptables as other services.

    target prot opt source destination
    fail2ban-wordpress tcp — anywhere anywhere multiport dports http,https

    Chain fail2ban-wordpress (1 references)
    target prot opt source destination
    RETURN all — anywhere anywhere

Viewing 15 replies - 61 through 75 (of 135 total)