<?xml version="1.0"?>
<rss version="2.0"><channel><title>Various tutorials Latest Topics</title><link>https://www.lcwhost.org/forum/18-various-tutorials/</link><description>Various tutorials Latest Topics</description><language>en</language><item><title>How to manage your Storage Server</title><link>https://www.lcwhost.org/topic/62-how-to-manage-your-storage-server/</link><description><![CDATA[<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">All Storage Servers is activated with a pre-installed special OS template -<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">"Filer (CentOS 7, Rsync, FTP, Samba) (64-bit)"</b><span style="background-color:#ffffff;color:#333333;font-size:14px;">.</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">Take a note, that default folder for data storage in the Storage Server is<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">/home/storage</b><span style="background-color:#ffffff;color:#333333;font-size:14px;">.</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">"Filer" OS template have pre-installed services and tools like:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">• Rsync tool</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">• FTP (vsFTPd) service</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">• Samba (smbclient, smbd) service</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<b style="background-color:#ffffff;color:#333333;font-size:14px;">1. Rsync usage</b><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">1.1. You can securely sync data between the target server and the Storage Server by using SSH keys. Instructions on how to do that:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">a. Generate SSH key on the target server (not the Storage Server!):</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">ssh-keygen -f ~/.ssh/id_rsa -q -P ""</code><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">b. Copy created SSH key to the Storage Server from the target server:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">ssh-copy-id -i /root/.ssh/id_rsa.pub root@storage_server_IP</code><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">c. Test the connection between the target server and the Storage Server. Execute this command from the target server:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /home storage_server_IP:/home/storage </code><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<b style="background-color:#ffffff;color:#333333;font-size:14px;">2. FTP usage</b><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">2.1. "Filer" OS template have FTP service (vsFTPd) installed and ready to use. You can easily log in by using any popular FTP client.</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">Example login details:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">FTP hostname:<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">xxxx.lcwhost.net</b><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">Username:<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">root</b><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">Password:<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">root_user_password</b><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">Port:<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">21</b><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<b style="background-color:#ffffff;color:#333333;font-size:14px;">3. SAMBA usage</b><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">3.1. Login to the Storage Server SAMBA from another Linux systems:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">smbclient //xxxx.lcwhost.net/storage -U root</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">3.2. In order to connect (mount) Storage Server and Windows systems (to use it as attached storage) use this guide:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<a href="https://support.microsoft.com/en-gb/help/4026635/windows-map-a-network-drive" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;">https://support.microsoft.com/en-gb/help/4026635/windows-map-a-network-drive</a><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">(In "Folder" put your server hostname. For example::<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">\\xxxx.lcwhost.net</b><b style="background-color:#ffffff;color:#333333;font-size:14px;">\Storage</b><span style="background-color:#ffffff;color:#333333;font-size:14px;">)</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">3.3. In order to connect (mount) Storage Server and<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">MAC OS</b><span style="background-color:#ffffff;color:#333333;font-size:14px;"><span> </span>systems (to use it as attached storage) use this guide:</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<a href="https://support.apple.com/en-us/HT204445" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;">https://support.apple.com/en-us/HT204445</a><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">(In "Server Address" enter your server hostname. For example:<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">smb://xxxx.lcwhost.net\Storage</b><span style="background-color:#ffffff;color:#333333;font-size:14px;">)</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<b style="background-color:#ffffff;color:#333333;font-size:14px;">Note</b><span style="background-color:#ffffff;color:#333333;font-size:14px;">: Storage Server is designed for archiving non-critical data (e.g. backups), therefore additional backups are not being done. The customer is responsible for data recovery (e.g. from secondary storage) in the event of unlikely RAID6 failure (when 3 or more hard drives fail at the same time).</span>
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">62</guid><pubDate>Sun, 11 Jun 2023 16:50:58 +0000</pubDate></item><item><title>How to install PostgreSQL on Ubuntu 20.04?</title><link>https://www.lcwhost.org/topic/61-how-to-install-postgresql-on-ubuntu-2004/</link><description><![CDATA[<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	PostgreSQL (Postgres) is an open-source general-purpose object-relational database management system with numerous advanced capabilities that allows you to build fault-tolerant systems or complex applications.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	In this tutorial, you will see how you can install PostgreSQL on Ubuntu 20.04.
</p>

<ol style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Connect to your server and run system updates:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo apt update</code>
</p>

<ol start="2" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		After that, install the Postgres package together with a -contrib package that adds some additional utilities and functionality:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo apt install postgresql postgresql-contrib</code>
</p>

<ol start="3" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Then make sure that the service is running:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo systemctl start postgresql.service</code>
</p>

<ol start="4" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		PostgreSQL uses a concept called “roles” to handle authorization and authentication, by default.
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo -i -u postgres</code>
</p>

<ol start="5" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		So you can access the Postgres prompt with the command:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">psql</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	It will log you into the PostgreSQL prompt, and you will be able to interact with the database management system.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	To exit out of the PostgreSQL prompt, you can use this command:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">\q</code>
</p>

<ol start="6" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		If you are logged in as the postgres account, you can create a new role by running:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">createuser --interactive</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Then you will need to enter the name of the new role and make the role as superuser.
</p>

<ol start="7" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Another default assumption of the Postgres authentication system is that each role used to log in will have a database with the same name that it can access.
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	This implies that if the user you established in the previous section is named, for example, test, the role will attempt to connect to a database named test by default. The createdb command can be used to construct the necessary database.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If you're logged in as the postgres account, you can use this command:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">createdb test</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If you want to use sudo for each command without switching from your normal account, you can use the following command:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo -u postgres createdb test</code>
</p>

<ol start="8" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		You'll need a Linux user with the same name as your Postgres role and database to log in with ident based authentication.
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If you don't have a matching Linux user, use the adduser command to create one. You must do the following using a non-root account with sudo access (not as the postgres user):
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo adduser test</code>
</p>

<ol start="9" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Then the new account is created, you can either switch over and connect to the database by running these commands:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo -i -u sammy</code><br />
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">psql</code>
</p>

<ol start="10" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		However, if you want your user to connect to a different database, you can do that by specifying the database:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">psql -d postgres</code>
</p>

<ol start="11" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		After running that command, you can check your current connection information by running this command:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">\conninfo</code>
</p>
]]></description><guid isPermaLink="false">61</guid><pubDate>Sun, 11 Jun 2023 16:47:19 +0000</pubDate></item><item><title>Basic steps in how to troubleshoot for SSH</title><link>https://www.lcwhost.org/topic/52-basic-steps-in-how-to-troubleshoot-for-ssh/</link><description><![CDATA[<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If there is an issue with SSH on your VPS, this guide will provide basic steps to investigate SSH connection issue.
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	VPS Password Is Not Correct
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If you cannot connect to your VPS with your current VPS password, or you forgot it, you can connect to our client area and reset your VPS root password. Here is a<span> </span><a href="https://www.time4vps.com/knowledgebase/change-vps-root-password/" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;" title="guide">guide<span> </span></a>how to do it.
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	Unresponsive SSH Connection
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If your SSH connection attempts are timing out or are being immediately rejected, then your SSH service might not be running, or your firewall might block SSH connections.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	So you can connect to your VPS via<span> </span><a href="https://www.time4vps.com/knowledgebase/activate-web-console/" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;" title="Emergency Console">Emergency Console</a>.
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	How To Check SSH Status?
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	To check your SSH service status, you need to connect to your VPS and run one of these commands:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	1) Ubuntu 16.04+, Debian 8+, CentOS 7+, etc:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo systemctl status sshd -l</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	2) CentOS 6:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo service sshd status</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	3) Ubuntu 14.04, Debian 7
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo service ssh status</code>
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	How To Restart SSH Service?
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If the output shows that your SSH is not running, then try to restart your SSH:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo systemctl restart sshd</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	CentOS 6:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo service sshd restart</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Ubuntu 14.04, Debian 7:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo service ssh restart</code>
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	How To Check SSH Logs?
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If it won't help, then check your VPS logs of SSH::
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo journalctl -u sshd -u ssh</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	CentOS 6
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">less /var/log/secure</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Ubuntu 14.04, Debian 7
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">less /var/log/auth.log</code>
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	SSH Is Running On A Non-Standard Port
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If SSH status is active, make sure on what port SSH service is running. Run<span> </span><strong>netstat</strong><span> </span>on your server to check which port is used by SSH. For this, you can use this command:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo netstat -plntu | grep ssh</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<a href="https://community.time4vps.com/uploads/editor/1y/zgb12pe77k82.png" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;"><img alt="zgb12pe77k82.png" style="border:0px;font-size:14px;padding:0px;vertical-align:middle;" title="" width="1000" src="https://community.time4vps.com/uploads/editor/1y/zgb12pe77k82.png" loading="lazy" height="130"></a>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	By default, SSH service runs on 22 port, but if you see a different port, then try to connect to your VPS via SSH by using that port:
</p>

<blockquote style="border-left-color:rgba(0,0,0,0.1);border-left-style:solid;border-width:0px 0px 0px 4px;color:#333333;font-size:17.5px;padding:1ex 16px;vertical-align:baseline;">
	<div style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
		<p style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
			ssh<span> </span>username@IP_address -p port
		</p>
	</div>
</blockquote>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	The Same Port Is Used By More Than One Service
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If SSH service is running on your VPS, but you still cannot connect through SSH, then check your logs, to make sure that another service is not bounded on the same port as SSH. If in the logs, you see this message:
</p>

<blockquote style="border-left-color:rgba(0,0,0,0.1);border-left-style:solid;border-width:0px 0px 0px 4px;color:#333333;font-size:17.5px;padding:1ex 16px;vertical-align:baseline;">
	<div style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
		<p style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
			Bind to port 22 on 0.0.0.0 failed: Address already in use.
		</p>
	</div>
</blockquote>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Then it means that another service on your server is already using the same port that SSH binds to. So this is a reason why SSH you cannot connect to your VPS via SSH. There are some ways to solve this issue:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>1) Bind SSH service to a different port:</strong>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<a href="https://community.time4vps.com/discussion/520/beginners-how-to-change-ssh-port-on-linux-vps/p1" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;" title="Here is a guide how to do that.">Here is a guide how to do that.</a>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>2) Stop the other service:</strong>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Use netstat command to check which other process is using the same port (as an example, we use 22 port);
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo netstat -plntu | grep :22</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Then stop that process:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo systemctl stop some-other-service</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo systemctl disable some-other-service</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Or simply kill the process using the process ID listed next to the process name when you check processes with the command - netstat.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>3) Change other service port to a different port:</strong>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Again use netstat command to find what service is bound to the same port. Then, change the configuration for that service to use a different port. Ater that, you need to restart SSH service.
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	Misconfigured Firewall Rules For SSH Service
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If you can start the SSH service successfully, but your connections still time out or are rejected, then review your firewall rules. It might e that you have blocked SSH connection on your firewall.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	To check that, you can review your current firewall ruleset:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo iptables-save # displays IPv4 rules</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo ip6tables-save # displays IPv6 rules</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Also, if you have configured on your VPS FirewallD or UFW, make sure if you are running either package with these commands:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo ufw status</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo firewall-cmd --state</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	when the rules will be listed, make sure that your rule for SSH looks something like this:
</p>

<blockquote style="border-left-color:rgba(0,0,0,0.1);border-left-style:solid;border-width:0px 0px 0px 4px;color:#333333;font-size:17.5px;padding:1ex 16px;vertical-align:baseline;">
	<div style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
		<p style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
			-A INPUT -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT
		</p>
	</div>
</blockquote>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	The rule says that you allow SSH connection in your VPS.
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	Disabling Firewall Rules
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Additionally, for some time, you might to disable the firewall on your VPS to be sure that it is not a reason why you cannot connect to your VPS via SSH.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Note 1:</strong><span> </span>The disabled firewall increases the security risk on your VPS, so make sure that you will re-enable it after you investigate your firewall configuration.
</p>

<ol style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		To do that, you can create a backup of your VPS firewall rules:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo iptables-save &gt; ~/iptables.txt</code>
</p>

<ol start="2" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Then set the INPUT, FORWARD and OUTPUT packet policies as ACCEPT:
	</li>
</ol>

<blockquote style="border-left-color:rgba(0,0,0,0.1);border-left-style:solid;border-width:0px 0px 0px 4px;color:#333333;font-size:17.5px;padding:1ex 16px;vertical-align:baseline;">
	<div style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
		<p style="border:0px;font-size:17.5px;padding:0px;vertical-align:baseline;">
			sudo iptables -P INPUT ACCEPT<br>
			sudo iptables -P FORWARD ACCEPT<br>
			sudo iptables -P OUTPUT ACCEPT
		</p>
	</div>
</blockquote>

<ol start="3" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		After that, you need to flush the nat table that is consulted when a packet that creates a new connection is encountered:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo iptables -t nat -F</code>
</p>

<ol start="4" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		further, you need to flush the mangle table too that is used for specialized packet alteration:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo iptables -t mangle -F</code>
</p>

<ol start="5" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		And additionally flush all the chains in the table:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo iptables -F</code>
</p>

<ol start="6" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		In the end, delete every non-built-in chain in the table:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">sudo iptables -X</code>.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Note 2:</strong><span> </span>You might need to do all these steps with ip6tables command to flush your IPv6 rules.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Note 3:</strong><span> </span>Do not miss to use a different name for the IPv6 rules file.
</p>

<h3 style="background-color:#ffffff;border:none;color:#555a62;font-size:24px;padding:0px;vertical-align:baseline;">
	Rejected SSH Logins
</h3>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If SSH is listening and accepting connections but is rejecting login attempts, you should check logs of rejected attempts.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Also, make sure that logins are not disabled for the root user. It can be checked with the command:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">grep PermitRootLogin /etc/ssh/sshd_config</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Note 4:</strong><span> </span>If the value of the PermitRootLogin is no, then try logging in with another user. Or, set the value in<span> </span><strong>/etc/ssh/sshd_config</strong><span> </span>to yes. After that, you need to restart SSH, and try logging in as root again.
</p>
]]></description><guid isPermaLink="false">52</guid><pubDate>Wed, 10 May 2023 17:46:00 +0000</pubDate></item><item><title>How to Install CyberPanel</title><link>https://www.lcwhost.org/topic/7-how-to-install-cyberpanel/</link><description><![CDATA[<div style="background-color:#f5f5f5;color:#2c2227;font-size:16px;text-align:left;">
	<p style="font-size:1em;">
		Follow these steps to install CyberPanel on Ubuntu or Enterprise-based distros.
	</p>

	<ol style="border:1px solid #cccccc;padding:20px 20px 20px 78px;">
		<li style="padding:5px 10px;">
			<a href="https://www.lcwhost.org/topic/8-how-to-connect-to-your-server-with-ssh/" rel="">Log into SSH</a>.
		</li>
		<li style="padding:5px 10px;">
			Run the CyberPanel installation script:
			<pre style="color:#212529;font-size:14px;padding:10px;"><span>sh &lt;(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)</span></pre>
		</li>
		<li style="padding:5px 10px;">
			Type “1” and<span> </span><kbd style="background-color:#212529;color:#ffffff;font-size:14px;padding:0.2rem 0.4rem;">Enter</kbd><span> </span>to confirm installation.
		</li>
		<li style="padding:5px 10px;">
			Choose “1” to install CyberPanel with OpenLiteSpeed. Remember, you’ll need a LiteSpeed Enterprise license for the Enterprise version.
		</li>
		<li style="padding:5px 10px;">
			Choose “Y” to install “full service for CyberPanel” – PowerDNS server, Postfix mail transfer agent (MTA), and Pure-FTPd server.
		</li>
		<li style="padding:5px 10px;">
			Choose “N” to skip remote MySQL setup and continue with local MySQL server setup.
		</li>
		<li style="padding:5px 10px;">
			Choose the latest MySQL version unless you’ll be importing a database that requires a specific, older version.
		</li>
		<li style="padding:5px 10px;">
			Choose “s” to set an admin password.
		</li>
		<li style="padding:5px 10px;">
			Type and confirm your admin password.
		</li>
		<li style="padding:5px 10px;">
			Choose whether to install<span> </span><span>Memcached</span><span> </span>and its PHP extension. You can always install this later if you don’t need it right now.
		</li>
		<li style="padding:5px 10px;">
			Decide whether to install Redis and its PHP extension. Again, you can install this post-installation.
		</li>
		<li style="padding:5px 10px;">
			Choose whether to install<span> </span><a href="https://linuxhint.com/linux-kernel-watchdog-explained/" rel="external nofollow">WatchDog</a>, currently in beta, which automatically reboots downed systems with software errors. If you’re on a production system and unsure about this, we recommend denying this. 
		</li>
		<li style="padding:5px 10px;">
			The installation may take up to ten minutes. Afterwards, save the auto-generated LiteSpeed WebAdmin console password and Rainloop Webmail admin password in a<span> </span><span>password manager</span>. The admin username for each login is “admin.”
		</li>
		<li style="padding:5px 10px;">
			Ubuntu users must choose “N” when asked to reboot the system.<br>
			<br>
			CentOS, AlmaLinux, and other Enterprise-based distro users may select “Y” and continue to the next section.
		</li>
		<li style="padding:5px 10px;">
			(Ubuntu users) Due to Ubuntu-specific issues, you’ll need to stop and disable Firewalld:
			<pre style="color:#212529;font-size:14px;padding:10px;"><span>systemctl stop firewalld &amp;&amp; systemctl disable firewalld</span></pre>
		</li>
		<li style="padding:5px 10px;">
			Restart the system:
			<pre style="color:#212529;font-size:14px;padding:10px;"><span>reboot</span></pre>
		</li>
	</ol>

	<p style="background-color:#d1ecf1;border:1px solid #bee5eb;color:#0c5460;font-size:1em;padding:0.75rem 1.25rem;">
		Contact CyberPanel developers directly regarding Ubuntu firewall issues.
	</p>

	<h3 style="font-size:1.5em;">
		Log into CyberPanel
	</h3>

	<p style="font-size:1em;">
		The URL to access your CyberPanel installation in the web browser is:
	</p>

	<pre style="color:#212529;font-size:14px;padding:10px;"><span>https://your-server-hostname:8090</span></pre>

	<p style="font-size:1em;">
		Username: admin
	</p>

	<p style="font-size:1em;">
		Password: the same password you set during initial setup.
	</p>
	<a class="ipsAttachLink ipsAttachLink_image" href="https://www.lcwhost.org/uploads/monthly_2025_01/cyberpanel-login.webp.18c3c40bd519c2e07cd342e2ea3100b2.webp" data-fileid="9" data-fileext="webp" rel=""><img class="ipsImage ipsImage_thumbnailed" data-fileid="9" width="1000" alt="cyberpanel-login.thumb.webp.2283e74c461d1db01d8bf7fa8ef229b6.webp" src="https://www.lcwhost.org/uploads/monthly_2025_01/cyberpanel-login.thumb.webp.2283e74c461d1db01d8bf7fa8ef229b6.webp" loading="lazy" height="560"></a>

	<p style="font-size:1em;">
		The dashboard shows buttons for primary functions with system resource usage stats on the right.
	</p>

	<p style="font-size:1em;">
		The top-right options grant quick access to various CyberPanel user communities.
	</p>

	<p style="font-size:1em;">
		The sidebar on the left lists primary sections which expand to show additional options when clicked. 
	</p>
	<a class="ipsAttachLink ipsAttachLink_image" href="https://www.lcwhost.org/uploads/monthly_2025_01/cyberpanel-dashboard-1024x576.webp.30b65ad4ba00e57e345092e2a2d066d2.webp" data-fileid="8" data-fileext="webp" rel=""><img class="ipsImage ipsImage_thumbnailed" data-fileid="8" width="1000" alt="cyberpanel-dashboard-1024x576.thumb.webp.80233a51481427ee829a9e2fd14f63e5.webp" src="https://www.lcwhost.org/uploads/monthly_2025_01/cyberpanel-dashboard-1024x576.thumb.webp.80233a51481427ee829a9e2fd14f63e5.webp" loading="lazy" height="560"></a>

	<h2 style="color:#961b1e;font-size:2.6em;">
		Learning Your CyberPanel Installation
	</h2>

	<p style="font-size:1em;">
		Here are some ideas to help you get started:
	</p>

	<ul>
		<li>
			Configure automatic CyberPanel backups
		</li>
		<li>
			Create SSL certificates for the CyberPanel panel domain name
		</li>
		<li>
			Create regular users to manage websites
		</li>
		<li>
			Create a WordPress site in just a few clicks
		</li>
	</ul>

	<p style="font-size:1em;">
		The terminal command below resets your CyberPanel admin password. A space is added at the beginning to prevent the password from showing in bash history. Furthermore, we recommend using a simple password to ensure the process works. After you login, change the admin password to a stronger one.
	</p>

	<pre style="color:#212529;font-size:14px;padding:10px;"><span> adminPass password!</span></pre>

	<h3 style="font-size:1.5em;">
		Log into OpenLiteSpeed WebAdmin Console
	</h3>

	<p style="font-size:1em;">
		Manage LiteSpeed web server settings from the web interface at: 
	</p>

	<pre style="color:#212529;font-size:14px;padding:10px;"><span>https://your-server-hostname:7080</span></pre>

	<p style="font-size:1em;">
		The username is “admin.”
	</p>
	<img alt="openlitespeed-login.webp.be06516751f8d3ef6b6ff56a9c27642d.webp" class="ipsImage ipsImage_thumbnailed" data-fileid="7" style="height:auto;" width="452" src="https://www.lcwhost.org/uploads/monthly_2025_01/openlitespeed-login.webp.be06516751f8d3ef6b6ff56a9c27642d.webp" loading="lazy" height="433.92">
	<p style="font-size:1em;">
		To reset your LiteSpeed console password, open a terminal session and run the following command:
	</p>

	<pre style="color:#212529;font-size:14px;padding:10px;"><span>sudo /usr/local/lsws/admin/misc/admpass.sh </span></pre>

	<p style="font-size:1em;">
		Press<span> </span><kbd style="background-color:#212529;color:#ffffff;font-size:14px;padding:0.2rem 0.4rem;">Enter</kbd><span> </span>to reset the default user – “[admin].”
	</p>

	<p style="font-size:1em;">
		Enter and confirm the new password.
	</p>

	<h3 style="font-size:1.5em;">
		Log into Rainloop WebMail
	</h3>

	<p style="font-size:1em;">
		Access the Rainloop webmail web interface at: 
	</p>

	<pre style="color:#212529;font-size:14px;padding:10px;"><span>https://your-server-hostname:8090/snappymail/?admin</span></pre>

	<p style="font-size:1em;">
		The username is “admin.”
	</p>

	<ol style="border:1px solid #cccccc;padding:20px 20px 20px 78px;">
		<li style="padding:5px 10px;">
			To reset the Rainloop admin password, edit the configuration file:
			<pre style="color:#212529;font-size:14px;padding:10px;"><span>nano /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/application.ini</span></pre>
		</li>
		<li style="padding:5px 10px;">
			Add the following:
			<pre style="color:#212529;font-size:14px;padding:10px;"><span>[security]
admin_password = "12345"</span></pre>
		</li>
		<li style="padding:5px 10px;">
			Save the settings.
		</li>
		<li style="padding:5px 10px;">
			Login and change the password immediately.
		</li>
	</ol>

	<p style="background-color:#fff3cd;border:1px solid #ffeeba;color:#856404;font-size:1em;padding:0.75rem 1.25rem;">
		During testing, we were unable to reset the Rainloop admin password in Ubuntu. Further research showed that many users have similar issues. Contact CyberPanel developers directly for additional assistance.
	</p>

	<p style="font-size:1em;">
		Don’t forget to regularly check for server<span> </span><span>updates</span>.
	</p>

	<p style="font-size:1em;">
		Check out our Support Center to learn more about managing your cloud server.
	</p>

	<div style="background-color:#d1ecf1;border:1px solid #bee5eb;color:#0c5460;padding:0.75rem 1.25rem;">
		With our<span> </span><a href="https://www.lcwhost.com/linux-vps-server/" rel="external nofollow">Cloud VPS plans</a>, you can deploy a lightning-fast, reliable cloud platform with built-in redundancy – ensuring the availability of your environment!
	</div>
</div>

<p>
	This entry was posted in<span> </span><a href="https://www.inmotionhosting.com/support/edu/cyberpanel/" rel="external nofollow">CyberPanel</a>.
</p>
]]></description><guid isPermaLink="false">7</guid><pubDate>Sat, 04 Feb 2023 07:10:26 +0000</pubDate></item><item><title>How to identify attacks on your server and mitigate it.</title><link>https://www.lcwhost.org/topic/5-how-to-identify-attacks-on-your-server-and-mitigate-it/</link><description><![CDATA[<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	This article explains how to check if your server is facing an attack and how to manage it. The steps below are the suggestions that you can use to check your server and see if it could be under some sort of attack.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	One of the first things you could do in case you feel the server/website and its tasks are running slowly is to simply check your server load, it could be done with the  following commands:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If you are not sure or you don't know, you can find out the number of processors using these commands:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">grep processor /proc/cpuinfo | wc -l</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">nproc</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	These commands will show just a number of your processors on the server. For example 1, 2, 4 and etc
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Now you can check the server load using the other commands:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">uptime</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">cat /proc/loadavg</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	The result of this command is very simple, but you could notice some anomalies here. An example of the uptime command output:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<a href="https://community.time4vps.com/uploads/editor/73/88kq80tt5ah3.png" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;"><img alt="88kq80tt5ah3.png" style="border:0px;font-size:14px;padding:0px;vertical-align:middle;" title="" width="678" src="https://community.time4vps.com/uploads/editor/73/88kq80tt5ah3.png" loading="lazy" height="13.56"></a>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	The output of the command shows how long is your server is up, how many users are currently logged in, and the load average, which provides values of 1 minute, 5 minutes, and 15 minutes. Considering we have 1 processor, the load values seem normal and not out of the ordinary. However, if the load average would be something like 1.50, 2.23, 8.14, this could be identified as a potential issue. The 1.00 stands for 100% of CPU utilization. So if the values are 1.50, 2.23, 8.14, they could be read as follows:
</p>

<ul style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		1.50 meaning that the CPU is overloaded by 50% during the last 1 minute;
	</li>
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		2.23 meaning that the CPU is overloaded by 123% during the last 5 minutes;
	</li>
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		8.14 meaning that the CPU is overloaded by 714% during the last 15 minutes.
	</li>
</ul>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	While 50% or even 123% in this short time could be acceptable, the 3rd value should raise a concern. However, seeing the values decreasing could translate that the 'issue' is disappearing. While if the load values were 8.14, 2.23, 1.50 this could say that the load is just increasing right now.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	The load values could show a potential issue regarding the server being attacked. The server load can rise according to the requests/traffic your server receives, however it could not be related to attacks at all, so we should check further and the next step is network traffic.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	In a Linux environment, we could use<span> </span><strong>netstat.</strong><span> </span>This command could help to monitor the network and identifying possible issues. Here are a few general commands:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	The command shows the number of connections each IP has with the server. It helps to identify the IPs that are connecting to the server most often. A single IP could be accessing your server a few times. For example, if you host some online resources, it might be normal to receive multiple connections from the same IP, as some smaller companies or networks with a shared IP are accessing your online resource. So you should include these possibilities depending on your server. However, let's say that one IP has 100+ connections to your server, this might seem suspicious and you should recheck it.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">netstat -ntu|awk '{print $5}'|cut -d: -f1 -s|sort|uniq -c|sort -nk1 -r</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	A few more netstat commands for general monitoring.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	This command shows all the active connections to the server:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">netstat -na</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	This command shows all the specific traffic(in example port :80) by IPs :
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">netstat -an | grep :80 | sort</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	This command shows the number of connections by IP via TCP and UDP ports:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	All these commands as well as other options that netstat provides can help you to identify if there is something incorrect on your server network.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Now let's say you visited your website and noticed it runs slowly, you get 5xx errors. You then access the server and notice it's responding slower than usual - this could be a moment you can start checking your server load first. It could confirm something is wrong if the load is heavy. Then you could check the connections to your server and perhaps identify that a few IPs are connecting to the server hundreds of times. If these IPs are unknown, this could be considered as an attack against your server.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	The next phase should be mitigating the attacks. Here are a few methods on how to do that.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	If you noticed an unknown IP or a few that are just generating connections to your server and you want to stop that, you can block it using<span> </span><strong>iptables</strong>, for example:
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">iptables -A INPUT -s 111.11.1.1 -j DROP(or REJECT)</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">service iptables save</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">service iptables restart</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	More information about how to use iptables in this tutorial.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Another thing is if you stopped everything, but yet the server is slow, there could be many Apache processes stuck due to previous connection attempts, you may try to simply kill them all and then start the Apache freshly(this usually takes ups to a few minutes or quicker):
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">killall -KILL httpd</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">service httpd start</code>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Note.</strong><span> </span>This article is a simple way to check and try to find out if your server is under attack when you have any suspicions. There are many other tools, methods, and procedures that you can use as well. This is just something to get you started.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	 
</p>
]]></description><guid isPermaLink="false">5</guid><pubDate>Thu, 02 Feb 2023 06:45:59 +0000</pubDate></item><item><title>Commands to Manage Exim Mail Server</title><link>https://www.lcwhost.org/topic/4-commands-to-manage-exim-mail-server/</link><description><![CDATA[<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">We can easily manage Exim via command line. We can easily remove mailqueues, If any particular user sending large number of emails we can easily find that account and remove it.</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">All sent mails is registered in directory<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">/var/spool/exim/msglog</b><span style="background-color:#ffffff;color:#333333;font-size:14px;"><span> </span>and all records have their own ID number which is the same as message ID. In directory<span> </span></span><b style="background-color:#ffffff;color:#333333;font-size:14px;">/var/spool/exim/input</b><span style="background-color:#ffffff;color:#333333;font-size:14px;"><span> </span>all records are marked after their ID with mark -H (header) and -D (content of message). For every sent message Exim creates 3 files. We wil be working with</span><b style="background-color:#ffffff;color:#333333;font-size:14px;"><span> </span></b><span style="background-color:#ffffff;color:#333333;font-size:14px;">mentioned directories</span><b style="background-color:#ffffff;color:#333333;font-size:14px;">.<b> </b></b><br />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">1. To get counted message in the queue:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -bpc</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">2. Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -bp</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">3. Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -bp | exiqsumm</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">4. Print what Exim is doing right now:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiwhat</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">5. Testing how e-mail address is pointed:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -bt mail@domain.com</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">6. Run a pretend SMTP transaction from the command line, as if it were coming from the given IP address. This will display Exim's checks, ACLs, and filters as they are applied. The message will NOT actually be delivered</span><b style="background-color:#ffffff;color:#333333;font-size:14px;">:</b>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -bh XXX.XXX.XX.XX</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">7. Display all of Exim's configuration settings:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -bP
</pre>

<h2 style="background-color:#ffffff;border:0px;color:#555a62;font-size:30px;padding:0px;vertical-align:baseline;">
	Searching the queue with exiqgrep
</h2>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">Exim includes a utility that is quite nice for grepping through the queue, called exiqgrep.</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">1. Use -f to search the queue for messages from a specific sender:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -f <a href="https://community.time4vps.com/profile/domain" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:13px;padding:0px;vertical-align:baseline;">@domain</a></pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">2. Use -r to search the queue for messages for a specific recipient/domain:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -r <a href="https://community.time4vps.com/profile/domain" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:13px;padding:0px;vertical-align:baseline;">@domain</a></pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	3. Use -o to print messages older than the specified number of seconds. For example, messages older than 1 day:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -o 86400 [...]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	4. Use -y to print messages that are younger than the specified number of seconds. For example, messages less than an hour old:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -y 3600 [...]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	5. Use -s to match the size of a message with a regex. For example, 700-799 bytes:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -s '^7..$' [...]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	Use -z to match only frozen messages, or -x to match only unfrozen messages. There are also a few flags that control the display of the output.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	6. Use -i to print just the message-id as a result of one of the above two searches:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -i [ -r | -f ] ...</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	7. Use -c to print a count of messages matching one of the above searches:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -c ...</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	8. Print just the message-id of the entire queue:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -i
</pre>

<h2 style="background-color:#ffffff;border:0px;color:#555a62;font-size:30px;padding:0px;vertical-align:baseline;">
	Managing the queue
</h2>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	1. Start a queue run
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -q -v</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	2. Start a queue run for just local deliveries:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -ql -v</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	3. Remove a message from the queue:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mrm &lt;message-id&gt; [ &lt;message-id&gt; ... ]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	4. Freeze a message:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mf &lt;message-id&gt; [ &lt;message-id&gt; ... ]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	5. Throw a message:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mt &lt;message-id&gt; [ &lt;message-id&gt; ... ]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	6. Deliver a message, whether it's frozen or not, whether the retry time has been reached or not:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -M &lt;message-id&gt; [ &lt;message-id&gt; ... ]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	7. Deliver a message, but only if the retry time has been reached:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mc &lt;message-id&gt; [ &lt;message-id&gt; ... ]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	8. Force a message to fail and bounce as "cancelled by administrator":
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mg &lt;message-id&gt; [ &lt;message-id&gt; ... ]</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	9. Remove all frozen messages:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -z -i | xargs exim -Mrm</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	10. Remove all messages older than five days (86400 * 5 = 432000 seconds):
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -o 432000 -i | xargs exim -Mrm</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	11. Freeze all queued mail from a given sender:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exiqgrep -i -f luser@example.tld | xargs exim -Mf</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	12. View a message's headers:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mvh &lt;message-id&gt;</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	13. View a message's body:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mvb &lt;message-id&gt;</pre>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	14. View a message's logs:
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exim -Mvl &lt;message-id&gt;
</pre>

<h2 style="background-color:#ffffff;border:0px;color:#555a62;font-size:30px;padding:0px;vertical-align:baseline;">
	Digging Into Exim Mail Logs With Exigrep
</h2>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">One single mail transaction will span multiple lines in the file, and not every line will have the search string you are looking for. The<span> </span></span><strong style="background-color:#ffffff;color:#333333;font-size:14px;">exigrep</strong><span style="background-color:#ffffff;color:#333333;font-size:14px;"><span> </span>command works around this problem by finding your search string in transactions, and then helpfully gathering every log entry into separate, complete transactions.</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<b style="background-color:#ffffff;color:#333333;font-size:14px;">1.<span> </span></b><span style="background-color:#ffffff;color:#333333;font-size:14px;">Search for messages sent from a particular IP address:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exigrep '&lt;= .* \[12.34.56.78\] ' /path/to/exim_log</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">2. search for messages sent to a particular IP address:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">exigrep '=&gt; .* \[12.34.56.78\] ' /path/to/exim_log</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">This is how you search for outgoing messages with the “=&gt;” symbol that are sent to “</span><span style="background-color:#ffffff;color:#333333;font-size:14px;">mail@domain.com</span><span style="background-color:#ffffff;color:#333333;font-size:14px;">”. The pipe to grep for the “&lt;=” symbol will only match lines containing information on the sender, the From address, the sender’s IP address, the message size, the message ID, and the subject line if you have enabled logging the subject.</span><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">3. Generate and display Exim stats from a logfile:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">eximstats /path/to/exim_mainlog</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">4. Same as above, with less verbose output:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">eximstats -ne -nr -nt /path/to/exim_mainlog</pre>

<p>
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">5.To delete all queued messages containing a certain string in the body:</span>
</p>

<pre style="border:1px solid #cccccc;color:#333333;font-size:13px;padding:9.5px;vertical-align:baseline;">grep -lr 'a certain string' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm</pre>

<p>
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">--<span> </span></span><a href="https://www.exim.org/" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;">http://www.exim.org/</a><br style="background-color:#ffffff;color:#333333;font-size:14px;" />
	<span style="background-color:#ffffff;color:#333333;font-size:14px;">--<span> </span></span><a href="https://www.exim.org/docs.html" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;">http://www.exim.org/docs.html</a>
</p>
]]></description><guid isPermaLink="false">4</guid><pubDate>Thu, 02 Feb 2023 06:42:04 +0000</pubDate></item><item><title>DirectAdmin installation Linux</title><link>https://www.lcwhost.org/topic/3-directadmin-installation-linux/</link><description><![CDATA[<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	This tutorial explains how to manually install DirectAdmin with a license on a Linux server from the command line(SSH).
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Requirements</strong>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	* DirectAdmin license * One of the following OS templates installed: CentOS 7, CentOS 8, Debian 8, Debian 9, Debian 10, Debian 11
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Installation</strong>
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	DirectAdmin installation is very simply you simply, here are the basic steps:
</p>

<ol style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Connect to your Linux server via SSH;
	</li>
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Enter the following installation command:
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<code style="border:1px solid #eeeecc;color:#c7254e;font-size:12.6px;padding:2px 4px;vertical-align:baseline;">bash &lt;(curl -Ss <a href="https://www.directadmin.com/setup.sh" rel="external nofollow">https://www.directadmin.com/setup.sh</a> || wget -O - <a href="https://www.directadmin.com/setup.sh)" rel="external nofollow">https://www.directadmin.com/setup.sh)</a></code>
</p>

<ol start="3" style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<li style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">
		Once the command is executed, a download will start, shortly after you will be prompted to enter your license key. Enter your DirectAdmin license key and proceed.
	</li>
</ol>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	That is it, once the installation is complete, DirectAdmin can be accessed at<span> </span><em style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;"><a href="http://server.ip.address:2222/" rel="external nofollow" style="border:0px;color:#ed1c24;font-size:14px;padding:0px;vertical-align:baseline;">http://server.ip.address:2222</a></em>.
</p>

<p style="background-color:#ffffff;border:0px;color:#333333;font-size:14px;padding:0px;vertical-align:baseline;">
	<strong>Important.</strong><span> </span>Use the Admin username/password provided by the file:<span> </span><em style="border:0px;font-size:14px;padding:0px;vertical-align:baseline;">/usr/local/directadmin/scripts/setup.txt</em>
</p>
]]></description><guid isPermaLink="false">3</guid><pubDate>Thu, 02 Feb 2023 06:39:56 +0000</pubDate></item></channel></rss>
