Securing WordPress using fail2ban

With the recent dictionary attacks on WordPress, I installed a simple configuration for fail2ban that requires no access to the backend of each site you host. This should protect all the sites on a server from being attacked by the massive botnet that’s doing the rounds.

Add this to /etc/fail2ban/jail.conf

[apache-wp-login]
enabled = true
port    = http,https
action   = iptables[name=WP, port=http, protocol=tcp]
filter  = apache-wp-login
logpath = /var/www/vhosts/*/statistics/logs/access_log
maxretry = 3

The logpath should include every access log on your server, or at least the WordPress ones. Mine is ideal for Plesk installs on Linux.

Add this to /etc/fail2ban/filter.d/apache-wp-login.conf

# Fail2Ban configuration file
[Definition]
failregex = <HOST>.*] "POST /wp-login.php
ignoreregex =

Restart fail2ban and you’re set.

Jared Earle is a writer, photographer and systems administrator. You can find him on Twitter most of the time.

Posted in geek
  • http://chrisgilligan.com/fail2ban-and-ossec-regex-for-redhat-centos-amazon-linux-and-fedora/ PlayGod

    Also use the generic apache-nohome, apache-noscript, install wp fail2ban plugin and configure it for your server. These both are helping during the current onslaught, which also includes probing for wp-admin directories, probing for /wp-admin/login.php, plus comment spam.

    • http://chrisgilligan.com/fail2ban-and-ossec-regex-for-redhat-centos-amazon-linux-and-fedora/ PlayGod

      Check my permalink for some additional advice that is working for us.

  • Daniel Black

    Please recommend using jail.local rather than jail.conf for changes – they will probably survive package updates easier.

    Please try to make a anchored filter as per the filter guidelines here otherwise there is some possibilty of a DoS attack. https://github.com/fail2ban/fail2ban/blob/master/DEVELOP

    Please contribute this as a filter back to the fail2ban developers so everyone can benefit.

  • rebecca0196

    Medusa used to be a beautiful servant of Pallas Athena, the Greek goddess hyperdunk 2012 of Wisdom.implement most of the grunting, it could be a fun way in order to yourself, he said.L/C is used for the larger quantity order shipped by sea.This website will be your online sales channels, your Online office or your online shopping store/shop.As these repurchases depleted the existing $5 billion repurchase plan, the company announced a new four-year $8 billion repurchase plan.If you look for a universal color, black is nice.Nike said Monday that it is leaving the elite swimwear market.These are things that all children need to learn.

    If you simply cannot find the money for a new motor vehicle but, continue to want to wow all people with your most current automobile, the Qashqai is a extraordinary pick.I was so excited to open it up.New innovations – Nike reported that the Nike+ community is now 10 million members strong.when they are home, we are able to make the dinner for them, when they are not in the mood, we can comfort them and try to make them pleased, when we are far away from home, we should often call back to parents to convey our best wishes to them.For many youngers, they would like to choose running shoes, because it should be flexible and warm.

    7 current ratio.The Jordan shoes are the choice of basket ball gamers all close to the earth and owing to this motive, their organization, Nike is at this time 1 of the biggest leaders in the range of very best-quality basket ball shoes.One single error could lead to death.In the FIBA World Championships in 2007 the USA also won a bronze medal.Production sources can be divided into;Why You Don’t Need To Go To The Gym NowNet income decreased by 12 percent in the first quarter as operating overhead expenses increased by the same percentage.What do you absolutely, truly enjoy doing in your professional life?

    Moment, you have got to know about the variations in outstanding.Because of strengthening the algorithm which produces the ciphering key, even if the hacker jordan 4 retro collects the information of dividing into groups and analyzes him, also almost unable to calculate the general key, solve the shortcoming that WEP is criticized extremely.Throughout the organization 60 years background, 100s of athletic champions have worn Diadora footwear.case fan in and im looking at 47C idle on the CPU and 42C idle on the GPU so thats a definate improvement.Gone are days whenever women with broader legs either were forced to use gents shoes or boots or maybe pay out your ‘clump quite a few volume regarding particularly produced shoes.

  • rebecca0196

    Now if you like to link suitable items, peg colour and style must remain constant along the entire chain.Why do you think Google sent that message in the first place.I also understand that all four are risk factors that I can control, but all else being equal I felt I should ask my question anyhow.It was also responsible for most of the adverse neurological sequels of the disease.Wait until it stabilized and via the Control Panel (Ctrl, Alt, Del) see how much memory is being used in the upper right hand graph and how much memory your machine has left.easter icons 2007The 1.Look for bangles that have a tribal or ethnic inspiration nike free 3.0 v4 for sale to them.Sandridge Energy (SD) is up 65 cents to $8.Germans consider the purity of their beer very seriously, having enacted a law that requires all beers made in Germany to be produced only with a specific list of ingredients, specifically water, yeast, hops, and malted barley or wheat.

    You’ll find everything from denim to leather, from casual wear to Sunday best.Some material is actually man-made lover overlays in strategize your move sustenance.An adult should help young children with the carving of a Jack O Lantern.And, they come with a Lifetime Warranty.They’re supposed to make peripheral distortion much more minimal and reduce chromatic aberration.This is because a cool pacific current flows past the Californian cost at this time.However, they are SUPER crisp and clear so I feel like they were probably worth getting, even if the extra $75 for the “free form lens” technology may have been silly.To skip the legwork and trace the number right away, I recommend two other options:So, as you go along with your schedule this week, there should already be a ready schedule waiting for next week.

    Teach team work.Don’t buy a glove online, unless you have already tried that exact glove on for yourself to see how it feels.Vice President Business Development, Pacific Northwest Global Non-ProfitsI now earn an annual income of over $70,000 a year.I use mine for playing COD and it really enhances the game.Se encuentra catastrofe debe cierto similar respecto de los mismos zapatos amables gentio en comparaci n a ejecutan y algunas veces suGift Vouchers are a safe bet in such situations.It a luxury that the modern world offers us and we shouldn say no to it.1Of course, if you’re the cold sufferer making this, you won’t be able to smell the alcohol, will you?USMC bootsHow to do this is the subject of a future article.

    No one likes needy people.Can you see where this one’s going?That is just not enough; you will need to do some experimenting, with placements, formats and choice of keywords.A beach basket that has items for teens, tweens, toddlers etc may look great but may not appeal to a family with only two small toddlers.Replica NIke Air Max 360(FengYi dust).The shoes were fail to allowed to feel worn during a game because that they did not see the league ensemble code at that time.There are plenty of people out there who have graphic designer friends willing to design their website for next to nothing.Marking for violence ” Military hardware and even clothing are beginning to make use of RFID tags to help track these items through supply chains.

    However, when an issue arises such as a suggested improvement, a new way of working, a new tool, or a new output requirement then a review of the first 4S is appropriate.Habits won’t cease, though, and just as we can raise the threshold above which we notice difference, we can lower the threshold-more likely than government finding a way to restore corporate health or put people to work is people establishing new economic and social networks on the margins of their intersecting habits.Webcasts of the competitions which was broadcasted by CBS Sports to sports fans?” Research on this subject for 25 minutes or show told me that the consensus from the gaming community is, “You really won’t use more than 4 GB.If your firm can achieve both a great reputation and high visibility, you will be on the path for a sustainable, strong brand.

    A elderly, because of that decline in muscular strength and complete to extreme weakness, falls and cracks are more commonly used.Like Leslie157 I like to use both CC and WW.The strap allowed the shoe to fit sung and keep my feet in place.How to Get to Know Girls in Your SchoolIn the most recent quarter, the company’s revenues increased and surpassed analyst estimates.So, in same manner these rules are applied by the gambler who place bets with bookmaker.Don’t bother going on the tracks though unless you have a four-wheel drive, or you will kill your car.] “By fine-tuning the springs and the damper arrangement within the shoe, we can optimize its shock-absorbing properties,” said Richards.After the First World War, it Nike Blazer Low For Sale was French tennis star Suzanne Lenglen who set the tennis fashion trend.