Language Selection

English French German Italian Portuguese Spanish

Quick Guide to Securing a Lamp Server

Filed under
Howtos

In the last few years on the Internet the price of dedicated servers have went down and more people are beginning to use them for their sites, game servers, or small hosting companies. With this comes as I was talking about in my last article inexperienced admins. Lots of people I spoke too are too intimated by the linux shell and try to administer their server completely from the control panel.
This short guide will show you a few copy and paste walkthroughs you can use to help secure your server, these should work with any control panel, the mod security update script however is only for apache2. Using these tools and using basic security procedures will help you keep your server secure and free of hackers, spammers, and other annoyances.

Using linux as a personal desktop helps a lot as well as it gets you used to using the command line. The other extremely valuable tool is google. I would probably be nowhere without google. You can look stuff up as you go and find about any answer to any question you may have, Plus there is lots of walkthroughs just like this one I am just putting all the basic ones together.

OK this is not a complete guide but those who are less experienced should be able to follow these walkthroughs and make their server more secure then it was before.
First thing, install apf, bfd, and dos deflate. Complete walkthrough HERE
Note: Dos deflate will not work with debian unless you disable ipv6.

Next install modsecurity using the simple guide from eth0.us, guide can be found HERE

After you install mod security make a directory in /etc called modsecurity. Use my update script found HERE (apache2 only)
This will get all the latest rules from gotroot.com when you have them at the bottom of the mod security configuration in httpd.conf put
Include /etc/modsecurity/apache2/rulename.conf
I suggest using them all besides rules.conf as it gives lots of false positives.

Now if you have shell users or are running redhat, fedora, or debian you most likely need to update your kernel. Now this isn't as hard as you would think, with this copy and paste guide I made that is all you have to do is copy and paste, same as these other tutorials.
The guide can be found HERE. I will be making one for debian soon but you just use any basic debian kernel how to and patch the kernel the same way as you do in this one.

Once you have modsecurity installed keep an eye on the audit log to make sure it is not giving any false positives or blocking legitimate web apps. With the ruleset and rules you have included it should not unless someone is using some oddball web app.
None of these will make your server totally secure, it takes basic security practices such as using strong passwords, not using the same password for everything, and keeping up with all the latest exploitrs and hacking methods.

If you ever get hacked don't go ranting about how you are gonna prosecute so and so, go find out how they done it, how they got in, and what you can do to prevent it again. You will most likely never track down the hackers and the FBI most likely will not care so secure your system and make sure it does not happen again. As I have explained before defacers can actually be helpful to admins. That's about it, good luck and stay on your toes.

More in Tux Machines

Linux Foundation's certification sets new benchmark for admins

At LinuxCon last week, the Linux Foundation announced a new certification scheme for Linux professionals to complement their existing training activities. The Linux Foundation Certification Program offers a peer-verified certification for both early-career and engineer-level systems administrators for a fee of $300. The process involves a real-time skill test administered via a remote-access virtual machine running one of several Linux distributions. To ensure the rules are followed, a human proctor watches the test via screen-sharing and video camera using your own computer at a location of your choice. The certification tests real-world skills for both sys admins and more senior engineers at the command line and in configuration files. Read more

Linux Mint Debian to Be Called "Betsy"

"The upcoming release of LMDE will be version 2, codename 'betsy' and it will use a Debian 'jessie' package base. The team is currently adapting to the new LMDE, setting up its repositories and porting various packages onto it. The target for a stable release is estimated for this November, along with an official upgrade path from UP8 to Betsy," said the leader of the Linux Mint project, Clement Lefebvre. Read more

Adapting to the Mobile World

Now more than ever companies are gaining a mobile presence due to the popularity of smartphones and tablets. It is important to any company’s success to become part of the mobile world if they want to build business. Consumers used to look up companies in the phonebook, but now the first action consumers take when they need to find a company is to look them up online. If consumers cannot find a company online, they are likely to find a different company instead of continuing the search through other means. Because the Internet is so easily accessed from mobile devices now, consumers use their devices to find their favorite companies so a strong mobile presence is a must if companies do not want to lose business. Hasbro goes mobile According to Mobile Marketer, Hasbro has decided to create a mobile presence in order to keep up with video games. So far Hasbro’s Monopoly application has been a great success because it promotes family and friend engagement and users can personalize the app by uploading pictures of themselves to use as game pieces. Consumers like personalization, and so if companies want to see success from their mobile marketing strategies they should consider personalizing them to consumers in some way. Companies hesitate to go mobile because they are set in their ways, and they might already be seeing success, however as technology advances all companies should consider building a mobile presence if they want to continue to be successful. Successful mobile marketing techniques Thanks to mobile devices there are a number of ways companies can reach out to consumers who use them. SMS advertisements are a great way to personalize advertising for consumers making them feel important and ultimately driving in business. Marketing applications are another way companies can engage with consumers on a more personal basis. Consumers like to be in control, and applications are a great way they can control the type of marketing they receive. If apps are intriguing enough, consumers are likely to promote them to friends and family, which will ultimately promote business. Convenience of being mobile Consumers like the convenience of being able to locate and engage with their favorite companies from their mobile devices, so it is important that companies maintain that presence. Consumers are looking for ways to make their lives easier, and being able to purchase products with the click of a button or pay bills on the fly will only increase business for companies because consumers are always looking for convenience. Being mobile can benefit companies in several ways, but one way that is especially appealing to companies is the ease of keeping track of business thanks to their mobile presence. Mobile devices and websites help companies to keep track of important data such as which marketing strategies are working the best and where most of the sales are coming from. Being mobile can enhance business in several ways and should be a priority for all companies. Mobile Technology News brought to you by businesstexter.com Source: mobilemarketer.com/cms/news/gaming/18437.html

Why we use open source - Australia’s Immigration agency explains

Why choose open source? “In some ways, [the open source software used by the agency] is effectively more capable” than commercial products, he said. “In terms of cost-effectiveness, [it] wins hands down: no license/maintenance fees, extensible architecture [and] global open source R&D.” The team uses an open source software package called ‘R’. Read more