If you’ve already spent the time learning SELinux, but have to deploy Ubuntu as a server operating system, you can install SELinux and be on familiar ground. Jack Wallen shows you how.
Ubuntu Server has its own Mandatory Access Control system, called AppArmor, which is similar to SELinux, in that they both provide tools to isolate applications from one another, to protect the host system. But how each of these tools is used is quite different. In fact, just because you know one, doesn’t mean you’ll be able to immediately use the other. That’s why you might want to consider installing SELinux on Ubuntu Server. You might be migrating from a Red Hat-based distribution and have invested considerable time learning how to use that particular system.
خوب است که می توانید SELinux را در اوبونتو نصب کنید.
In fact, it’s actually quite simple, and I’m going to show you how it’s done. Once finished, you can start working with SELinux on Ubuntu Server in the same way you did when administering your Red Hat-based systems.
آنچه شما نیاز دارید
To make this work, you’ll need a running instance of Ubuntu Server 20.04 and a user with sudo privileges. That’s it. Let’s get to work.
One warning: I highly recommend you first try this on a test system. And once you’re certain it will work for you, I would recommend you install SELinux on a fresh install of Ubuntu Server and then build from there.
نحوه حذف AppArmor
اولین کاری که باید انجام دهید حذف AppArmor است. وارد سرور اوبونتو شوید و با دستور زیر سرویس را متوقف کنید:
sudo systemctl stop apparmor
اکنون می توانیم AppArmor را با دستور حذف کنیم:
sudo apt-get remove apparmor -y
پس از حذف AppArmor، سیستم خود را با استفاده از:
راه اندازی مجدد sudo
نحوه نصب SELinux
اکنون می توانیم SELinux را نصب کنیم. به پنجره ترمینال برگردید، دستور را صادر کنید:
sudo apt-get install policycoreutils selinux-utils selinux-basics -y
پس از اتمام نصب، SELinux را با دستور زیر فعال کنید:
sudo selinux-activate
SELinux را روی حالت اجباری تنظیم کنید:
sudo selinux-config-enforcing
در نهایت سیستم خود را یکبار دیگر راه اندازی مجدد کنید:
راه اندازی مجدد sudo
هنگامی که سیستم دوباره بالا آمد، بررسی کنید تا مطمئن شوید SELinux با دستور فعال است:
ساتاوات
شما باید چیزی شبیه به:
وضعیت SELinux: فعال است نصب SELinuxfs: /sys/fs/selinux دایرکتوری ریشه SELinux: /etc/selinux نام خط مشی بارگذاری شده: پیش فرض حالت فعلی: مجاز حالت از فایل پیکربندی: اجرا وضعیت سیاست MLS: فعال است خط مشی deny_unknown status: مجاز است بررسی حفاظت از حافظه: درخواستی (ناامن) نسخه سیاست هسته حداکثر: 31
And that’s all there is to install SELinux on Ubuntu Server 20.04. If you’re already familiar with this security system, you can jump in and start securing your server.
همچنین مشاهده کنید
- "
- 7
- دسترسی
- معرفی
- برنامه های کاربردی
- بهترین
- بهترین شیوه
- ساختن
- بررسی
- رمز
- جاری
- امنیت سایبری
- DID
- نام خانوادگی
- تازه
- چگونه
- چگونه
- HTTPS
- تصویر
- محرم راز
- IT
- امنیت آن است
- پرش
- نگهداری
- آخرین
- یادگیری
- MLS
- اخبار
- عملیاتی
- سیستم عامل
- دیگر
- کلمه عبور
- سیاست
- محافظت از
- حفاظت
- RE
- در حال اجرا
- تیم امنیت لاتاری
- ساده
- مزایا
- شروع
- وضعیت
- سودو
- سیستم
- سیستم های
- آزمون
- کوچک
- زمان
- اوبونتو
- مهاجرت کاری