<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security &#8211; Hostry Help Center</title>
	<atom:link href="https://help.hostry.com/article-categories/security/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.hostry.com</link>
	<description>Full information on how to use HOSTRY, provided by 24/7 community based support</description>
	<lastBuildDate>Wed, 23 Feb 2022 11:08:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.12</generator>

<image>
	<url>https://help.hostry.com/wp-content/uploads/cache/2021/01/cropped-apple-icon-180x180-1/836712163.png</url>
	<title>Security &#8211; Hostry Help Center</title>
	<link>https://help.hostry.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Configuring Automatic Kernel Updates on Linux</title>
		<link>https://help.hostry.com/knowledge-base/configuring-automatic-kernel-updates-on-linux/</link>
					<comments>https://help.hostry.com/knowledge-base/configuring-automatic-kernel-updates-on-linux/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 17 Sep 2020 08:59:51 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2174</guid>

					<description><![CDATA[Applying security updates to the Linux kernel is a process that can be done using tools like apt, yum, or kexec. In case of a large number of servers, this process can be difficult and time-consuming. A system reboot is required to manually update the kernel. For organizations with more [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Applying security updates to the Linux kernel is a process that can be done using tools like apt, yum, or kexec. In case of a large number of servers, this process can be difficult and time-consuming. A system reboot is required to manually update the kernel. For organizations with more than a few servers, live patching is the best option. It is an automatic way to fix the Linux kernel while the server is running, making it more efficient and safer than manual methods. </p>



<h2 id="kernelcare" >KernelCare</h2>



<p><strong><a href="https://www.kernelcare.com/"><em>KernelCare</em></a></strong> &#8211; the great option for hosting provaiders and businesses. <strong>KernelCare</strong> runs on Ubuntu, CentOS, Debian, and other popular flavors of Linux. It checks for updates every 4 hours and installs them automatically. Patches can be rolled back. KernelCare is free for nonprofits. To install KernelCare, run the installation script:</p>



<pre class="wp-block-code"><code>wget -qq -O - https://kernelcare.com/installer | bash</code></pre>



<p>If you are using an IP based license, nothing else is required. Otherwise, if you are using a key based license, run the following command to register the service:</p>



<pre class="wp-block-code"><code>/usr/bin/kcarectl --register &lt;your-key></code></pre>



<p>Where is the registration code string<strong> &lt;your-key&gt;</strong>provided when signing up for a trial or purchasing a product. You can get it on this page. Below are some useful KernelCare commands. To check if a running KernelCare kernel is supported:</p>



<pre class="wp-block-code"><code>curl -s -L https://kernelcare.com/checker | python</code></pre>



<p>To unregister a server:</p>



<pre class="wp-block-code"><code>sudo kcarectl --unregister</code></pre>



<p>To check the status of the service:</p>



<pre class="wp-block-code"><code>sudo kcarectl --info</code></pre>



<p>The software will automatically check for new patches every 4 hours. To update manually, run:</p>



<pre class="wp-block-code"><code>/usr/bin/kcarectl --update</code></pre>



<h2 id="canonical-livepatch" >Canonical Livepatch</h2>



<p><strong><em><a href="https://ubuntu.com/security/livepatch">Canonical Livepatch</a></em></strong> is a service that fixes a running kernel without rebooting your Ubuntu system. Livepatch is free to use on three Ubuntu systems. To use this service on more than three computers, you need to subscribe to the <strong><a href="https://ubuntu.com/legal/ubuntu-advantage#:~:text=The%20Ubuntu%20Advantage%20Assurance%20Programme,of%20all%20Canonical%20support%20contracts.">Ubuntu Advantage program.</a></strong> Before installing the service, you need to get a livepatch token from the Livepatch service website. After installing the token and enabling the service by running the following two commands:</p>



<pre class="wp-block-code"><code>sudo snap install canonical-livepatch
sudo canonical-livepatch enable &lt;your-key></code></pre>



<p>To check the status of the service, run:</p>



<pre class="wp-block-code"><code>sudo canonical-livepatch status --verbose</code></pre>



<p>Later, if you want to unregister the machine, use this command:</p>



<pre class="wp-block-code"><code>sudo canonical-livepatch disable &lt;your-key></code></pre>



<blockquote class="wp-block-quote"><p> The same instructions apply for Ubuntu 20.04 and Ubuntu 18.04. </p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/configuring-automatic-kernel-updates-on-linux/feed/</wfw:commentRss>
			<slash:comments>453</slash:comments>
		
		
			</item>
		<item>
		<title>Correcting network configuration after Snapshot recovery</title>
		<link>https://help.hostry.com/knowledge-base/correcting-network-configuration-after-snapshot-recovery/</link>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 28 Oct 2020 09:02:18 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2480</guid>

					<description><![CDATA[Snapshot is a copy of files and directories of the file system at a specific point in time. File systems at this point can later be mounted read-only. So, after the snapshot recovery period has passed on the new VPS, problems may arise caused by changing the MAC address of [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="has-pale-pink-background-color has-background"><a href="https://en.wikipedia.org/wiki/Snapshot_(computer_storage)"><strong>Snapshot</strong></a> is a copy of files and directories of the file system at a specific point in time. File systems at this point can later be mounted read-only. </p>



<p>So, after the snapshot recovery period has passed on the new VPS, problems may arise caused by changing the MAC address of the network adapter. Typically, when you change a network adapter, the operating system creates a new network adapter for it. Typically you will see the network adapter on “eth1” (or eth2 if you have a private network enabled).</p>



<h2 id="centos" >CentOS</h2>



<p>This operating system describes the following steps to correct network configuration after snapshot recovery:</p>



<ol><li>First you need to log into your server, this can be done as a consequence of <a href="https://help.hostry.com/knowledge-base/how-do-i-connect-to-my-server-via-ssh/"><strong>this</strong></a>;</li><li>Delete the contents of <strong>/etc/udev/rules.d/70-persistent-net.rules</strong></li><li>Open <strong>/etc/sysconfig/network-scripts/ifcfg-eth0</strong> and change the content to the following:</li></ol>



<pre class="wp-block-code"><code>DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
DNS1=8.8.8.8
NAME="System eth0"</code></pre>



<p class="has-pale-pink-background-color has-background">After this three steps, you need to restart VPS</p>



<h2 id="debian-ubuntu" >Debian &amp; Ubuntu</h2>



<p>This operating system describes the following steps to correct network configuration after snapshot recovery:</p>



<ol><li>First you need to log into your server, this can be done as a consequence of <a href="https://help.hostry.com/knowledge-base/how-do-i-connect-to-my-server-via-ssh/"><strong>this</strong></a>;</li><li>Delete the contents of <strong>/etc/udev/rules.d/70-persistent-net.rules</strong></li><li>Review the contents of <strong>/etc/network/interfaces</strong> and update all IP addresses to match the current server.</li></ol>



<p class="has-pale-pink-background-color has-background">After this three steps, you need to restart VPS</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Cybercrime As One Of The Biggest Threats To Society in 2020</title>
		<link>https://help.hostry.com/knowledge-base/cybercrime-as-one-of-the-biggest-threats-to-society-in-2020/</link>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 20 May 2020 08:00:52 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1708</guid>

					<description><![CDATA[In early 2020, the World Economic Forum (WEF) published an annual report on global risks, and oddly enough, cybercrime was one of the five global risks for all of humanity! Cyber ​​attacks on infrastructure, the destruction of natural ecosystems, extreme heat waves, political polarization and economic confrontations are ranked in [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In early 2020, the<strong> </strong>World Economic Forum<strong> (WEF) </strong>published an annual report on global risks, and oddly enough, cybercrime was one of the five global risks for all of humanity! Cyber ​​attacks on infrastructure, the destruction of natural ecosystems, extreme heat waves, political polarization and economic confrontations are ranked in the top 5 short-term global risks in the report.</p>



<h2 id="cybercrime-is-very-high-in-global-risk" >Cybercrime is very high in global risk</h2>



<p>According to <strong>WEF</strong> estimates, cybercrime brings about $ 6 trillion in annual revenue. Corporations such as Facebook, Microsoft, Apple, Amazon, Walmart, and Tesla earn a combined annual revenue of $ 1.28 trillion. These numbers and scales are staggering and very surprising!  The most popular cybercrime methods are: blackmail, denial of service and (DDoS) extortion. The ransomware criminal transfers malicious software to the victim’s computer, encrypts the stored data, and requires money to decrypt the contents. A denial of service attack is based on sending excess network traffic to the victim’s computer infrastructure and demanding money to stop it. This works well for many modern corporations whose business runs on digital platforms.</p>



<p>We often use things like smart watches, voice assistants, door cameras, consecration systems, smart personal devices. These devices are very often tools for the theft of personal data, extortion and are at a high level in the lists of criminals. Small businesses that don&#8217;t have computer or security experts are also easy targets. As with any other type of crime, the fight against cybercrime never ends. But in fact, governments should consider regulating the devices that people buy and connect to the Internet. Basic security should be the default setting for all products that can be connected to the network.We suggest you familiarize yourself with the link, which sets out some ways to combat cybercrime: <a href="https://us.norton.com/internetsecurity-how-to-how-to-recognize-and-protect-yourself-from-cybercrime.html">https://us.norton.com/internetsecurity-how-to-how-to-recognize-and-protect-yourself-from-cybercrime.html</a></p>



<p>Some of them is:</p>



<ul><li><strong> Manage your social media settings</strong></li><li><strong>Talk to your children about the internet</strong></li><li><strong>Keep up to date on major security breaches</strong></li><li><strong>Take measures to help protect yourself against identity theft</strong></li><li><strong>Use strong passwords</strong></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Free site protection with Let&#8217;s Encrypt</title>
		<link>https://help.hostry.com/knowledge-base/free-site-protection-with-lets-encrypt/</link>
					<comments>https://help.hostry.com/knowledge-base/free-site-protection-with-lets-encrypt/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 11 Jul 2019 12:12:53 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=202</guid>

					<description><![CDATA[Protection takes a very important role in the development of sites. People have experience of being exposed to external threats from intruders who are ready to steal personal data, important information and other resources from your site. Content, business, customers are all important factors, but the protection of the site [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image"><img width="645" height="413" src="https://help.hostry.com/wp-content/uploads/2019/07/sssss.png" alt="" class="wp-image-206" srcset="https://help.hostry.com/wp-content/uploads/2019/07/sssss.png 645w, https://help.hostry.com/wp-content/uploads/2019/07/sssss-300x192.png 300w, https://help.hostry.com/wp-content/uploads/2019/07/sssss-50x32.png 50w, https://help.hostry.com/wp-content/uploads/2019/07/sssss-600x384.png 600w, https://help.hostry.com/wp-content/uploads/2019/07/sssss-320x205.png 320w" sizes="(max-width: 645px) 100vw, 645px" /></figure>



<p></p>



<p>Protection takes a very important role in the development of sites. People have experience of being exposed to external threats from intruders who are ready to steal personal data, important information and other resources from your site. Content, business, customers are all important factors, but the protection of the site is above all the confidence in security and integrity.</p>



<p>An <strong>SSL certificate</strong> is a special protocol that guarantees a secure and reliable connection to your site. <strong><em>This protocol</em></strong> provides reliability, security, and is guaranteed a successful and non-dangerous communication through the elements of authentication and encryption. This fact adds your site status with the suffix &#8220;S&#8221; (that is, no longer http, but httpS)</p>



<p></p>



<h2 id="order-free-certificate-lets-encrypt" >Order free certificate Let&#8217;s Encrypt</h2>



<p>Let’s Encrypt ”is a certificate authority from which you can get a free SSL certificate for the site. They are great for small sites where users can leave some personal information: email, passwords, phone number, address. Certificate Authority Let&#8217;s Encrypt is ready to issue you a certificate absolutely FREE! </p>



<p>When installing a security certificate on any control panel, when ordering a certificate, you receive the following files:</p>



<ul><li><strong>certificate.crt</strong> – the basis of the certificate for your domain name.</li><li><strong>private.key</strong> – the key that was generated when creating the CSR</li><li><strong>ca_bundle.crt</strong> – root certificate provided by your certificate authority</li></ul>



<p>This is very useful for you if you own a small website and cannot afford a paid SSL certificate. We give you a free Let Encrypt security certificate for 90 days. Install the free version of Let Encrypt by clicking on the link: </p>



<p></p>



<p><a href="https://hostry.com/solutions/ssl-for-free/">https://hostry.com/solutions/ssl-for-free/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/free-site-protection-with-lets-encrypt/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Boot Windows Server 2012 in Safe Mode</title>
		<link>https://help.hostry.com/knowledge-base/how-to-boot-windows-server-2012-in-safe-mode/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-boot-windows-server-2012-in-safe-mode/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Mon, 17 Feb 2020 10:46:54 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1434</guid>

					<description><![CDATA[Safe Mode on Windows provides access to special features that can be used to fix various kinds of problems. To boot in safe mode, you will need to have regular access to your Windows server. There will be two ways to configure this, use any of them to boot the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Safe Mode on Windows provides access to special features that can be used to fix various kinds of problems. To boot in safe mode, you will need to have regular access to your Windows server. There will be two ways to configure this, use any of them to boot the server in safe mode.</p>



<h2 id="method-1-using-launch-options" >Method # 1. Using launch options</h2>



<p>To enable safe mode using the graphical interface, you must press the key combination from: <strong>Windows + C</strong> to open &#8220;Settings&#8221;, then click on &#8220;Power&#8221;. After that, click on <strong>Shift</strong> and then &#8220;Restart&#8221;. Click Troubleshoot, then Launch Options. Click &#8220;Restart&#8221; after &#8220;Enable safe mode&#8221; is displayed in the displayed list.</p>



<p>Use the arrow keys to enter safe mode. After you press <strong>Enter</strong>, in safe mode, your Windows Server will boot into unopened mode. </p>



<p>After successful inclusion of safe mode, your background should be black, and in the upper right corner on your desktop will appear the inscription &#8220;<strong><em>Safe mode</em></strong>&#8220;</p>



<h2 id="method-2-using-msconfig" >Method # 2. Using msconfig</h2>



<p>In order to boot into safe mode using the system (msconfig), you must go to Run and run <strong><em>msconfig</em></strong></p>



<p>On the Download tab, which is located in the Download Options, select Secure Download. Then click “<strong>OK</strong>”, and the server will automatically restart in safe mode. If you are prompted to &#8220;<strong>Restart</strong>,&#8221; click OK. </p>



<p>When loading in safe mode, the background of the desktop will be black, and in the upper right corner of the desktop will appear the inscription &#8220;<strong>Safe Mode</strong>&#8220;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-boot-windows-server-2012-in-safe-mode/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>How to Configure and Properly Set Up Fail2ban on Debian 11</title>
		<link>https://help.hostry.com/knowledge-base/how-to-configure-and-properly-set-up-fail2ban-on-debian-11/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-configure-and-properly-set-up-fail2ban-on-debian-11/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 23 Feb 2022 11:08:08 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=4742</guid>

					<description><![CDATA[Fail2Ban is a great and very useful tool that scans log files (eg /var/log/apache/error_log ) and blocks IP addresses that show signs of malware &#8211; too many bad passwords, search for exploits and others. This article will focus on a Linux server running on Debian 11. Preliminary Actions First you [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong><a href="https://www.fail2ban.org/wiki/index.php/Main_Page">Fail2Ban</a></strong> is a great and very useful tool that scans log files (eg /var/log/apache/error_log ) and blocks IP addresses that show signs of malware &#8211; too many bad passwords, search for exploits and others. This article will focus on a Linux server running on Debian 11. </p>



<h2 id="preliminary-actions" >Preliminary Actions</h2>



<p>First you need to update your server. To do this, enter a simple command:</p>



<pre class="wp-block-code"><code>apt update &amp;&amp; upgrade</code></pre>



<p>It is worth noting that the installation is not difficult, since <strong>Fail2Ban</strong> is already included in the repositories of your Debian 11. Installation is easy, just enter the command:</p>



<pre class="wp-block-code"><code>apt install fail2ban</code></pre>



<p>After you set it up, please check. The verification step is extremely important for making future adjustments:</p>



<pre class="wp-block-code"><code>systemctl status fail2ban</code></pre>



<p>If <strong>Fail2ban</strong> is not running on your instance, you need to run it. This can be done with the following command:</p>



<pre class="wp-block-code"><code>systemctl start fail2ban</code></pre>



<p>Next, move on to configuring <strong>Fail2ban</strong>. This is necessary for proper launch. Enter the following command:</p>



<pre class="wp-block-code"><code>systemctl enable fail2ban</code></pre>



<h2 id="configuring-fail2ban" >Configuring Fail2Ban</h2>



<p>If the first installation step was successfully completed and verified, then you can proceed to the Fail2ban configuration. Fail2ban is installed bundled with a default configuration file. This file contains configurable settings in Fail2ban. The file location is as follows:</p>



<pre class="wp-block-code"><code>/etc/fail2ban/jail.conf</code></pre>



<p>The file contains settings known as filters for configuring Fail2ban. This tool also has many options in its configuration file. These options can be useful for specific scripts and services that work with each other on your Linux machine.</p>



<ul><li>The <strong>bantime</strong> value is the exact time during which the malicious IP is blocked</li><li>The <strong>maxretry</strong> value &#8211; The number of times the user will try to login. If the limit is exceeded, the IP address is blocked.</li><li>The <strong>ignoreip</strong> value is the networks you trust. All networks you enter here will bypass Fai2Ban filtering.</li><li>The<strong> enable</strong> value allows Fail2ban to confirm whether you want this jail to be enabled or disabled.</li></ul>



<p>Next is to talk about <strong>jails</strong>. It has an individual customization option. Jails can increase the security of your Linux computer in many ways. You can add different filters to your server services. The first step is to create the jail.local configuration file. You can do it like this:</p>



<pre class="wp-block-code"><code>touch /etc/fail2ban/jail.local</code></pre>



<p>Open <strong>jail.local</strong> in a text editor of your choice.</p>



<pre class="wp-block-code"><code>nano /etc/fail2ban/jail.local.</code></pre>



<p>After the clarifications above have been provided regarding hail conf. you will be able to apply this directly to the configuration.</p>



<pre class="wp-block-code"><code>enabled = true
port = ssh
bantime = 10h
maxretry = 12
ignoreip = Any_IP

&#91;apache-badbots]
enabled = true
port = http,https, smtp...
bantime = 72h
maxretry = 3

&#91;squid]
enabled = false
port = 80,443,25, 1234...</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-configure-and-properly-set-up-fail2ban-on-debian-11/feed/</wfw:commentRss>
			<slash:comments>457</slash:comments>
		
		
			</item>
		<item>
		<title>How to Create a Sudo User on FreeBSD</title>
		<link>https://help.hostry.com/knowledge-base/how-to-create-a-sudo-user-on-freebsd/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-create-a-sudo-user-on-freebsd/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Tue, 18 Aug 2020 09:05:50 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1944</guid>

					<description><![CDATA[Install Sudo You will be able to install this from the ports collections if it is installed on your system. To do this, enter the following command: You can also install the sudo binary package using pkg: Add a Sudo User First you need to create a user account to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 id="install-sudo" >Install Sudo</h2>



<p>You will be able to install this from the ports collections if it is installed on your system. To do this, enter the following command:</p>



<pre class="wp-block-code"><code># cd /usr/ports/security/sudo/
# make install clean</code></pre>



<p>You can also install the <strong>sudo </strong>binary package using pkg:</p>



<pre class="wp-block-code"><code># pkg install sudo</code></pre>



<h2 id="add-a-sudo-user" >Add a Sudo User</h2>



<p>First you need to create a user account to use with <strong>sudo</strong></p>



<pre class="wp-block-code"><code># adduser</code></pre>



<p>Answer the questions from the suggested options to create a user. This tutorial will use <strong>user.example</strong></p>



<h2 id="add-user-to-wheel-group" >Add User to Wheel Group</h2>



<p>This group called &#8220;<strong>Wheel</strong>&#8221; limits the list of users who can use root</p>



<pre class="wp-block-code"><code># pw group mod wheel -m user.example</code></pre>



<h2 id="edit-the-sudoers-file" >Edit the sudoers file</h2>



<p>First, you need to check the sudoers file with <strong>visudo </strong>extension</p>



<pre class="wp-block-code"><code># visudo</code></pre>



<p>Look for a wheelset. Remove comment if line is off. When you&#8217;re ready to save the file, it should look like this</p>



<pre class="wp-block-code"><code>## Allows people in group wheel to run all commands
%wheel  ALL=(ALL)       ALL</code></pre>



<p>Save and exit vi. <strong>ESC </strong>type, then : <strong>W Q</strong>, then <strong>ENTER</strong></p>



<p><strong><em>IMPORTANT</em></strong>! The visudo utility performs a syntax check before making changes to the file. The wrong sudoers file can break your system. Never edit <strong>/etc/sudoers </strong>directly. For example, if you make a mistake, you will see this when exiting <strong>visudo</strong>. </p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-create-a-sudo-user-on-freebsd/feed/</wfw:commentRss>
			<slash:comments>460</slash:comments>
		
		
			</item>
		<item>
		<title>How To Enable or Reinstall SELinux on CentOS</title>
		<link>https://help.hostry.com/knowledge-base/how-to-enable-or-reinstall-selinux-on-centos/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-enable-or-reinstall-selinux-on-centos/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Mon, 06 Jul 2020 07:18:32 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1850</guid>

					<description><![CDATA[SELinux (Security-Enhanced Linux) is a special mechanism that is responsible for kernel security. This guide will be useful for users with a CentOS 6, 7, and 8 virtual machine. Disable and uninstall SELinux Install SELinux SELinux will detect the /.autorelabel file upon reboot, and then reconfigure all the files in [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong><a href="https://ru.wikipedia.org/wiki/SELinux">SELinux</a></strong> (Security-Enhanced Linux) is a special mechanism that is responsible for kernel security. This guide will be useful for users with a <strong>CentOS 6, 7, and 8 </strong>virtual machine.</p>



<h2 id="disable-and-uninstall-selinux" >Disable and uninstall SELinux</h2>



<pre class="wp-block-code"><code># setenforce 0
# yum remove selinux-policy\*
# rm -rf /etc/selinux/targeted /etc/selinux/config</code></pre>



<h2 id="install-selinux" >Install SELinux</h2>



<pre class="wp-block-code"><code># yum install selinux-policy-targeted
# yum install selinux-policy-devel policycoreutils
# touch /.autorelabel; reboot</code></pre>



<p>SELinux will detect the <strong>/.autorelabel </strong>file upon reboot, and then reconfigure all the files in the correct SELinux contexts. If you have many files in your virtual machine, then VPS may be unavailable for a long time.</p>



<p><strong>Note!</strong></p>



<p>If SELinux is not already installed, then you need to go to step 2 &#8211; installing SELinux. If SELinux is installed on your virtual server, then you need to remove it (to reset the policy to the default settings)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-enable-or-reinstall-selinux-on-centos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install SpamAssassin on your Ubuntu VPS</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-spamassassin-on-your-ubuntu-vps/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-install-spamassassin-on-your-ubuntu-vps/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Fri, 01 Oct 2021 09:53:00 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=4296</guid>

					<description><![CDATA[Apache SpamAssassin is a computer program used to filter email spam. It uses a variety of spam detection techniques including DNS and fuzzy checksum techniques, Bayesian filtering, external programs, blacklists, and online databases. It is released under the Apache License 2.0 and has been part of the Apache Foundation since [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Apache SpamAssassin is a computer program used to filter email spam. It uses a variety of spam detection techniques including DNS and fuzzy checksum techniques, Bayesian filtering, external programs, blacklists, and online databases. It is released under the Apache License 2.0 and has been part of the Apache Foundation since 2004. This program is required for any, even the simplest server, which has mail. The guide is geared towards servers that run Ubuntu. You should also make sure that the 25th port of Smtp is open.</p>



<h2 id="spamassasin-installation-process" >SpamAssasin installation process</h2>



<p>In order to install this program, we recommend the following command:</p>



<pre class="wp-block-code"><code>apt-get install spamassassin spamc -y</code></pre>



<p>The next step is to install the user and disable the login.</p>



<pre class="wp-block-code"><code>adduser spamassasin --disabled-login</code></pre>



<h2 id="configuring-spamassasin" >Configuring SpamAssasin</h2>



<p>Assign spamassassin to the SpamAssassin user account. This is followed by editing the settings</p>



<pre class="wp-block-code"><code>nano /etc/default/spamassassin</code></pre>



<p>It is necessary to find in this directory <strong>ENABLED = 1</strong> Uncomment it by removing the # and changing the value from 1 to 0.</p>



<pre class="wp-block-code"><code>ENABLED=0</code></pre>



<p>Then you need to find the line <strong>OPTIONS = &#8220;- create-prefs &#8211;max-children 5 &#8211;helper-home-dir&#8221;</strong> and make changes. They must include a spamassassin account</p>



<pre class="wp-block-code"><code>OPTIONS="--create-prefs --max-children 5 --username spamassassin --helper-home-dir /home/spamassassin/ -s /home/spamassassin/spamassassin.log"</code></pre>



<p>Then you need to find the line <strong>CRON = 0</strong> and make the same changes as before to get <strong>CRON = 1</strong>. Then save the file. Back up your local SpamAssassin configuration file. </p>



<pre class="wp-block-code"><code>mv /etc/spamassassin/local.cf  /etc/spamassassin/local.cf.bk</code></pre>



<p>Then you need to create a new local SpamAssassin configuration file.</p>



<pre class="wp-block-code"><code>nano /etc/spamassassin/local.cf </code></pre>



<p>Paste the information below into the file.</p>



<pre class="wp-block-code"><code>rewrite_header Subject ***** SPAM _SCORE_ *****
report_safe             0
required_score          5.0
use_bayes               1
use_bayes_rules         1
bayes_auto_learn        1
skip_rbl_checks         0
use_razor2              0
use_dcc                 0
use_pyzor               0
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
endif</code></pre>



<p>The next step is to save the change file and then you can close it.</p>



<h2 id="setting-up-your-postfix" >Setting up your Postfix</h2>



<p>First of all, to start configuring, you need to edit the Postfix configuration file</p>



<pre class="wp-block-code"><code>nano /etc/postfix/master.cf</code></pre>



<p>Next, you need to find the following records, which are presented below:</p>



<pre class="wp-block-code"><code>smtp      inet  n       -       y       -       -       smtpd
#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
submission inet n       -       y       -       -       smtpd</code></pre>



<p>Under <strong>smtp</strong> configuration add SpamAssassin content filter</p>



<pre class="wp-block-code"><code>smtp      inet  n       -       y       -       -       smtpd

-o content_filter=spamassassin
spamassassin unix -     n       n       -       -       pipe
user=spamassassin argv=/usr/bin/spamc -f -e  
/usr/sbin/sendmail -oi -f ${sender} ${recipient}</code></pre>



<p>Next, you should save this file and you can then close it. This is followed by restarting your Postfix and enabling spamassassin to run on your server.</p>



<pre class="wp-block-code"><code>systemctl restart postfix.service
systemctl enable spamassassin.service
systemctl start spamassassin.service</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-install-spamassassin-on-your-ubuntu-vps/feed/</wfw:commentRss>
			<slash:comments>430</slash:comments>
		
		
			</item>
		<item>
		<title>How To Protect Apache Web Server on CentOS 7</title>
		<link>https://help.hostry.com/knowledge-base/how-to-protect-apache-web-server-on-centos-7/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-protect-apache-web-server-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 29 Aug 2019 12:41:21 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=603</guid>

					<description><![CDATA[In case, when an attacker gets access to your server, you may lose all data. If at the initial stage you use simple installations, you still need to secure your server. Install Web Server The first thing we offer you is installing a web server yum install httpd php Personal [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In case, when an attacker gets access to your server, you may lose all data. If at the initial stage you use simple installations, you still need to secure your server.</p>



<h2 id="install-web-server" >Install Web Server</h2>



<p>The first thing we offer you is installing a web server</p>



<p><code>yum install httpd php</code></p>



<h2 id="personal-home-directory-protection" >Personal Home Directory Protection</h2>



<p>The following is protection for your home directories. The first thing to understand is that the directories of other users are classified and not visible to anyone, except for the owners, respectively. </p>



<p>We suggest you change all directories to 700; this is to ensure that only the appropriate home directory owners can view their own files</p>



<pre class="wp-block-code"><code>chmod 700 /home
chmod 700 /home/*
chmod 700 /home/*/*</code></pre>



<h2 id="apply-security-patch-for-the-apache-to-split-user-privileges" >Apply security patch for the Apache to split user privileges</h2>



<p>The first thing to learn we need to first install the repository containing the package with the patch. Run the following commands as root or sudo</p>



<pre class="wp-block-code"><code>yum install epel-release
yum install httpd-itk</code></pre>



<p>Through “<strong>apache2-mpm-itk</strong>” we can see which PHP user should run depending on the virtual host. It adds a new extension in the configuration of <strong><em>AssignUserId virtualhost-user virtualhost-user-group</em></strong>, which allows Apache / PHP to execute user code under a specific user account.</p>



<h2 id="%d1%81reate-a-virtual-host" >Сreate a virtual host </h2>



<p></p>



<p>To<strong> create a virtual host </strong>in Apache, you can follow this example, which is presented below (for example, taken example.com)</p>



<p></p>



<pre class="wp-block-code"><code>NameVirtualHost example.com

&lt;VirtualHost example.com>

DocumentRoot /home/vhost-user/public_html
ServerName example.com
&lt;/VirtualHost></code></pre>



<p>Next, open the text editor <strong>/etc/httpd/conf.d/example-virtualhost.conf</strong> and add the contents above. Here is the command to use nano:</p>



<p><code>nano /etc/httpd/conf.d/example-virtualhost.conf </code></p>



<h2 id="configure-apache-web-server-to-run-as-another-user" >Configure Apache Web Server to run as another user</h2>



<p>After  launched the protection of the Apache / PHP server, the following should be added:</p>



<pre class="wp-block-code"><code>AssignUserId vhost-user vhost-user-group</code></pre>



<p>This will look like an example of a virtual host, after the option is added:</p>



<pre class="wp-block-code"><code>NameVirtualHost example.com

&lt;VirtualHost example.com>

DocumentRoot /home/vhost-user/public_html
ServerName example.com
AssignUserId vhost-user vhost-user-group

&lt;/VirtualHost></code></pre>



<p>Next, you need to Hide the version of Apache. To do this, enter the command:</p>



<pre class="wp-block-code"><code>nano /etc/httpd/conf/httpd.conf</code></pre>



<p>Then in the line “<strong>ServerTokens</strong>” change the parameter after it to “<strong>ProductOnly</strong>”. This tell to Apache only to show that it is “<strong>Apache</strong>” and not “<strong>Apache / 2.2</strong>” or something like that</p>



<p></p>



<p>At the end, restart the Apache server</p>



<pre class="wp-block-code"><code>service httpd restart</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-protect-apache-web-server-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
