One place for hosting & domains

      Your Guide to Lead Magnet Creation (53 Easy Ideas)


      Take it from me: Acquiring qualified leads for your business is anything but easy. A common strategy for attracting new customers is to develop a strong content marketing strategy, but that is often not enough. Just because people enjoy reading your content doesn’t necessarily mean they’re ready to hand over their hard-earned cash.

      (If it did, the content team at DreamHost would be cruising in Lamborghinis by now. Spoiler alert: We’re not.)

      So, while creating great content is critical to the success of your website, you’ve got to take it a step further and make cultivating leads an ongoing process — one that continues even after a visitor has left your site.

      By creating effective lead magnets, you can offer something valuable enough to your audience that they’ll be happy to give you their email address in exchange. Then using the best email marketing practices, you can nurture those leads until they turn into paying customers.

      (Googles the price of a Lamborghini Aventador. Chokes.)

      OK, ready to get started?

      In this article, we’ll discuss what makes a good lead magnet, why your business should invest in developing a sales funnel, and how to create your very own irresistible lead magnet to power your marketing machine. Let’s go!

      Let Us Support Your Lead Magnets

      Whatever your goals, we’ll be right there with you, making sure your website is fast, secure, and always up. Plans start at $2.59/mo.

      Understanding Lead Magnets (And Why Your Business Needs Them)

      “Lead magnets” are incentives offered by marketers. They’re provided in return for an email address (or other contact information) from a potential customer.

      Email marketing has a return of $42 for every $1 spent. That’s a huge return on investment (ROI), and it makes a compelling case for including email marketing as a core part of your overall strategy. This is why lead magnets are so essential — they help you build up your email list more quickly.

      Lead magnets also give you a way to sell to your site’s visitors over the long term. On average, a visitor will spend less than a minute on your website. This is rarely enough time to convince them of their need for your services, but lead magnets provide you with additional time.

      The Qualities of an Effective Lead Magnet

      Of course, it’s not enough to simply create a lead magnet. To get the best return, you’ll need to design one for maximum effectiveness. A great lead magnet is:

      • Free. You have yet to convince your prospective customer of your value to them, so they’ll probably be unwilling to part with their money just yet.
      • Solution-focused. You need to demonstrate how you can solve a very specific problem for your audience.
      • High quality. You’re providing a free sample of what you have to offer, so it has to show your products or services off in the best possible light. Your value proposition needs to be clear.
      • Easy to consume. An effective lead magnet is concise and provides value quickly (a PDF checklist is a popular example). Don’t make it too complicated.
      • Instantly accessible. Your lead magnet should take no more than a click to download — you don’t want your audience to lose interest and move on.

      The next step is to create a lead magnet that incorporates all of these criteria. Let’s take a quick look at what that involves.

      How to Create a Lead Magnet

      Creating a lead magnet can be an involved process. You’ll first need to understand what your audience is interested in. One way to do this is by reviewing your existing content to see what pieces have performed best or had the highest engagement rates.

      You can do the same for your competitors’ content by using a tool such as BuzzSumo. All you need to do is enter a URL and sort the results by the total engagement metric. This will help you better understand what your target audience cares about.

      The BuzzSumo content research tool.

      Keep in mind that you’ll likely need to create separate lead magnets for each buyer persona or segment of your audience. Each one should be tailored to meet your audience’s specific interests and provide something they genuinely need. In other words, don’t forget to focus on quality.

      53 Awesome Lead Magnet Ideas

      At this point, let’s take a look at some ideas for creating lead magnets. Almost any type of content can do the trick — here are 53 examples.

      1. Checklists

      An email campaign checklist.

      Checklists are easily consumed and very actionable. They’re also easy to create. You can extract the main points from a few existing posts, and create a checklist from them. Then you can offer the result as a content upgrade.

      2. Cheat Sheets

      Cheat sheets typically condense important information into a few pages that can be referenced often. SmartBlogger’s “52 Headline Hacks” is a popular example of this technique in action.

      3. Templates

      Templates provide a starting point or outline with some base content for users to customize. A good example is Rosanna’s free marketing plan template for creative freelancers, which is gated behind a sign-up form.

      4. Swipe Files

      A swipe file is a collection of tried-and-tested ideas, as well as stellar examples of content that you can store for future reference.

      A search for swipe files on Pinterest.

      Here’s a handy article on how to create swipe files using tools such as Pinterest and Pocket.

      5. Examples

      Examples are an effective type of lead magnets. Job seekers search for resume and cover letter templates, while business owners look for sample proposals. Examples can also be offered as content upgrades for relevant posts.

      6. Scripts

      Scripts are valuable if you have an audience that needs help creating speeches, podcasts, and even films. For example, if public speaking is a skill you excel at, you can create a business presentation and offer it as a lead magnet.

      7. Toolkits

      Matt Herron’s toolkit for creative writers is a lead magnet example.

      People generally want to know what tools experts and influencers use. Your toolkits can function as lead magnets and generate income through affiliate marketing if you’re recommending third parties.

      8. Resource lists

      Who doesn’t love resource lists? A digital marketer could create a list of books, tools, websites, and more that help them stay productive. These can be offered as content upgrades as well.

      9. Calendars

      An example of a fitness calendar.

      When creating a calendar-based lead magnet, it needs to be relevant to your audience. For example, if you’re in the agricultural industry, you could offer calendars for rearing and planting seasons. If you’re in the fitness industry, you might design a workout calendar.

      10. Plans/Planners

      Planners are typically created for very specific use cases. That includes meal planners for diabetics or vegetarians, workout planners for pregnant women, and so on.

      11. Worksheets/Workbooks

      Workbooks are often effective for business planning or creating custom personas. They typically help your audience with something practical and specific.

      12. Printables

      Printable language workbooks on Pinterest.

      A “printable” is a general term for any resource that can be printed. This might include checklists, cheat sheets, workbooks, and more.

      13. Prompts and Inspiration Files

      Prompts and inspiration files help users generate ideas. For example, if your ideal customer is a web designer, you can offer design inspiration visuals. If your ideal client is a writer, you can provide creative prompts.

      14. Calculators

      Calculators are also useful as lead magnets. For instance, WebStrategies has a Digital Marketing Budget Calculator, which can only be accessed through an opt-in form.

      15. Generators

      From “lorem ipsum” to topic idea generators, these tools are often essential for productivity. You can create a generator that’s relevant to your business and offer it as a lead magnet.

      Influencer MarketingHub’s Instagram hashtag generator.

      For example, Influencer MarketingHub has free generators for business names, Instagram hashtags, and more.

      16. Web Apps

      Web apps are useful if you have the technical chops required or can afford to hire a developer to build one. You could even offer your calculator or generator as a web app that users must log in to.

      17. Spreadsheets

      Even in this age of mobile apps, spreadsheets are still a killer lead magnet, useful for both personal and business use. If you’ve created a useful spreadsheet for yourself, such as a time or expenses tracker, you can offer it as a lead magnet.

      18. Recipes

      Although there are tons of free recipes online, this type of content can still work well as a lead magnet if you offer curated content from across the web. For instance, you could let your audience choose what types of recipes they’re interested in via checkboxes.

      19. Gated Content

      Publishing platforms, such as Medium, gate the majority of their content behind a monthly subscription. To adopt this strategy, you might ask for an email address in exchange for access to the latter half of a blog post.

      20. Tutorials and Guides

      Tutorials are useful for teaching specific tasks and tools. They can be in audio, text, or video series format. Similarly, you can offer definitive guides as educational lead magnets. They’re often used because they’re highly effective, especially for educating potential customers about a particular concept, product, or service.

      21. E-books

      Alt-text: Derek Halpern’s “Get 5000 Subscribers” e-book.

      E-books don’t fully satisfy our criteria for effective lead magnets. They are lengthier than a PDF checklist or an infographic. Regardless, audiences who prefer more detail than shorter lead magnets can provide will appreciate them.

      22. Reports

      Reports require you to do research and aggregate data. However, you can also create them from existing research. If you market primarily to B2B businesses in an industry heavily reliant on stats and data, this can be one of your best-converting lead magnets.

      23. Infographics

      Infographics can be used to present dense topics in a visually-appealing format. You’ll want to include facts and relevant statistics. To get started, you can condense some existing blog posts into infographics. These can also be shared on social media to promote the original articles.

      24. Educational Videos

      Videos are an effective marketing tool, as you can give your audience a close-up look at your products. They’re doubly effective if they can be made both informative and entertaining, and these days it’s not hard to quickly put together professional-looking videos.

      25. Educational Audio

      You can also offer educational audio content, for those who don’t have time to watch videos or read articles. You won’t necessarily need to create these from scratch since you can develop audio versions of existing videos or blog posts.

      26. Webinars

      Hubspot’s webinar page.

      Offers with time limits generally work well, as they play to your audience’s Fear of Missing Out (FOMO). Webinars are a great example of this in action, as they can only be watched live at a specific time.

      27. Event Tickets

      You can offer free tickets for live events in exchange for your potential lead’s email address. To promote your opt-in forms, you can even use social media and business ads.

      28. Email Courses

      Buffer’s email course opt-in form.

      Email courses do not need to be downloaded and can be consumed instantly. Typically, you’ll send automated emails based around a specific topic. Teachable is just one of many tools that can help you create email courses.

      29. Free Book + Shipping Offers

      You can give out physical books as lead magnets and have your receivers cover the shipping costs, too. This is a good way to determine who your potential customers are, since anyone willing to pay to ship a product they consider valuable should be more willing to purchase your paid content.

      30. Sample Chapters

      You may not want to give out your ebooks entirely for free. In that case, you could simply offer sample chapters in exchange for email addresses and require payment for the rest.

      31. Sample Audio/Video Clips

      If you have high-quality videos, you can offer sample clips from them. Audio clips are also viable as lead magnets, even if your product is a video. All you need to do is convert your video into audio, using an online tool such as Zamzar.

      32. Free Coaching Sessions

      If it fits your business model, you can offer free coaching sessions to your audience in exchange for their information. This works out well since your audience will already be expecting a pitch at the end of the session.

      33. PDF Versions

      Another easy technique is to turn existing blog posts into PDFs and offer them as content upgrades. You can create the PDFs yourself using Microsoft Word, Google Docs, or a tool such as PrintFriendly or Beacon.

      34. Transcripts

      Video transcripts may be more accessible for non-visual learners. They’re also useful for those in your audience who have unstable internet connections or simply prefer to learn at their own pace.

      35. Summaries/Cliff Notes Versions

      If you have an ebook or another long piece of content, you can create a summary and offer it as a lead magnet. This isn’t restricted to just your own content. You can also create abridged versions of content written by experts and influencers in your field (just be careful not to plagiarize).

      36. State of the Industry Addresses

      For a unique twist, you can create reports and stats about current trends in your industry and then create a lead magnet out of them. This provides highly-valuable and up-to-date information. Keep in mind, however, that this content will need to be updated regularly to stay relevant.

      37. Predictions

      If your goal is to become an industry leader, one option is to offer insightful predictions about your industry. You can collect these predictions, include associated advice, and bundle it all together into a lead magnet offer.

      38. Mind Maps

      Mind maps make complex concepts easier to digest. They look a lot like visual outlines. While MindMeister is a tool specifically for making mind maps, Canva can also be used for this purpose.

      39. Audiobooks

      Ebooks take a long time to consume and don’t always perform well as lead magnets. However, you can turn your ebook into a more easily-consumable audiobook and use it to drive traffic to your site.

      40. Presentations

      Slideshare offers a lead generation tool for converting audience members into subscribers.

      An example of a presentation.

      This solution enables you to use custom presentations as lead magnets.

      41. Roundups

      A roundup is a list of tips, techniques, or recommended tools typically presented as an article or blog post. You can start by interviewing experts, asking for insights and advice. Then you can create a post by pulling quotes from the interviews and offer it as a content upgrade.

      42. Newsletters

      Sometimes, your email is the lead magnet. The Hustle is an example of a B2C company whose main service is sending relevant and entertaining emails daily with news from the tech and business industries.

      43. Vaults/Libraries

      If you’ve created a lot of educational content, you can compile it into a dedicated page or archive. Then you can ask for an email address in exchange for a handy all-in-one download.

      44. Quizzes

      A quiz on the Interact website.

      A quiz is a series of questions for your website visitor to answer. To get a result, they’ll need to enter their email address. Quizzes are fun and convert well, plus tools such as Interact make them easy to create.

      45. Surveys

      Surveys can be used to solicit feedback from users who’ve been on your website a few times. Although they are more generally used for market research, they can also be implemented effectively as lead magnets, since many people will be happy to give feedback.

      46. Giveaways

      Giveaways help you get the attention of audiences who might have otherwise never looked your way. Using services like ViralSweep and Gleam, you can run giveaways easily. This generally involves offering some of your products for free in exchange for email addresses.

      47. Desktop Wallpapers

      Wallpapers can be inspiring, fun, or soothing. If you’ve made something really unique, you can offer it as an attractive lead magnet.

      48. Membership Sites

      B2B Marketing’s free membership offer.

      There’s a reason exclusive memberships are so popular. They let you offer your audience the opportunity to join a community where they can access opportunities not accessible elsewhere.

      49. Facebook Groups

      Facebook groups can be used as lead magnets, just like with membership sites. They give you a great platform for building a community around your business.

      50. Slack Groups

      Slack has become popular in the last few years as a way for teams to communicate more effectively. It can also be useful for building communities around your brand and might work better than Facebook for certain industries.

      51. Free Trials

      Generally, before you pay for a tool, you’ll want to test it out to verify whether the cost will be worthwhile. Software companies typically offer a demo or trial copy for this purpose.

      52. Coupons

      Limited-time deals can be very attractive since no one wants to spend more money than they have to.

      A limited-time deal on the Adidas website.

      If you’re offering a product, coupon deals will make it much easier to persuade consumers to buy from you.

      53. Case Studies

      Case studies are real-life examples of customer experiences with your products and services. They are especially useful when you’re targeting other businesses. You’ll need to ask your customers for testimonials first if you want to create case studies.

      Marketing Tips in Your Inbox

      Whether you want to create a lead magnet, set up a Facebook ad, or supercharge a CTA button, we can help! Subscribe to our monthly digest so you never miss an article.

      The Perfect Lead Magnet

      Although email marketing offers a high ROI, it’s impossible to use it effectively without a strong base of subscribers. Lead magnets offer proven ways to increase your email list, ultimately leading to higher sales and greater profitability.

      As you’ve read in this article, there’s no end to the types of lead magnets you can create. There are checklists, cheat sheets, swipe files, calendars, reports, infographics, PDF versions, etc.

      All you have to do is select the option that best fits your business and audience and get to work!

      Ready to bring your lead magnet idea to life? Keep costs low with one of our shared hosting plans. With many robust features included — think free domain, SSL certificate, professional email address, and privacy protection — our shared hosting gives you everything you need to succeed online for as little as $2.59/mo.



      Source link

      DreamHost’s Ultimate Small Business Resource Guide


      We see you, small business owners! You bring character and diversity to your hometowns and spice to your niche on the internet. You create jobs. You build local economies and provide unique products and services with a personal touch big corporations can only try to replicate. Plus, you are living your dream: turning your passion into a money-making venture that improves the world and gives you the chance to be your own boss.

      We know how hard you work to make this dream a reality. It’s never easy to run your own business, but the current COVID-19 global pandemic has been a particular plague on small businesses. Governments around the world have social distancing guidelines to stop the spread of this coronavirus, bringing global economies to their knees.

      With people stuck at home, non-essential businesses closed, and millions out of work, the customers you rely on to stay afloat either can’t come to your shop or are short on cash for anything outside living expenses. None of this is your fault, and it is happening despite your diligent work and vision for your business.

      Even National Small Business Week — an annual springtime celebration of your essential place in the U.S. economy scheduled for this week — has been postponed thanks to COVID-19. But we are going to celebrate you anyway! Here at DreamHost, we believe in small business, and we are proud to provide a platform and digital home for so many of you.

      The pandemic will let up eventually, and we are still rooting for you. To help you get some ideas for how to build and boost your business, we’ve collected our best advice for small business owners — all in one place.

      Read on to find essential tips about:

      Feel free to use the links above to jump around to the most pertinent articles for you and your business — or read straight on through for an overview of all the advice we have to offer.

      You Can Build a Website

      Whether you want to start a blog or run a small business, DreamHost makes it easy to begin your online journey. Our shared hosting plans give you everything you need to thrive online at an affordable price.

      Building a Small Business Website

      In the small-business world, your website is everything. It’s your homestead on the frontier of the web. It declares your brand to the world and is often the first impression potential customers have of your business.

      For many of you, your website is your business.

      Even if your business is a brick-and-mortar operation — such as a restaurant or antique store — your company’s website needs to be helpful, optimized, and updated and maintained regularly. Your website provides valuable info, including where to find you and when, and drives customers off their couches and into your stores.

      The internet is where your customers spend most of their time, especially right now. Use these resources to learn how to get going on WordPress, build a beautiful website from the ground up, and tailor it to fit your own business.

      Building an Online Store

      If you have an online business — or if you want to start selling your products online in addition to your physical store — a reliable and attractive online shop is what you need. Your customers want to browse, find the products they want, and check out without a glitch. To make that happen, you need to build an online store with a trusted platform in addition to your business’s WordPress website.

      It’s surprisingly easy to get an online shop up and keep it going — you just need the right tools and tips. We love WooCommerce and Shopify, and you’ll learn about both, plus more tips and tricks for selling online, in the helpful guides below.

      Small Business Advice

      You small business owners are a scrappy bunch, and much of what you know you learned through good, old fashioned experience. There’s no education like the one that comes from getting out there and making your own mistakes.

      As valuable as mistakes and failures are, we want to set you up as much as possible for success and triumph. In this section, you’ll find a roundup of our best advice for entrepreneurs — learn how to manage everything from your stress to your small business website and beyond.

      Small-Biz Tools and Resources

      You want your small business to reach its full potential — and so do we! No person is an island, and the same goes for businesses. We all need a little help and support sometimes, and when we use available tools, we can get more done in less time.

      There are so many tools out there to help you manage and grow your business, and to optimize the whole enterprise for success. Stop doing things the hard way. Here you’ll find all of our favorite tools, apps, plugins, and more for making the work of running your business a little easier.

      Ways to Make Money Online

      Thanks to the internet, there’s never been a better time to start a side hustle. Money-making opportunities abound online, from blogging to affiliate marketing.

      Whether you want to build up an extra income source on top of your full-time gig or are looking for ideas to build up your business, we got you. Let’s walk through our favorite — not to mention lucrative and legitimate — ways to make money online.

      Small-Biz Marketing Tips

      There are more than 1.5 billion (and counting) websites on the internet today. So how does your humble food blog or photography portfolio get noticed, by the right people, amid all the noise?

      One word: marketing.

      “If you build it, they will come” is an adage that doesn’t hold up so well when it comes to your business’s presence online. Merely having a website just isn’t enough; you need to draw people to it for it to do any good. You need some smart strategies to bump your website up to the top of search results, find and engage social media followers, and encourage positive reviews.

      Do you want your brand to get noticed? Find your target market. Drive traffic to your website. Do some smart social media and email marketing. Create killer content and optimize your site for top search engine results. How? We thought you’d never ask: Learn or brush up on these skills with our handy dandy guides to marketing your small business.

      Want More Small-Biz Hacks?

      Whether you need marketing advice or a heads-up on the latest web design trends, we’ve got content for that! Subscribe to our monthly newsletter so you never miss an article.

      You’ve Got This

      There you have it — everything we’ve ever written to guide, inform, and inspire small business owners in one handy guide. We know that you’ve got what it takes to make it through this crisis, and we hope these resources can help you get there.

      Now, we have a question for you: How can we help? What small-biz related questions are keeping you up at night? Holler at us over on Twitter to let us know which additional topics and resources you’d like us to cover for small business owners.

      Are you wondering where to get started? You can easily build an online presence for your small business with shared hosting. Our plans, which start at just $2.59 per month, offer all the tools you need to build your business and reach your customers.





      Source link

      A Beginner's Guide to SELinux on CentOS 8


      Updated by Linode

      Contributed by
      Linode

      SELinux is a Mandatory Access Control (MAC) system, developed by the NSA. SELinux was developed as a replacement for Discretionary Access Control (DAC) that ships with most Linux distributions.

      The difference between DAC and MAC is how users and applications gain access to machines. Traditionally, the command sudo gives a user the ability to heighten permissions to root-level. Root access on a DAC system gives the person or program access to all programs and files on a system.

      A person with root access should be a trusted party. But if security has been compromised, so too has the system. SELinux and MACs resolve this issue by both confining privileged processes and automating security policy creation.

      SELinux defaults to denying anything that is not explicitly allowed. SELinux has two global modes, permissive and enforcing. Permissive mode allows the system to function like a DAC system, while logging every violation to SELinux. The enforcing mode applies a strict denial of access to anything that isn’t explicitly allowed. To explicitly allow certain behavior on a machine, you, as the system administrator, have to write policies that allow it. This guide provides a brief and basic introduction to commonly used commands and practices for SELinux system administration.

      Before You Begin

      1. Ensure that you have followed the Getting Started and Securing Your Server guides.

        Note

        This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, you can check our Users and Groups guide.
      2. Update your system:

        sudo yum update
        

        Note

        The Linode kernel does not support SELinux by default. However, all new Linodes running CentOS 8 use the distribution provided kernel, which has SELinux enabled by default.

        If your system is running a Linode kernel, you will need to change to an upstream kernel in order to use SELinux. See the How to Change Your Linode’s Kernel for more steps. Once you’re kernel is set to the upstream kernel, continue on with the steps in this guide.

      Install Supporting SELinux Packages

      In this section, you will install various SELinux packages that will help you when creating, managing, and analyzing SELinux policies.

      1. Verify which SELinux packages are installed on your system:

        sudo rpm -aq | grep selinux
        

        A newly deployed CentOS 8 Linode should have the following packages installed:

          
        libselinux-2.5-14.1.el7.x86_64
        selinux-policy-3.13.1-252.el7_7.6.noarch
        selinux-policy-targeted-3.13.1-252.el7_7.6.noarch
        libselinux-utils-2.5-14.1.el7.x86_64
        libselinux-python-2.5-14.1.el7.x86_64
            
        
      2. Install the following packages and their associated dependencies:

        sudo yum install policycoreutils policycoreutils-python setools setools-console setroubleshoot
        
        • policycoreuitls and policyoreutils-python contain several management tools to administer your SELinux environment and policies.
        • setools provides command line tools for working with SELinux policies. Some of these tools include, sediff which you can use to view differences between policies, seinfo a tool to view information about the components that make up SELinux policies, and sesearch used to search through your SELinux policies. setools-console consists of sediff, seinfo, and sesearch. You can issue the --help option after any of the listed tools in order to view more information about each one.
        • setroubleshoot suite of tools help you determine why a script or file may be blocked by SELinux.

        Optionally, install setroubleshoot-server and mctrans. The setroubleshoot-server allows, among many other things, for email notifications to be sent from the server to notify you of any policy violations. The mctrans daemon translates SELinux’s output to human readable text.

      SELinux States and Modes

      SELinux States

      When SELinux is installed on your system, it can be either enabled or disabled. By default, the CentOS 8 image provided by Linode has SELinux in an enabled state.

      • To disable SELinux, update your SELinux configuration file using the text editor of your choice. Set the SELINUX directive to disabled as shown in the example.

        /etc/selinux/config
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        
        # This file controls the state of SELinux on the system.
        # SELINUX= can take one of these three values:
        #     enforcing - SELinux security policy is enforced.
        #     permissive - SELinux prints warnings instead of enforcing.
        #     disabled - No SELinux policy is loaded.
        SELINUX=disabled
        # SELINUXTYPE= can take one of three values:
        #     targeted - Targeted processes are protected,
        #     minimum - Modification of targeted policy. Only selected processes are protected.
        #     mls - Multi Level Security protection.
        SELINUXTYPE=targeted
              

        Note

        You can update the SELINUX directive with any of the available SELinux states or modes.
      • Reboot your Linode for the changes to take effect:

        sudo reboot
        
      • Connect to your Linode via SSH (replace 192.0.2.0 with your own Linode’s IP address) and verify your SELinux installation’s status:

        ssh [email protected]
        sudo sestatus
        

        Its output should display disabled

          
        SELinux status:                 disabled
            
        

      SELinux Modes

      When SELinux is enabled, it can run in either enforcing or permissive modes.

      Note

      If SELinux is currently disabled, update your SELinux configuration file with the SELINUX directive set to enabled, then reboot your system, and SSH back into your Linode. These steps are outlined in the SELinux States section of the guide.
      • In enforcing mode, SELinux enforces its policies on your system and denies access based on those policies. Use the following command to view SELinux policy modules currently loaded into memory:

        sudo semodule -l
        
      • Permissive mode does not enforce any of your SELinux policies, instead, it logs any actions that would have been denied to your /var/log/audit/audit.log file.

      • You can check which mode your system is running by issuing the following command:

        sudo getenforce
        
      • To place SELinux in permissive mode, use the following command:

        sudo setenforce 0
        

        Permissive mode is useful when configuring your system, because you and your system’s components can interact with your files, scripts, and programs without restriction. However, you can use audit logs and system messages to understand what would be restricted in enforcing mode. This will help you better construct the necessary policies for your system’s user’s and programs.

      • Use the sealert utility to generate a report from your audit log. The log will include information about what SELinux is preventing and how to allow the action, if desired.

        sudo sealert -a /var/log/audit/audit.log
        

        The output will resemble the example, however, it varies depending on the programs and configurations on your system. The example was generated using a Linode running the Apache webserver with a virtual hosts configuration.

          
        SELinux is preventing /usr/sbin/httpd from write access on the directory logs.
        
        *****  Plugin httpd_write_content (92.2 confidence) suggests   ***************
        
        If you want to allow httpd to have write access on the logs directory
        Then you need to change the label on 'logs'
        Do
        # semanage fcontext -a -t httpd_sys_rw_content_t 'logs'
        # restorecon -v 'logs'
            
        
      • To allow /usr/sbin/httpd write access to the directory logs, as shown by the output, you can execute the suggested commands, semanage fcontext -a -t httpd_sys_rw_content_t 'logs' and restorecon -v 'logs'.

      SELinux Context

      SELinux marks every single object on a machine with a context. Every file, user, and process has a context. The context is broken into three parts: user, role, and type. An SELinux policy controls which users can get which roles. Each specific role places a constraint on what type of files that user can access. When a user logs in to a system, a role is assigned to the user as seen in the ls -Z example, the output unconfined_u is a user role.

      1. Create a directory in your home folder:

        mkdir ~/example_dir
        
      2. Print the SELinux security context of your home folder’s directories and files :

        ls -Z ~/
        

        The output is similar to:

          
        drwxrwxr-x. example_user example_user unconfined_u:object_r:user_home_t:s0 example_dir
            
        

        The SELinux specific information is contained in the unconfined_u:object_r:user_home_t:s0 portion, which follows the following syntax: user:role:type:level. To learn more about users, roles, and related access control, see the CentOS SELinux documentation.

      SELinux Boolean

      An SELinux Boolean is a variable that can be toggled on and off without needing to reload or recompile an SELinux policy.

      1. You can view the list of boolean variables using the getsebool -a command. Pipe the command through grep to narrow down your results.

        sudo getsebool -a | grep "httpd_can"
        

        You will see a similar output:

          
        httpd_can_check_spam --> off
        httpd_can_connect_ftp --> off
        httpd_can_connect_ldap --> off
        httpd_can_connect_mythtv --> off
        httpd_can_connect_zabbix --> off
        httpd_can_network_connect --> off
        httpd_can_network_connect_cobbler --> off
        httpd_can_network_connect_db --> off
        httpd_can_network_memcache --> off
        httpd_can_network_relay --> off
        httpd_can_sendmail --> off
            
        

        You can change the value of any variable using the setsebool command. If you set the -P flag, the setting will persist through reboots. If, for example, you want to allow HTTPD scripts and modules to connect to the network, update the corresponding boolean variable

        sudo setsebool -P httpd_can_network_connect ON
        

        When viewing a list of your boolean variables, you should now see that it is set to ON.

        sudo getsebool -a | grep "httpd_can"
        
          
        httpd_can_check_spam --> off
        httpd_can_connect_ftp --> off
        httpd_can_connect_ldap --> off
        httpd_can_connect_mythtv --> off
        httpd_can_connect_zabbix --> off
        httpd_can_network_connect --> on
        httpd_can_network_connect_cobbler --> off
        httpd_can_network_connect_db --> off
        httpd_can_network_memcache --> off
        httpd_can_network_relay --> off
        httpd_can_sendmail --> off
              
        

      Next Steps

      This guide provides a brief and basic introduction to SELinux administration. You can now take a deeper dive into SELinux by consulting some of the resources include in the More Information section of this guide.

      More Information

      You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

      This guide is published under a CC BY-ND 4.0 license.



      Source link