Archive

Urgent/ The latest details of the accident involving the helicopter of the President of Iran, Ebrahim Raisi

News about the incident of the helicopter of the President of Iran Ebrahim Raisi and his companions have been published around Varzeghan. The president and his entourage usually use a Mil 17 or Bell 214 helicopter, which appears to have been a Bell 214 helicopter this time. Ebrahim Raisi, Al-Hashem Imam of Tabriz, Amir Abdullahian, Minister of Foreign Affairs, Malik Rahmati, Governor of East Azerbaijan, and several other people were among the passengers of this helicopter.
However, some of the president’s companions in this helicopter have managed to contact the center, and thus the hope for the end of this incident without loss of life has increased.

In this convoy, there were 3 helicopters, two of which were carrying some ministers and officials, reached their destination safely.

Preliminary news shows that the convoy carrying the President and his companions on the trip to Tabriz includes three helicopters. The first two helicopters were carrying some ministers and officials, all of whom reached their destination safely. But the third helicopter, which was carrying Ebrahim Raisi along with Ayatollah Al-Hashem, Imam Juma of Tabriz and Hossein Amirabdollahian, Minister of Foreign Affairs, had an accident.

Tabriz provincial network announced in subtitles that the incident happened in Jolfa area. Sahand Network wrote in a subtitle with the tag of urgent news: It announced that severe weather conditions and the presence of thick fog made the access of rescue teams to the scene of the accident slow.

Ebrahim Raisi’s Instagram page now asks people to pray for his health and his companions

According to the reporter of Khabar network, due to the fog, the field of view has reached below 5 meters and this has made it difficult for the rescue team to search.

According to the head of the Red Crescent, 49 groups from the rapid response team are involved in the rescue operation, and due to the impassability of the area, it is not possible to search by car or air, and the rescuers must reach the accident site by ground.

The exact position of the helicopter was found by the heat-seeking drone, but there are no signs of the passengers being alive

How long should we upgrade the site?

Hosting upgrades are among the important measures that webmasters should pay attention to. You may ask why? Because the host is an essential space for maintaining and maintaining the data of a website. Perhaps it is better to say that every website needs this space to be active on the web. Also, maintaining data security, increasing loading speed and site availability depends on the quality of the host.

Since the world of technology and information technology is considered a broad and dynamic platform. As a result, the main condition for permanence in this space is to move forward. For this reason, neglecting the host and not upgrading it on time will lead to a decrease in the site’s rank on the web platform. With these interpretations, if you want your website to continue its activity, don’t forget about hosting upgrades. In this regard, we will provide you with useful information about this important issue.

Starting websites with shared hosting

Perhaps it is better to give a brief explanation about shared hosting at the beginning. Shared hosting is a type of website hosting space, the resources of which are shared by several different users. In fact, sharing is like a public vehicle, or rather, it is like a bus, where each person has a specific seat and space, but their vehicle and route are shared. Usually, since websites do not need many resources at the beginning of their work, and webmasters have a limited budget. Shared hosting is a good choice for hosting new websites.

Of course, it should also be remembered that in order to start working on shared hosting websites and generally to provide a host, you must refer to reputable companies. Because some hosting companies offer server resources to many sites to earn more money. Undoubtedly, this issue slows down the speed of the site and endangers its security.

In general, shared hosting is suitable for starting websites, but as the number of site visitors increases, it requires more space and resources. So it is necessary to upgrade the host as soon as possible.

Signs that you should change your hosting service

In this part of this article, we are going to tell you that if your website is in the following conditions, you should upgrade your hosting as soon as possible.

There is a disturbance in the speed and performance of the site

Undoubtedly, users are not interested in visiting sites with errors or sites with low speed. Definitely, with a decrease in the number of visitors to a site, its SEO is compromised and the site’s ranking decreases. Because a smart search engine like Google will never give a high rank to a slow or error-filled site.

As a result, if the loading speed of your site is over 3 seconds or the user repeatedly encounters an error message. As soon as possible, you should take the necessary steps to upgrade your hosting so that your ranking in Google does not drop.

Limited resources and lack of suitable space in the host

In shared hosting, limited space is allocated to each user. Because several users use the same host at the same time. Perhaps it is better to raise this issue with an example. For example, when a shopkeeper increases the number of his goods, he should think about providing a bigger space. This also applies to websites and online stores. As a result, when the number of pages and visitors to their site increases, the webmaster should think about hosting upgrades.

Improve site security

Usually, websites use shared or free hosting at the beginning. Because they don’t have a lot of budget to buy hosts and dedicated virtual servers. Usually, shared hosts have a reasonable price, but it must be said that they do not have high security. In this regard, webmasters who are looking to increase the security of a site should upgrade their website as soon as possible.

Increasing the number of photos and video files on the website

As we know, humans communicate more easily and quickly with visual effects. According to the surveys, it is usually much more likely to watch a scientific video or photo on a website than to read a scientific article. For this reason, most websites try to upload attractive photos and videos on their site to increase the time users stay on the site. Usually, by increasing the number of photos and videos, the website has more space to store data. As a result, one of the important measures before increasing the number of video content is to upgrade the site’s hosting.

Increase the number of site visits

One of the things that shows the necessity of hosting upgrades is the increase in the number of users visiting the site. Because with the increase in the number of visits, the loading speed of the website decreases. Also, in order to respond to the needs of users, the number of resources should also increase. As a result, if for any reason the number of users of your website has increased, it needs a powerful host and server.

The occurrence of downtime for the site

You might ask what is Downtime? Downtime means a state where the site is unavailable and internet users cannot visit the site. This situation usually happens due to high volume of traffic. But by choosing a suitable host and upgrading it in time, this incident can be prevented.

What are your options for upgrading your hosting?

Undoubtedly, after encountering the symptoms that we mentioned in the previous section, you should think about a new hosting service for your Host. Usually, due to the high variety of hosting services, choosing a suitable hosting service is a bit difficult. In this regard, before choosing this service, be sure to check the needs of your site well so that you can find the most suitable ones. For this purpose, in the following, we will introduce you the types of hosts that you can trust to upgrade your site’s hosting:

WordPress hosting

Most of the websites on the Internet choose WordPress for their content management system. WordPress hosting is also a suitable hosting service for WordPress sites. Of course, WordPress hosting is not only for WordPress sites, but also for Joomla content management system. The following are among the most important features of this hosting service:

  • Maintaining the information of site visitors
  • Creating security for the site against bugs
  • Increasing the speed of the site when uploading or downloading files
  • Unlimited traffic

Cloud hosting

Cloud hosting is a type of hosting service that hosts the site through several interconnected virtual servers. Among the advantages of this type of hosting service, the following can be mentioned:

  1. Cloud hosting is very fast because it is built on independent servers.
  2. Access to data is possible at any place and time.
  3. Because the data is stored in several different servers, it is possible to recover the data easily.
  4. Cloud hosting is very secure.
  5. The update of these types of hosts is done automatically.

virtual server

Virtual server is also one of the suitable hosting services for your site. Because this hosting service has a powerful hardware and several application software. Online stores that are thinking of upgrading their hosting can replace shared hosting with this hosting service. Among the most obvious advantages of Ibn Sarvais, the following can be mentioned:

  • High speed
  • Prevent errors in site performance
  • Easy update
  • Data security
  • Compatibility with different operating systems such as Linux, Windows and Mikrotik
  • The price is right
  • Access to dedicated resources

dedicated server

A dedicated server is another type of website hosting service where resources are allocated exclusively to the website. In other words, if we want to express this type of service with an example. In fact, a dedicated server is like a private villa, and all its facilities belong only to the owner of the villa. If shared hosts are like residential complexes and some building facilities like elevator are shared between all units.

With these interpretations, if you are looking for high speed, excellent uptime and suitable bandwidth, the possibility to install any kind of software and make quick changes. A dedicated server is considered a very good option for hosting upgrades.

Download host

As it is clear from the names of download hosts, these types of hosts are mostly used to download and upload files. Usually, the download host is more suitable for websites that upload and download audio and video files on their site. Because other existing hosts have limited capacity and volume to store files. As a result, if you are looking to stop worrying about running out of bandwidth or slow download speed. We recommend you to use a hosting service for your site.

How to change hosts

In the previous sections of this article, we talked about the signs that indicate that you should change your hosting service. We also introduced the types of hosts that can be suitable for hosting your site. In this section, we are also going to discuss another very important topic, such as teaching the steps of changing hosts:

Choosing a suitable host

Undoubtedly, hosting upgrades should improve the performance of your site and increase its speed. In other words, you definitely intend to provide better and higher quality services to your website visitors after upgrading your hosting. As a result, you should be careful when choosing a host. Also, to host your website, use a host that is most compatible with your site’s needs.

Registration of current site information

The domain type of the site and the backup PHP version are among the important and necessary information that you need after the hosting upgrade. For this purpose, when upgrading the host, write down this information somewhere.

 Backing up the site content

The content of the site is also one of the things that you will need after the hosting upgrade. In this regard, backing up the site’s contents is one of the important stages of upgrading the hosting.

 Informing visitors

When upgrading the host and transferring its contents, the site is usually blocked for a few days. For this reason, it is better to discuss this issue with your website visitors before upgrading.

 Transfer information from the old host to the new host

After completing the previous steps, it’s time to transfer the backup content of the old Host to the new Host via FTP.

Change DNS

Domain Name System or DNS is a service in the network that is responsible for converting IP addresses to names or vice versa. Therefore, after performing the above steps, the DNS of the domain must be set according to the NS of the new hosting service.

 Deleting the site from the previous host

After setting and changing DNS and ensuring that the site is loaded on the new host, you must delete your site from the previous hosting service.

What is the difference between a dedicated server and a virtual server?

Currently, different types of web hosting services are available to users, the most important of which are shared hosting, dedicated and virtual servers. Choosing a hosting server is one of the most important steps you should take when starting your website.

Before knowing the difference between virtual and dedicated server , it is better to get familiar with the concept of server. In general, every site that operates in the virtual space is placed on a server. Now this server may be located anywhere in the world. According to this article, it can be said that a server is a hardware device that provides hosting services to users. These equipments have high security and with a series of special measures, they protect the sites from hackers.

The server has differences with the host in terms of performance and connection method. For example, the server is connected to other existing devices through the Internet and local network; If the host is connected to other devices only through the Internet. The main difference between a host and a server is that a server provides services, but a host consumes available resources.

Many users don’t know enough about the differences between servers, and some of them don’t even know which service is right for them. Therefore, it is recommended to know the different servers and distinguish their differences. This will help you make the right choice and not regret your purchase in the future. In the upcoming article, we will discuss in detail the difference between a dedicated server and a virtual server.

What is a dedicated server?

A dedicated server is one of the most popular and fastest types of servers, all of which resources are completely provided to a specific site. These services are suitable for all types of medium to large online businesses and fully cover the needs of webmasters. Of course, forward-looking small businesses can also benefit from Dedicated Server facilities.

Dedicated and virtual servers both make resources available to users, but because resources are not shared with other sites in a dedicated server; Of course, the performance and security of these services will increase significantly. A dedicated server has many advantages, including the following:

  • Customizability: This server provides a lot of flexibility for the user to apply settings.
  • High security: Since all dedicated server resources are provided to a special user, the security of the site is increased.

It goes without saying that Dedicated Server also has disadvantages. For example, these servers require specialized skills and knowledge due to their complexity, and are also considered one of the most expensive types of web hosting.

 

What is a virtual server?

A virtual server (VPS) is a type of service that is used for several different websites at the same time. VPS allows users to choose the bandwidth as well as the required hardware power according to their wishes.

In these services, each site uses a part of the mother server’s hardware resources, and at the same time, there is no obligation to share it with other sites. This advantage has caused the current costs of webmasters to be greatly reduced and this type of web hosting is most useful for small sites and blogs.

It should be noted that dedicated and virtual servers are very similar. In fact, we can say that VPS is a small version of a dedicated server; Therefore, it is natural to have more limited resources. One of the interesting features of the virtual server is that it uses a special program called Hypervisor so that those users who have exceeded their hardware limit can use the resources of other sites that have not yet reached the desired limit. VPS has many advantages, the most important of which are:

  • Easy setup: The nature of this web hosting is designed so that their setup is done quickly. In fact, the servers only need to be activated.
  • Reasonable cost: The price of the virtual server is affordable and does not impose much cost on the user.

There are storage limitations in a virtual server. Also, security breach is another disadvantage of this hosting.

The difference between a dedicated server and a virtual server

As mentioned, servers are very powerful computers that are responsible for supporting various sites. Due to the great power of these large computers, they can be divided into sections and each of them can host a specific site. The servers are connected to a high-speed Internet 24 hours a day and are at a very high level in terms of processing power.

Dedicated and virtual servers are one of the most important types of servers that are provided by hosting companies with different hardware power and different rates depending on the needs of your site. Virtual and dedicated servers have differences that make each of them suitable for a series of sites. In the following, these differences are examined so that you can make an easier decision when buying and choose a service that is suitable and affordable for you.

Price

Dedicated and virtual servers are different in terms of the cost they impose on site administrators. As mentioned above, in a dedicated server, all resources are completely provided to a site. This leads to an increase in the price of the relevant service; Because the entire cost of its maintenance must be paid by the manager of the said site.

Meanwhile, in virtual servers, resources are shared between all users who use the hosting in question. Each user is also obliged to pay only the cost of the part he uses. So, if you are in the initial stages of setting up your online business and you don’t have enough budget, you can buy virtual servers and upgrade it if you want after reaching income.

resource allocation

Another difference between a virtual server and a dedicated server is the amount of resources allocated to each website. In a virtual server, you can get as many server resources as you want. On the other hand, there is no obligation to share your resources with other sites.

One of the reasons for the popularity of dedicated servers is that the site manager takes advantage of the maximum capacity of storage space and processor power. If in virtual servers all these resources are divided between different sites.

 security

In general, it can be said that both dedicated and virtual servers have an acceptable quality in terms of security. But if we want to compare the security of these two, the level of security of dedicated hosting is at a higher level.

Because in VPS resources are shared between several different sites; If one of the websites does not comply with security issues, hackers can penetrate that site. Then they access the server and other sites through the relevant site and put their information at risk. In any case, you can improve the security of the dedicated virtual server by installing software designed for this purpose.

 Function

Performance refers to how fast the website loads. The importance of optimal site speed is not hidden to anyone, because sites with optimal loading speed are very popular among users. In addition, they can be placed in a good position in terms of SEO.

Dedicated and virtual servers have differences in terms of performance. Due to the limitation of bandwidth and resources in virtual hosting, it is natural that its performance is lower than that of dedicated hosting. So the speed of sites that use a virtual server is lower compared to sites that are set up on dedicated hosting.

The virtual server provides optimal loading speed to users, but if a number of sites face an increase in traffic, it is possible that the loading speed of your site will decrease. Increasing speed can help improve your SEO ranking. Therefore, if site loading speed is very important to you, it is better to choose Dedicated Server for purchase.

Configuration and personalization

Another difference between dedicated and virtual servers is their configuration and customization capabilities. If you buy a dedicated server, you will be given the opportunity to configure different parts and apply the necessary settings.

In fact, in virtual servers, hosting management is in the hands of the owner, and service providers also provide the necessary access to webmasters. But these accesses have limitations compared to dedicated servers. In such a way that it is not possible to install some programs for website administrators. They also cannot change settings in a way that compromises the security of other sites.

Scalability

Another difference between virtual and dedicated servers is their scalability. In terms of this feature, virtual servers are superior; Because they are much more flexible. In VPS, a part of the resources is considered for the user, without changing the hardware. To put it more clearly, in virtual servers, resources and space can be changed depending on the needs of site administrators.

On the other hand, the configuration of dedicated servers is not possible due to the use of special hardware. Although dedicated servers allow the site manager access to complete hardware resources; But the expansion of resources requires adding a series of slots and modules, and this process can impose a lot of cost on the user.

Which server is right for you?

Choosing the right service is not an easy task and often challenges users. In order to find out which of the dedicated and virtual servers is right for you, you must consider a series of factors and make a decision based on it. In fact, which type of hosting is right for you depends entirely on your personal needs and the type of site you have set up.

For example, if we want to compare dedicated and virtual server in terms of resource allocation, dedicated hosting is superior; Because all the resources are available to one person. Therefore, if you do not have a budget limit, it is recommended to choose these services to have the maximum features and facilities.

In terms of personalization, although both cases are very similar; But dedicated hosting provides more customization capabilities to the user. According to this article, if you need special configurations, a dedicated server will be the best option for you.

The price is one of the most important mental concerns of those who plan to start a website in the virtual space and earn money. In terms of price, virtual servers are offered with cheaper tariffs; So, if you have limited budget and financial resources, you can prioritize VPS purchase.v

How to install NMAP on Linux?

Network Mapper, abbreviated as NMAP, is an open-source security diagnostic and network inspection tool. This software is designed for fast scanning of large networks, but it also works well on single hosts. NMAP uses raw IP packets in a new way to determine what hosts are available on the network, what services these hosts provide (application name and version), what operating systems they run (what version), what They have filter/firewall package type and many other features. Although NAMP is used for security inspections, many users also use it for routine tasks; Such as network management, service upgrade scheduling management, and hosting or service access time monitoring.

 

Installing NMAP on Linux

Follow the command below to install NMAP:

dnf install nmap -y

Some useful Nmap commands on Linux:

 

Ping scan:

nmap -v -sn google.com

IP address scan:

nmap 192.168.116.147

Checking open ports to determine service and version information:

nmap -v -A google.com

 

nmap -sV google.com

There are other useful commands you can find by checking the NMAP man pages:

man nmap

 

 

How to install Apache JMeter on CentOS 8 / RHEL 8?

Apache JMeter is a product of Apache company, an open source program. A Java-based program designed for performance testing and evaluation. JMeter was originally developed for web application testing, but it has expanded its functions and is now used to test other functions as well. This software may be used to test the performance of static and dynamic resources and dynamic web applications. Usually, this software is used to simulate a heavy load on a server, a group of servers, a network or an object so that their strength can be evaluated or their overall performance can be analyzed under various loads.

In this section, you will learn how to install it on CentOS 8 / RHEL 8.

 

Features of Apache JMeter

  • Some of the features of this software are as follows:
  • The ability to test the performance and load of applications, servers and different protocols such as (FTP, SMTP, TCP, Apache…)
  • Dynamic HTML report generation
  • Extract data in HTML, JSON, XML or any other text format
  • Portable and 100% Java
  • Multi-threading, testing and debugging
  • It has a CLI (Command Line Interface) mode for load testing from any Java compatible operating system
  • Offline storage and analysis / repeat test results

 

Installing Apache JMeter on CentOS 8 / RHEL 8

  1. Install Java

The first step is to install the Java program. This program is compatible with Java 8 and above:

dnf install java-11-openjdk-devel -y

 

After installation, you can confirm the Java version with the help of this command:

java -version

 

  1. Install Apache JMeter

To install, you can download the latest version from its website. Use this command to download:

cd

wget https://downloads.apache.org//jmeter/binaries/apache-jmeter-5.4.1.tgz

ls

 

Now open the downloaded package:

tar zxvf apache-jmeter-5.4.1.tgz

ls

 

After opening, there is no need to install. Just go to the apache-jmeter-5.4.1/bin directory and enable Jmeter with this command:

cd apache-jmeter-5.4.1/bin/

./jmeter

 

The installation is finished. Now you can run JMeter and analyze and evaluate the performance of various services.

Installing KVM on CentOS 7 Linux server

How to install and configure KVM on CentOS 7 or RHEL servers? How to install KVM tool on CentOS 7 and use cloud images to install guest virtual machine? These are the questions we seek to answer in this article. Stay with us.

Kernel-based Virtual Machine or KVM is an emulation software for CentOS or RHEL 7. KVM turns your server into a control center. In this article, we will show you how to install and manage a virtual environment with the help of KVM tool on Linux CentOS 7 or RHEL 7. Also, the method of installing and managing virtual machines (VM) in a physical server using CLI will be explained. Make sure that the simulation technology or VT is enabled in your server’s BIOS. Meanwhile, you can check Intel VT CPU support and AMD-V emulation using the following command.

1
2
3
$ lscpu | grep Virtualization
Virtualization: VT-x

Follow the steps below to install KVM tool on CentOS 7/RHEL 7 server.

Step 1) Install KVM tool

Type the following yum command.

1
# yum install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install

Installing KVM tool on CentOS 7/RHEL 7 Linux server

Start the libvirtd service.

1
2
3
# systemctl enable libvirtd
# systemctl start libvirtd

Step 2) Verify KVM installation

Make sure the KVM module is loaded with lsmod and grep commands.

1
# lsmod | grep -i kvm

Step 3) Setting up the bridge network

A dhcpd-based bridge network is configured by libvirtd by default. You can check this issue using the following commands.

1
2
3
# brctl show
# virsh net-list

Default KVM network

All virtual machines (of guest type) only have network access to other VMs on the same server. Here, a private network 192.168.122.0/24 will be created for you. Check it out.

1
# virsh net-dumpxml default

If you want your virtual machines to be available to other servers on the LAN, you need to set up a bridge network on the server connected to the LAN. For this purpose, update the nic configuration file such as ifcfg-enp3s0 or em1.

1
# vi /etc/sysconfig/network-scripts/enp3s0

Add the following line.

1
BRIDGE=br0

Save and close the file in vi. Then edit and add the /etc/sysconfig/network-scripts/ifcfg-br0 file.

1
# vi /etc/sysconfig/network-scripts/ifcfg-br0

Add the following lines.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
DEVICE="br0"
# I am getting ip from DHCP server #
BOOTPROTO="dhcp"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
ONBOOT="yes"
TYPE="Bridge"
DELAY="0"

Restart the network service. Note that the ssh command will terminate and it is better to start over.

1
# systemctl restart NetworkManager

Check the issue with the brctl command.

1
# brctl show

Step 4) Create your first virtual machine.

Here we are going to create a VM on CentOS 7.x. First, get the latest version of the CentOS 7.x image using the wget command.

1
2
3
# cd /var/lib/libvirt/boot/
# wget https://mirrors.kernel.org/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-Minimal-1708.iso

Check ISO images

1
2
3
# wget https://mirrors.kernel.org/centos/7.4.1708/isos/x86_64/sha256sum.txt
# sha256sum -c sha256sum.txt

Creating a CentOS 7.x virtual machine

Here, we are going to create a CentOS 7.x virtual machine with 2 GB of RAM, two CPU cores, one nic and 40 GB of disk space. For this purpose we have:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# virt-install \
--virt-type=kvm \
--name centos7 \
--ram 2048 \
--vcpus=1 \
--os-variant=centos7.0 \
--cdrom=/var/lib/libvirt/boot/CentOS-7-x86_64-Minimal-1708.iso \
--network=bridge=br0,model=virtio \
--graphics vnc \
--disk path=/var/lib/libvirt/images/centos7.qcow2,size=40,bus=virtio,format=qcow2

To set vnc input from another terminal via ssh we have:

1
2
3
# virsh dumpxml centos7 | grep vnc
<graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1'>

Here you need to write down the port number or 5901. To access the remote vnc server, you need to use an SSH client to set up the tunnel and a VNC client. Through the client or desktop, type the SSH port forwarding command as follows.

1
$ ssh [email protected] -L 5901:127.0.0.1:5901

Once the ssh tunnel is established, you can point your VNC client to localhost 127.0.0.1 and port 5901 as follows.

VNC client reference

In this case, you should see the CentOS Linux guest installation page as below.

CentOS Linux installation welcome screen

Now just follow the instructions that appear on the screen and install CentOS 7. When the installation is finished, click the reboot button. The remote server has closed the connection with the VNC client. You can reconnect using the KVM tool to configure other parts of the server, including the SSH service or firewall.

How to build a RHEL 7.x virtual machine

First, you must have the rhel-server-7.3-x86_64-dvd.iso file saved. Here we create a RHEL 7.x virtual machine with 2 GB of RAM, two CPU cores, one nic and 40 GB of disk space.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# virt-install \
--virt-type=kvm \
--name rhel7 \
--memory=2048,maxmemory=4096 \
--vcpus=2 \
--os-variant=rhel7.3 \
--cdrom=/var/lib/libvirt/boot/rhel-server-7.3-x86_64-dvd.iso \
--network=bridge=virbr0,model=virtio \
--graphics vnc \
--disk path=/var/lib/libvirt/images/rhel7.qcow2,size=40,bus=virtio,format=qcow2

To configure vnc input from another terminal via ssh we have:

1
2
3
$ sudo virsh dumpxml rhel7 | grep vnc
<graphics type='vnc' port='5904' autoport='yes' listen='127.0.0.1'>

Here you need to write down the port number or 5904. To access the remote vnc server, you need to use an SSH client to set up the tunnel and a VNC client. Through the client or desktop, type the SSH port forwarding command as follows.

1
$ ssh [email protected] -L 5904:127.0.0.1:5904

Once the ssh tunnel is established, you can point the VNC client to localhost 127.0.0.1 and port 5904 to proceed with the next steps of the RHEL 7.x installation.

Step 5) Using cloud images

The installation method presented above can be suitable for educational purposes or a virtual machine. But if you want to use more number of virtual machines, it is better to try cloud images. It will be possible to edit “pre-production” cloud images according to your needs. For example, you can add a user, enter ssh keys, and set the time zone. Now let’s see how to create a virtual machine with 1 GB of RAM, 20 GB of disk space and a vCPU in CentOS 7 in this way.

Download CentOS 7 cloud image

1
2
3
# cd /var/lib/libvirt/boot
# wget http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2

Generating the required directories

1
2
3
4
5
6
7
# D=/var/lib/libvirt/images
# VM=centos7-vm1 ## vm name ##
# mkdir -vp $D/$VM
mkdir: created directory '/var/lib/libvirt/images/centos7-vm1'

Create meta-data file

1
2
3
# cd $D/$VM
# vi meta-data

Add the following in this file.

1
2
3
instance-id: centos7-vm1
local-hostname: centos7-vm1

Create user-data file

Here we want to log into the VM via ssh keys. Accordingly, first make sure that the ssh keys are in place.

1
# ssh-keygen -t ed25519 -C "VM Login ssh key"

ssh-keygen command

Now edit user-data as below.

1
2
3
# cd $D/$VM
# vi user-data

Add the following according to your settings.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#cloud-config
# Hostname management
preserve_hostname: False
hostname: centos7-vm1
fqdn: centos7-vm1.nixcraft.com
# Users
users:
- default
- name: vivek
groups: ['wheel']
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh-authorized-keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMP3MOF2ot8MOdNXCpHem0e2Wemg4nNmL2Tio4Ik1JY VM Login ssh key
# Configure where output will go
output:
all: ">> /var/log/cloud-init.log"
# configure interaction with ssh server
ssh_genkeytypes: ['ed25519', 'rsa']
# Install my public ssh key to the first user-defined user configured
# in cloud.cfg in the template (which is centos for CentOS cloud images)
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMP3MOF2ot8MOdNXCpHem0e2Wemg4nNmL2Tio4Ik1JY VM Login ssh key
# set timezone for VM
timezone: Asia/Kolkata
# Remove cloud-init
runcmd:
- systemctl stop network && systemctl start network
- yum -y remove cloud-init

Copy the cloud image.

1
2
3
# cd $D/$VM
# cp /var/lib/libvirt/boot/CentOS-7-x86_64-GenericCloud.qcow2 $VM.qcow2

Create a 20 GB disk image

1
2
3
4
5
6
7
# cd $D/$VM
# export LIBGUESTFS_BACKEND=direct
# qemu-img create -f qcow2 -o preallocation=metadata $VM.new.image 20G
# virt-resize --quiet --expand /dev/sda1 $VM.qcow2 $VM.new.image

Set VM image disk size

Overwrite the resized image.

1
2
3
# cd $D/$VM
# mv $VM.new.image $VM.qcow2

Create a cloud-init ISO file

1
# mkisofs -o $VM-cidata.iso -V cidata -J -r user-data meta-data

Create a cloud-init ISO file

Create a pool

1
2
3
# virsh pool-create-as --name $VM --type dir --target $D/$VM
Pool centos7-vm1 created

Installing a CentOS 7 virtual machine

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# cd $D/$VM
# virt-install --import --name $VM \
--memory 1024 --vcpus 1 --cpu host \
--disk $VM.qcow2,format=qcow2,bus=virtio \
--disk $VM-cidata.iso,device=cdrom \
--network bridge=virbr0,model=virtio \
--os-type=linux \
--os-variant=centos7.0 \
--graphics spice \
--noautoconsole

Delete unnecessary files

1
2
3
4
5
# cd $D/$VM
# virsh change-media $VM hda --eject --config
# rm meta-data user-data centos7-vm1-cidata.iso

Find KVM device IP address or dhcp address

1
# virsh net-dhcp-leases default

Creating a CentOS7 virtual machine

Log into the VM

Use the ssh command as follows.

Sample VM implementation

Useful commands

We review some useful commands for managing virtual machines.

List of all VMs

1
# virsh list --all

Get VM information

1
2
3
# virsh dominfo vmName
# virsh dominfo centos7-vm1

Stopping and shutting down a VM

1
# virsh shutdown centos7-vm1

Start the VM

1
# virsh start centos7-vm1

Set the VM to start automatically at system startup

1
# virsh autostart centos7-vm1

Reboot (soft and safe reboot) the VM

1
# virsh reboot centos7-vm1

Reboot (hard and insecure) VM

1
# virsh reset centos7-vm1

Remove the VM

1
2
3
4
5
6
7
8
9
10
11
# virsh shutdown centos7-vm1
# virsh undefine centos7-vm1
# virsh pool-destroy centos7-vm1
# D=/var/lib/libvirt/images
# VM=centos7-vm1
# rm -ri $D/$VM

To see the general list of virsh command types, we have:

1
2
3
# virsh help | less
# virsh help | grep reboot

Notes about virt-builder

It is possible to quickly build virtual machine images in CentOS 7 using the virt-builder command.

List of VM images

1
2
3
4
5
6
7
8
9
virt-builder --list
virt-builder --list | grep -i fedora
virt-builder --list | grep -i debian
virt-builder --list | grep -i ubuntu
virt-builder --list | grep -i freebsd

Creating Ubuntu 16.04 LTS virtual machine

1
2
3
4
5
6
7
8
9
10
11
12
13
# virt-builder ubuntu-16.04 \
--size=20G --format qcow2 -o /var/lib/libvirt/images/ncbz01-disk01.qcow2 \
--hostname ncbz01 --network --timezone Asia/Kolkata \
--firstboot-command "dpkg-reconfigure openssh-server" \
--edit '/etc/default/grub:
s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"/' \
--run-command update-grub

Sample output (note that the random root password will be displayed on the screen):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[   3.9] Downloading: http://libguestfs.org/download/builder/ubuntu-16.04.xz
######################################################################## 100.0%
[ 121.7] Planning how to build this image
[ 121.7] Uncompressing
[ 126.5] Resizing (using virt-resize) to expand the disk to 20.0G
[ 142.1] Opening the new disk
[ 143.8] Setting a random seed
[ 143.8] Setting the machine ID in /etc/machine-id
[ 143.8] Setting the hostname: ncbz01
[ 144.3] Setting the timezone: Asia/Kolkata
[ 144.3] Setting passwords
virt-builder: Setting random password of root to 1KTLsuVx14k989eq
[ 144.9] Finishing off
Output file: /var/lib/libvirt/images/ncbz01-disk01.qcow2
Output size: 20.0G
Output format: qcow2
Total usable space: 18.6G
Free space: 17.7G (94%)

Now that the image is created, it’s time to install the VM.

1
2
3
4
5
6
7
8
9
10
11
12
13
# virt-install --import --name ncbz01 \
--ram 2048 \
--vcpu 2 \
--disk path=/var/lib/libvirt/images/ncbz01-disk01.qcow2,format=qcow2 \
--os-variant ubuntu17.04 \
--network=bridge=virbr0,model=virtio \
--noautoconsole

Performance:

1
# virsh start ncbz01

Log into the VM

1
# virsh console ncbz01

Conclusion

In this article, you learned how to install and set up the KVM tool on servers with CentOS 7 or RHEL 7 Linux operating systems. We hope that this article has also received your attention.

Virtual server for your business

 dedicated and virtual servers. What are the differences between these two servers? Which of these servers will bring more benefits to the business? Stay with us in the rest of this article to get to know the efficiency of the virtual server for your business and its countless benefits.

Getting to know the virtual server for your business

This server, also known as VPS, is a part of a dedicated server. All businesses need promotion to grow and expand further. For this reason, they should have instant, safe and high-efficiency service. Also, the desired service must give the user the necessary access.

A virtual server is a type of web server that shares computer resources with virtual servers. For this reason, it is not considered a dedicated server independently. In other words, using a virtual server does not make the computer belong to a server software. In fact, this resource is divided between two or more servers separately.

In other words, a server can be considered an always-on computer or system. This system is ready to respond to users 24/7. Also, in the conditions of increased site traffic, it makes your website load faster.

 

What are the benefits of using a virtual server for your business?

By using this server in the shortest possible time, you will see extensive changes. In addition to increasing productivity, the use of VPS also increases the level of security. In the following, we will examine some of the most important advantages of these servers.

It increases business productivity

As we mentioned, using a virtual server increases the speed. This advantage is due to the simultaneous execution of several processes. The speed of using the Internet and the virtual world in general today has an extremely high position. Also, speed plays a significant role in increasing the ranking in Google. All these things increase the efficiency and productivity of your activities in business.

Reduces additional costs

Buying a virtual server for your business will not cost much. Although you can have a dedicated server at a higher cost, you will probably face a loss in the long run. On the other hand, according to today’s needs of businesses, shared hosting is not very efficient despite the lower price. The virtual server brings more savings and better performance for businesses. It also does not require heavy capital and additional costs.

Increases business security

With the anticipated web security measures activated and implemented by experts, the servers are protected against all kinds of traffic fluctuations, destructive codes, etc. In this way, you will be safe from cyber attacks and you will do your activities with complete security.

Increases flexibility

You can have more resources by using a virtual server. As you know, with the passage of time and business growth, you will need more space to store information. For this reason, by using VPS, you can easily upgrade your RAM space in the fastest time. Of course, this possibility is also available in shared hosting, but it is limited. However, a virtual server allows your business to scale without limits.

It gives freedom of action in choosing the software

By using a virtual server, it is possible to install different operating systems, such as Linux and Windows. In this way, the management and control of the server is provided to the user and you can choose the facilities you want; An important feature that is not available in shared hosting.

Checking the domain term in the virtual server

All sites need a domain to design and run. Basically, after determining the goal and planning for website design, the next step will be domain registration. It can be said that the domain is actually your profile and internet address. Users can find your site easily with the help of this name and address.

The domain consists of two parts, name and extension, and there are no special restrictions for choosing a name. However, the choice of extension has limitations. In fact, the extension specifies the type of site; For example, the extension ORG is used for various organizations and bodies. In this way, the domain can be considered unique to you. Also, keep in mind that the purchase and registration of these domains has a time limit and after its completion and non-renewal, it will be assigned to another site.

Examining hosting terms in virtual server

Host actually means a host that refers to the location of information. The space where you place your site on the Internet will be your host. In this case, you need a device to display your site information to users on the Internet 24/7. This device is called a server, which can be dedicated or virtual. Virtual server has more benefits for your business. However, choosing the type of hosting or server depends on the type of site and your facilities.

Using a virtual server for hosting services is much more popular among users. These servers provide adequate space and volume for your website information at a much lower cost than dedicated servers.

Review some important points before purchasing a virtual server for your business

After getting to know the concept of this server and the advantages of using it, it is time to check some important points before buying a virtual server. In the following, we will examine some important points about purchasing virtual servers.

1. Choose a suitable location with your own virtual server

Before getting a virtual server, it is better to clearly define your goals and needs. In fact, you should know what you are buying a virtual server to do. This helps a lot to choose an virtual server. Each of these servers has its own performance and advantages. You can buy according to these advantages.

2. The virtual server must have proper support

Most of the companies that provide a virtual server for your business have the possibility of support. However, the quality of support is of utmost importance. The provider company must respond to your needs in the fastest time and in the best way. In this way, you can solve the problems as soon as possible. On the other hand, be careful that the company providing the server must have an electronic symbol.

3. Pay attention to the quality of virtual server hardware

The presence of high-quality virtual server hardware for your business also increases the speed. For example, the hard drive of the server has a great impact on the speed; Therefore, it is better to choose it from the SSD type. In general, try to use up-to-date hardware. This will increase the speed of your virtual server. Usually, companies provide you with virtual server hardware information through the support team.

Choosing the right company to buy a virtual server for your business

As we mentioned, many companies are active in this field. Choosing the right host, domain and server requires a high level of specialized knowledge. For this reason, it is very important for internet business owners to choose the right and reliable company to receive these services.

Before buying a virtual server, be sure to pay attention to the company’s trust marks. Many companies do these specialized activities without having enough expertise. For this reason, it is better to be more careful and sensitive in this field.

final word

Buying a virtual server has many advantages for your business. These servers are much less expensive than dedicated servers. However, they also have high quality and speed. Also, by using a virtual server, the security of your data will be much higher. In this way, you will be relieved about cyber attacks, web fluctuations, etc. On the other hand, the virtual server will significantly increase the productivity of your business. These servers have the ability to perform several processes at the same time.

How to install SSL certificate in IIS

Looking for a tutorial on how to install an SSL certificate in IIS? Stay with us until the end of this article so that we can give some tips about training and how to install SSL certificate in IIS. SSL, which is a type of security certificate, stands for Secure Sockets Layer. The security of the data that is transmitted in the network must be ensured. This security protocol is used for this purpose. IIS or Internet Information Service are Microsoft’s proprietary servers designed for Microsoft .NET.

Before learning how to install an SSL certificate in IIS, it’s good to know why we should use an SSL certificate at all ? Strengthening the site’s security layers is always one of the main concerns of website owners. One of the available solutions to provide more security for any website is to install an SSL security certificate on that site. The purpose of using this security protocol is to change HTTP to HTTPS.

HTTPS stands for Hypertext Transfer Protocol Secure. Therefore, it can be defined as a fully secure hypertext data transfer protocol. In general, the purpose of using the SSL protocol is to encrypt the data so that it cannot be accessed by hackers and attackers. IIS is also a powerful web server with special features provided by Microsoft. If you don’t know how to enable SSL in IIS, read on.

Install SSL certificate in IIS

The first thing to learn about installing an SSL certificate in IIS is to know that before anything you need to install an intermediate level SSL certificate on your Windows server. What is an intermediate SSL certificate? Intermediate Certification is part of the Windows Server certification chain. In other words, if we divide this chain into three parts, the first part of the chain is the Root Certificate, the middle part is the Intermediate Certificate, and the last part of this chain is the End User Certificate. After installing the intermediate certificate, you need to install SSL in IIS. Follow the steps below:

  1. First, save the SSL certificate on the server where you generated the CSR. The extension of this file should be
  2. Enter the iis software and select the desired server from the box on the left side of the IIS server manager page.

  1. Then, select the Server Certificates item from the middle box among the items.
  2. After selecting the above item, a box will be displayed on the right side of the screen. From this box, click on Complete Certificate Request… option.

  1. First find the CRS file path on the server and then select it.
  2. A box called Friendly name will open and you should choose a name for your certificate and enter it in this box.
  3. In the next box, two options will be displayed. If you want to install a standard certificate, click on the Personal option. Choosing the Web Hosting option is for when the certificate can be issued on several SNI names.

  1. Finally, by selecting the OK option, the installation of the SSL certificate will be completed.

Now that you have learned how to install an SSL certificate in IIS, you should know how to assign this certificate to the desired website in IIS after installing this security certificate on IIS.

Enable SSL on the website

The work is not finished with the tutorial on installing an SSL certificate in IIS. In the next step, you need to activate SSL on the website. To enable SSL on the website in IIS, do the following steps in order:

  1. Again, on the IIS Server Manager page, from the box you see on the left side of the page, click on the third option, the site section.
  2. By clicking on this section, you will see the Default Web Site option, which you should click on.
  3. By clicking on this option, select the .. option in the right box.
  4. Selecting this item will open a page called Site Bindings. In the right box, select the first option, i.e. Add.

  1. Then several boxes will be displayed. In the Type box, select https. The port should also be set to 443 by default.

  1. A little lower you will see a box titled SSL certificate. The name of this SSL certificate is actually the same Friendly name that you set in the fifth step of the SSL certificate installation tutorial in IIS. In front of this box, you will see two options called Select and View. Click on Select.
  2. Finally, select OK.

After you have gone through the above steps, the settings will be displayed in the Site Bindings section. If https was set to port 443, you have followed the steps correctly and managed to enable ssl on the website.

How to fix the error in activating SSL certificates in IIS

After installing the ssl certificate in iis you may encounter an error. Sometimes it happens that after installing and activating ssl on Windows servers, the certificate is not activated correctly on the desired domain or it shows a different certificate instead of the original certificate. If you are using the Plesk control panel, you are more likely to encounter this error.

But why does this error occur? The point that you should pay attention to in the tutorial on installing an SSL certificate in IIS is that if the binding of a certificate on port 443 is left in the IIS settings, you will see this error. You have to fix this problem through cmd. To fix this error, do the following steps:

  1. First, enter the following command with administrator access:

netsh http show sslcert > C:\certificates.txt

  1. Now you should see the txt file. If there is a binding for port 443, you need to run the following command to remove it:

netsh http delete sslcert ipport=203.0.113.2:443

  1. At the end of these steps, you need to reset IIS. You can easily do this with the iisreset command.

By performing the above steps correctly, the error will be fixed and the SSL certificate will be successfully activated in IIS.

buy ssl; What is the best type of SSL?

Now that you have learned how to install an SSL certificate in IIS, it is good to know that there are different types of SSLs. Knowing them will help you choose and buy the most suitable one for your website. The types of SSL security certificates are:

  • SSL DV
  • SSL OV
  • SSL EV
  • SSL Wildcard
  • SSL MDC

SSL DV

If you want an SSL certificate that can be authenticated and verified quickly, you should choose SSL DV. SSL Domain Validation is one of the most popular ssl certificates among users. The authentication of this certificate is through the domain and is done in the shortest possible time.

SSL EV

If you are a large organization or company, it is better to use SSL EV. SSL Extended Validation authentication is done only by providing an organizational certificate and identity documents of a company or organization. Although authentication and installation of this certificate is a longer and time-consuming process for large organizations, the best option for large organizations is this type of SSL.

SSL OV

If you are a small company or organization and don’t want to get involved in the lengthy authentication process of SSL EV, you can use SSL OV. The SSL Organization authentication process is less expensive than SSL EV and can be done in a shorter period of time.

SSL Wildcard and SSL MDC

If you want to put the subdomains of your website under the SSL certificate in addition to the main domain, you must use the Wildcard SSL certificate. SSL MDC can also be used for up to 100 different domains, domains that are set on the same IP.

Can SSL certificate be used for free?

All websites can use a free SSL security certificate. We reviewed the tutorial on installing an SSL certificate in IIS a little while ago. Installing free ssl on iis is the same. But the thing you have to remember is the limited time period of using the free version of SSL. After this period of time has passed and the validity of the free version of SSL has expired, you must purchase one of its types. Buying ssl is one of the necessary measures to maintain the security of any website.

How is TSL different from SSL?

If you want a newer, more advanced version with more security, you can use TSL instead of SSL. Just like SSL, TSL is a security protocol between user and software. This protocol is used to maintain security between two systems on the Internet. In terms of application, TSL and SSL are similar; With the difference that TSL can be considered an updated version of SSL.

Note that TSL is not a separate protocol; This protocol is based on SSL. So if you buy the latest version of SSL, you have actually bought a TSL protocol. If you are looking for a tutorial on how to install a TSL certificate in IIS, there is no difference with enabling TSL in IIS in the tutorial on how to install an SSL certificate in IIS that we reviewed a little while ago.

Why should we take SSL seriously?

Why is it so important to learn how to install an SSL certificate in IIS? Site security is the most important issue that you should never neglect. There are 2 very important reasons that will definitely force you to activate SSL in IIS. How to know if a site uses this certificate or not?

When you open a page of a site, if you see https in the page address, it means that the site in question uses an SSL certificate. This certificate has advantages for both the user and the website owners that we have mentioned below.

1. Getting the user’s trust

When you install the SSL certificate on your website, an s will be added to the HTTP protocol in your website address and it will be displayed as HTTPS. If your site visitors know about these things, they will know that you are using an SSL certificate. If your site’s field of activity is such that it requires receiving information from the user, having this certificate will have a great impact on gaining the user’s trust.

2. Positive points for SEO

If you use this certificate, Google will also notice that your site is safe. Therefore, it gives more value and credibility to your site. Showing your site results by Google over sites that do not have this certificate is a priority for this search engine. With these interpretations, it is better to activate this certificate right now by learning how to install an SSL certificate in IIS.

Increasing Linux server security

What are the solutions to increase the security of the Linux server? A Linux server is a server on which one of the distributions of the Linux operating system is installed. This server can be considered a type of computer always connected to the Internet, which has a special type of software and hardware. If you also use a Linux server, increasing its security is definitely one of your concerns. Although one of the main reasons for people’s acceptance of Linux servers is their high security, there are solutions with the help of which you can improve this security to the maximum extent.

But why is security so important in Linux servers? Linux server can be used for web hosting, mail server, file storage, etc. That is why it is very important to talk about high security in these servers. One of the advantages of Linux is its open source. Therefore, its security bugs are easily identified and fixed. Considering that hackers may always be able to find a way to infiltrate your server and system, it is essential to strengthen the security layers of your Linux server in several ways. In this article, we have mentioned 13 of the most practical possible solutions to increase the security of the Linux server.

Solutions to increase Linux server security

In what ways can we improve the security of the Linux server? Although one of the main features of Linux is its high security, but for your peace of mind, you have the possibility to adjust the security of this server according to your needs through solutions. Since hackers can always find a way, it is not bad to know these solutions and by doing them, try to improve the security of your Linux server to the maximum extent. In the following, we will introduce 13 practical solutions.

1. Enable open_basedir

One of the ways to increase the security of this server is to activate one of the php services called open_basedir. This system is a kind of security feature in PHP that prevents hackers. With the help of open_basedir, it is possible to make the access of a user through php only limited to the same user. In other words, when a hacker succeeds in penetrating a part of the server, if this feature is enabled, the hacker’s access is limited to that part and he cannot access other parts of the server.

2. Taking help from safe_mode

You are probably familiar with the Safe Mode status on your mobile phone. But this feature is not specific to mobile phones and is also available for operating systems. This mode is designed to remove malicious programs, viruses, find software errors, restore operating system settings, etc. In simpler words, it can be said that Safe Mode is a state of the operating system in which, if it is active, only essential files can be executed.

Enabling safe mode prevents malicious programs from running. If a malicious program is installed on your Linux server, it will run every time Windows boots. Most viruses and malicious programs that infiltrate systems with the intention of hacking servers are designed in such a way that they can disable or remove antiviruses. Therefore, if a malicious program has entered the server, the best solution to prevent it from running is to set Windows to safe mode.

 

3. Disabling remote code execution

One of the methods that hackers use to break into systems is to execute code remotely in the desktop service, which is called Remote Desktop Services. A hacker can run any code they want on your system. For example, it can install its own malicious programs on the server, and in this way, it can learn about the server’s data and even change them. To increase the security of the Linux server, it is better to disable Remote Desktop Services. In general, deactivating services that do not work for the system increases its security.

4. Disable display_error

Display error is a type of error report in php that some programmers activate with the intention of viewing and being informed of php errors. Due to security issues, it is better to disable this service because its activation makes it easier for unauthorized attackers to penetrate the server. Therefore, if you are looking for a way to improve the security of your Linux server, we recommend that you disable this error report and use another solution to view php errors.

5. Input size limitation

One of the ways to increase Linux security and prevent web attacks is to limit the input size. But what does limiting the input size mean? As you probably know, in the php language and in the post method, the data in the HTTP request is hidden in the header.

Sending malicious codes in parts of the site that takes input from the user on the post method is one of the hackers’ methods to penetrate the system. In such a situation, if you limit the input size in the config file, you can prevent attackers from sending these malicious codes.

6. Resource limitation

DOS attacks, which are shortened to Denial of Service attack, are known as Denial of Service attacks. These attacks are carried out by attackers or hackers. The purpose of these attacks is to temporarily or permanently suspend or interrupt the services of the servers hosting a site. One of the solutions that can be used to protect against these attacks to some extent and ensure the security of the Linux server is limiting resources.

7. Disabling some functions

Another way to prevent web attacks is to disable some functions. If you are using shared servers, it is better to close the functions that are threatening to the Linux server. Some of these functions are:

  • curl_multi_info_read
  • curl_multi_init
  • curl_multi_remove_handle
  • curl_multi_select

These functions are located in a file called php.ini.

8. Using the magic_quotes_gps function

Inputs that are sent from the user side to the server may be a security bug for the server for various reasons. Therefore, one of the things that can be done to increase the security of the Linux server is to use the magicquotesgpc function. This function provides the programmer or site developers with the ability to secure user-side inputs to the server to a great extent. To activate and use this function, you must access the php.ini file.

 

9. Disable expose_php

One of the ways to prevent attackers and hackers from infiltrating the server is to prevent them from accessing our server facilities. But how can this be done? Note that whenever php starts, it adds a message containing its version number to the server header. In order to hide this data from hackers, you can set the expose_PHP variable to off. By disabling this feature, the data and web server facilities are not easily available to hackers.

10. Installation of CSF firewall

As another way to increase Linux server security, you can install CSF firewalls, which are also known as firewalls. This system can be considered as one of the best server security services that have been very successful in its kind so far. If you are looking for one of the strictest security elements to improve server security, be sure to install CSF Firewall. As the name suggests, this system works exactly like a firewall.

In other words, after installation, at the entrance of a server, it carefully checks all incoming requests to it. You can enable any security settings you want on the firewall. After that, if any of the incoming requests to the server contradicts the information and settings registered in the firewall, the requests are deleted and prevented from being sent to the server. A firewall is powerful enough to filter and process thousands of gigabytes of data in just a fraction of a second.

11. Installation and configuration of CLAMAV antivirus

If you are looking for one of the best antivirus for Linux operating system, install CLAMAV Antivirus, which has the ability to detect a large number of viruses at the same time. Another advantage of this antivirus is that it is free. In addition to this, the database of this antivirus can be updated automatically. Despite the powerful tools such as the scanner provided by this antivirus, you no longer need to use graphical environments to scan your server; Rather, you can scan the server with the help of this antivirus’s own scanner. Installing CLAMAV antivirus is recommended as one of the ways to increase Linux server security.

 

12. Installing the ModSecurity module

ModSecurity module is a firewall that is installed on the hosting servers. Along with other software and hardware firewalls that you install to keep your server secure, adding this module can also act as a double layer of security. This module is able to control various attacks on the server to a great extent. Note that installing the security mode module alone is not enough to maintain the security of the server, but this module should be used along with other security firewalls to increase the site’s security level.

One of the positive features of this module is its programming power. The security mode can identify and block things that have already damaged the security of the site. Among the applications of this security module, the following can be mentioned:

  • Ability to detect malicious bots and block them
  • Checking any requests sent to the site, such as membership requests from the user
  • Managing site traffic and checking them to ensure the absence of any security bugs
  • Preventing the uploading of some files and managing any uploaded files on the site
  • Managing the execution of commands and preventing the execution of malicious commands

13. Install CXS

As the last way to increase the security of the Linux server in this article, we should mention the installation of CSX. ConfigServer eXploit Scanner is a tool that can scan all files uploaded to the server. You can use this tool to prevent unauthorized attackers from exploiting the site and Linux server. The following are the positive features of this tool that help to maintain the security of the Linux server:

  • CSX tool is able to block loading of suspicious PHP and Perl scripts. These downloads are usually done with the purpose of sending spam or malicious attacks.
  • It has the ability to identify uploaded roots in user accounts.
  • It is able to increase the efficiency and scalability of the server.

Zero to hundred Nginx web server optimization

Today, due to the dependence of most business practices on site processes, Nginx web server optimization can be among the popular and obscure trends. In fact, the main reason for this is the popularity of the Nginx web server among users.

In such a situation, getting to know the process of optimizing the Nginx web server can be a great help in improving the performance of the web server. Therefore, in the rest of this article, we will provide more explanations regarding the optimization of the Nginx web server and the process related to this optimization.

What is Nginx web server optimization?

The first question that concerns most people’s minds in the field of web server optimization is related to what this process is and the result of it! In fact, it should be said that Engine X web server optimization is a specific technical process that is used to improve the efficiency of data processing and program configuration.

As a result, people can optimize the Nginx web server to make this server-browser communication path work as well as possible so that data processing processes can be done at a high speed and properly. Especially since this web server is introduced and known among the popular types for responding.

The first part of the Nginx web server optimization process

Considering that the Nginx web server has special capabilities that distinguish it from other types of web servers, by optimizing Nginx in line with the Worker changes in Nginx, it is possible to increase the utilization of the capabilities of this web server.

  1. Correctly setting the number of workers

In order to optimize Nginx, you can first adjust the number of workers and its connections correctly. For this, it will be necessary to follow a simple path. For this purpose, first of all, it is necessary to enter the Nginx configuration file through the command “vi /etc/nginx/nginx.conf” and change the value of worker_process to 1. Of course, you should note that changing the number of workers must be done according to the number of CPU cores.

  1. Connections of workers

In the following, you can enter the worker connections into the optimization process. For this purpose, you can see the limit of your server core through the ulimit -n command and replace the number 4096 with 512 in the Worker_conncetion section.

In this process, you can even replace the expression: “events {worker_connections 4096;use epoll;multi_accept on;}” for Worker Connection. In this case, the speed of the Nginx web server will increase to a great extent.

  1. Keep Alive optimization

Another process that comes up in the discussion of optimizing the Nginx web server is related to the optimization of Keep Alive in Nginx. In the nginx.conf file, you can check the related settings.

In the nginx.conf file, there are various control sections related to Keep Alive, which can include Keepalive_timeout, keepalive_requests, SendFile, tcp_nopush and tcp_nodelay. Each of the paths are used to adjust and apply private processes.

  1. Buffer settings

Buffer settings are another part of the Nginx web server optimization process, which is also defined in the nginx.conf file. Buffer settings depend on components such as hard disk speed, site traffic, and site information volume.

The reason for this issue is related to the type of function that is proposed for buffer settings. In fact, a buffer is a part of memory that stores data. By setting this section of the nginx.conf file, you can fully implement the Nginx optimization process.

For this purpose, it is necessary to enter various parameters during the changes. client_max_body_size, large_client_header_buffers, output_buffers and client_header_buffer_size are examples of the mentioned parameters that need to be changed.

The second part of the Nginx web server optimization process

The continuation of the Nginx web server optimization process can be explained and reviewed in the second part. Therefore, in order to complete the optimization process, it is necessary to go through the steps mentioned in this section.

  1. Changing the connection queue in the Nginx config file

Changing the connection queue in the Nginx configuration file is among the trends that are proposed to optimize the Nginx web server. The connection queue is located in the Nginx configuration file and can be changed by changing two variables in this file. The issue raised in relation to this section is related to the possibility of changing the number if a system error is observed in the Nginx log.

In this case, it is possible to prevent errors. So that if a system error is observed, it is necessary to use the numerical variable of the expressions:

net.core.somaxconn = 65536

net.ipv4.tcp_max_tw_buckets = 1440000

in the Nginx config file. In this case, you will be able to avoid errors.

  1. Using Gzip in Nginx

Using the Gzip function in Nginx is one of the other processes that are discussed in the discussion of optimizing the Nginx web server. This feature is used to increase the loading speed of the site. So that by using Gzip you can compress all the files that can be compressed.

In this case, the size of the files is reduced and thus the speed increases. As a result, in order to implement the Gzip feature in the Nginx web server, you can define the following codes in the Nginx configuration file so that the mentioned feature works for you:

gzip on;

gzip_min_length 1000;

gzip_types: text/html application/x-javascript text/css application/javascript text/javascript text/plain text/xml application/json application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application /x-font-ttf application/xml font/eot font/opentype font/otf image/svg+xml image/vnd.microsoft.icon;

gzip_disable “MSIE [1-6]\.”;

Since site loading speed is among the most important issues related to its activity, it is necessary to pay special attention to Gzip functionality. Because in general speed increase is one of the main goals of Nginx web server optimization. Of course, consider the fact that Gzip is not the only way to increase site speed. But there are other effective components.

  1. Setting timeouts in Nginx

Setting the timeouts in Nginx is one of the other components that adjust the speed of the site. Client_body_timeout and Client_header_timeout are among time control variables. So that defining the time to perform a process by the user and sending the Request time out error in case of timeout is done through these variables.

It should also be noted that another variable called Send_timeout is placed in this section, which determines the time of the request. These variables are all related to the speed of the site and have a direct impact on its performance. For this reason, the optimization process of Nginx web server largely depends on these things.

 

The third part of the web server optimization process

Another part that comes up in the web server optimization process can be explained in the form of the third part. In this part, we can mention different components, each of which has a different effect on the optimization process. It should be noted that the commands of this section are defined in the sysctl.conf file.

  1. Set temporary ports

The setting of temporary ports is one of the components that is discussed in the third part of the optimization process. This is the case when using an Nginx web server as a proxy server. Regarding these variables, it should be noted that the settings are applied in the limits.conf file.

  1. Set file descriptors

Setting file descriptors to set connections and open files can be part of the Nginx web server optimization process. This item is placed in the sysctl.conf file like any variable related to the third section. It should be noted that these settings are necessary for a system that responds to a high number of connections.

  1. Disconnecting to respond to lost customers

Disconnecting from the response of lost customers by entering the code “reset_timedout_connection on; In the sysctl.conf file, you can free the memory allocated to the socket.

In addition to the items mentioned for the third part of the Nginx web server optimization process, options for collecting packets before dropping and TCP window size are among the mentioned processes that can affect the performance of the web server.

The fourth part of the Nginx web server optimization process

The end of the optimization path will be associated with the application of the settings of the fourth section, which includes the processes of error logging, conditional logging, general disabling of logging and monitoring of server activities.

  1. Error logging

Logging errors that are placed in the Nginx.conf file is one of the important steps that must be taken into account in relation to the optimization of the Nginx web server. Regarding the logging of errors, two main parameters logs/error.log and Error_log are set to determine the location of the log file.

So that by changing a variable in the code defined in the Nginx.conf file, the logging level can be changed arbitrarily or depending on the need. In this case, it will be possible to receive information about the status of the server, depending on the changes applied.

  1. Conditional logging

Conditional logging is another process related to web server optimization that can be used to log specific requests if needed.

  1. Disable logging altogether

Disabling logging altogether is when the server administrator uses an alternative logging method. In this case, you can use the command “server { listen 80; server_name example.com; access_log off; error_log off; }” was used to completely disable logging.

  1. Monitor server activities

Server activity monitoring is a variable that can be enabled on a server to help administrators see JSON responses immediately.

In general, by applying processes related to Nginx web server optimization, you can greatly help the website to perform better and faster. Especially since the activity of the site largely depends on these components.

 

Examples of server performance enhancement files

Nginx’s official site has proposed the ideal configuration by providing examples of nginx.conf file, sysctl.conf file and limits.conf file; But it should be kept in mind that these examples are presented as a general template and things like workers or other processing items need to be adjusted according to the server’s power.

  • sysctl.conf file

net.core.somaxconn = 65536

net.ipv4.tcp_max_tw_buckets = 1440000

net.ipv4.ip_local_port_range = 1024 65000

net.ipv4.tcp_fin_timeout = 15

net.ipv4.tcp_window_scaling = 1

net.ipv4.tcp_max_syn_backlog = 3240000

  • The limits.conf file

soft nofile 4096

hard nofile 4096

  • The nginx.conf file

pid /var/run/nginx.pid;

worker_processes 2;

events {

worker_connections 65536;

use epoll;

multi_accept on;

http {

keepalive_timeout 65;

keepalive_requests 100000;

send file on;

tcp_nopush on;

tcp_nodelay on;

client_body_buffer_size 128k;

client_max_body_size 10m;

client_header_buffer_size 1k;

large_client_header_buffers 4 4k;

output_buffers 1 32k;

postpone_output 1460;

client_header_timeout 3m;

client_body_timeout 3m;

send_timeout 3m;

open_file_cache max=1000 inactive=20s;

open_file_cache_valid 30s;

open_file_cache_min_uses 5;

open_file_cache_errors off;

gzip on;

gzip_min_length 1000;

gzip_buffers 4 4k;

gzip_types text/html application/x-javascript text/css application/javascript text/javascript text/plain text/xml application/json application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/ x-font-ttf application/xml font/eot font/opentype font/otf image/svg+xml image/vnd.microsoft.icon;

gzip_disable “MSIE [1-6]\.”;

# [ debug | info | Notice | warn | error | Crit | alert | emerg]

error_log /var/log/nginx.error_log warn;

log_format main ‘$remote_addr – $remote_user [$time_local] ‘

‘”$request” $status $bytes_sent ‘

‘”$http_referer” “$http_user_agent” ‘

“$gzip_ratio”‘;

log_format download ‘$remote_addr – $remote_user [$time_local] ‘

‘”$request” $status $bytes_sent ‘

‘”$http_referer” “$http_user_agent” ‘

“$http_range” “$sent_http_content_range”‘;

map $status $loggable {

~^[23] 0;

default 1;

server {

listen 127.0.0.1;

server_name 127.0.0.1;

root /var/www/html;

access_log /var/log/nginx.access_log main;

location /

proxy_pass http://127.0.0.1/;

proxy_redirect off;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_connect_timeout 90;

proxy_send_timeout 90;

proxy_read_timeout 90;

proxy_buffer_size 4k;

proxy_buffers 4 32k;

proxy_busy_buffers_size 64k;

proxy_temp_file_write_size 64k;

proxy_temp_path /etc/nginx/proxy_temp;

location ~* .(woff|eot|ttf|svg|mp4|webm|jpg|jpeg|png|gif|ico|css|js)$ {

expires 365 days;

support hosting100