Tutorial Social Network

Informasi Seputar Media Sosial

Tutorial Computer

Informasi Seputar Komputer

Tutorial Youtube

Informasi Seputar Youtube

Tutorial Blogger

Informasi Seputar Blogger

Tutorial Wordpress

Informasi Seputar Wordpress

Tutorial Website

Informasi Seputar Pemrograman Website

Tutorial Windows

Informasi Seputar Sistem Operasi Windows

Tutorial Linux

Informasi Seputar Sistem Operasi Linux

Tutorial Android

Informasi Seputar Android

Tuesday 19 January 2021

11 Best Methods to Secure Windows Server

Microsoft’s Server platform can perform many different functions: Active Directory domain controllers, DHCP, DNS, IIS, File and Print, and on and on and on. The versatility of Microsoft server has also been counted among its weaknesses, because a large footprint means a large attack surface. However you’re using a Windows server, the rule of thumb should be to make that footprint as small as possible to operate as intended. So let’s get started how to secure windows server.

Microsoft has released regular patch knowledgebase which can be used as a guide to patch necessary security flaws. The best defense for windows server is regular update. When you create systems that store and retrieve data, it is important to protect the data from unauthorized use, disclosure, modification or destruction. Ensuring that users have the proper authority to see the data, load new data, or update existing data is an important aspect of application development. Do all users need the same level of access to the data and to the functions provided by your applications? Are there subsets of users that need access to privileged functions? Are some documents restricted to certain classes of users? The answers to questions like these help provide the basis for the security requirements for your application.

There are various security aspects that should be considered when configuring a server

1.Server Defaults
DO NOT leave defaults itself. Change default password, Log files, Default permissions for sensitive data. By doing this, you can evade 90% of the great Google Dorks

2.Password policies and User configurations
This is the very first thing you want to do in a newly deployed server. Change the root password with a more complex one. Like, minimum 8 characters long and with a mix of upper, lower characters, number and symbols. You must define a password policy for the users defining Aging, Locking, History and Complexity of passwords. In most cases you should disable the root user entirely and create non-privileged user accounts with sudo access for those who require elevated rights.

3.Opened and Closed Ports
DO NOT leave unwanted ports opened to the external world. Even with a single sweep of nmap towards the ports, hacker can retrieve the services running in the server. At least you need to filter those particular ports.

4.Update installation For Operating System
DO NOT install patches or updates that are just launched. Wait 2 or 3 days to get a report and reviews about the patches. If you know what does the patches do, then go ahead install them. If you don’t know, then don’t… Wait for the report.

Eg: Patches released for Intel Meltdown vulnerability

5.Update installation for software components
Unlike the updates for operating system, software components must be updated as soon as the new versions are released.

Eg : Single outdated plugin can put your website in danger.

6.NTP Configurations
Configure your server to sync it’s time to NTP Servers. These could be internal NTP servers if your environment has those, or external time servers that are available for anyone. What’s important is to prevent clock drift, where the server’s clock skews from the actual time. Also filter the port number 123 with your necessary IP.

7.Running Services
Windows server has a set of default services that starts automatically and run in the background. Many of these are required for the Operating System to function, but some are not and should be disabled if not in use. Following the same logic as the firewall, we want to minimize the attack surface of the server by disabling everything other than primary functionality. Microsoft old server versions such as 2003 and 2008 should be running more services than the newer version, which is not needed for its essential operation. Important services should be set to start automatically so that the server can recover without human interaction after failure

8.Logging Policy
You must configure your server to record every event in the server and make sure the monitoring services are running properly. Adjust maximum size and duration of logging. Handling logs individually is overwhelming. Like syslog in the Linux server, a centralized event viewer for windows will help the troubleshooting.

9.Windows Firewall
Keep windows firewall turned on unless you are using an external firewall system. Keep a precise description for the rules created with its use and details.

10. Administrative Access Control Panels
Always Restrict administrative access to control panels from external IPs and careful not to use the username and password same as the local administrator of the server.

11. Port Numbers
It is better to change the default port numbers used by the applications to a different one and always keep a local documentation of the changed ports, just in case you forget.
Wrapping UP

We can easily prevent a complete meltdown of our server by auditing the system regularly up to and extend. By keeping a simple documentation of the basic configurations, you can stop the misconfigurations entirely or caught early enough to prevent them from turning into data breaches or other cyber incidents.

How to Use Azure Command-line Tool for Data Transfer

AzCopy Command-Line Tool is used to transfer data to/from storage accounts and also from on-premise and storage accounts. Here, we will briefly explain some basic task using Azure command-line tool for data transfer.

Follow the below steps to perform a simple data migration between a local-PC and Azure Storage.
Download a BLOB from Azure:

1) Download AzCopy Command-Line Tool from here and install it.

2) Navigate to Azure storage container from Azure portal and copy the container URL and paste it in a notepad.


3) Navigate to access key and copy a key to notepad.


4) This is the format of AZCopy command:

AzCopy /Source: https://myaccount.blob.core.windows.net/mycontainer /Dest:C:\myfolder /SourceKey:key /Pattern:"abc.txt"

Let’s take a close look at the command parameters.

/Source: This is the URL of the storage container
/ Dest: This is the location where the file should be saved on the local PC
/ SourceKey: This the access key of the storage account
/ Pattern: The name of the file to be downloaded

Replace all the source and source key elements in the command with the one we copied from step 3 and 4. For destination, we have created a folder named “az” in C Drive and download a file named ”test.txt”.

So, the final command after replacing the values will be like this:

AzCopy /Source:https://sysallystorage.blob.core.windows.net/test /Dest:C:\az /SourceKey:N/dwDCqQQPdlqyZsvZQpYcZmuI9r5AiD26ByU4aY6Dp9NPavGrmVTZSIcFsdfCI5 cQTPyjDZQs8ap7CtvGSxbA== /Pattern:"test.txt"

5) Open the AzCopy Command-Line Tool and paste the above command there and press enter. Once the transfer is completed, you can see the details of file transfer.


6) Open the destination folder and you can see the downloaded file there.
Upload File to Azure BLOB

1) To upload a file to Azure BLOB, We can use the below format:

/DestKey:key /Pattern:"abc.txt”

The parameters are same as in the previous step. The only difference is source will be the location of the file on the local PC and destination path is the URL of Azure Container. Here, I am uploading a file called “upload.txt”.

The final command will be like this:

/DestKey:N/dwDCqQQPdlqyZsvZQpYcZmuI9r5AiD26ByU4aY6Dp9NPavGrmVTZSIcFsdfCI5cQ
TPyjDZQs8ap7CtvGSxbA== /Pattern:"upload.txt"

2) Open the tool and paste the command and press enter.


Now, you can see the summary of file transfer once it is completed.

Avoiding DDoS and a Brute Force Attack

The days of civil war is over instead, cyber warfare is in the latest trend. As we all know, nothing is secure if it is connected to the internet. One way or another way it is vulnerable to cyber-attacks. On the other hand, we are being part of an attack on someone else. If you haven’t got any of these yet, let me tell you, you are in luck. If you think your server is fully secured, I would ask you to download Nessus Professional and do an advanced scan. (Nessus is the No.1 all-in-one vulnerability assessment tool). Change your mind now..? The scan will show you the known vulnerabilities and information’s that are provided by the server with your knowledge or not.

We cannot defend against all the attacks at the same. But we can prevent some of them and minimize the damage, only if we take necessary precautions. As we focus on cloud industry in these days, Brute Force and DDoS are the worst Nightmares of every Server Admin. But from those two, anonymous ddos attack is the most dangerous one. With the past 5 or 6 years, even a kid can launch DDoS attack to any IoT.

What is DOS or DDoS?
In the early 80’s DOS was Disk Operating System from Microsoft. But in the past 20 years, we refer it to Denial of Service which refers to an attack that reduces, restrict or denies access by consuming the entire resource which is dedicated to the website or web server. When a DOS is performed, if the sources are distributed, it’s called a Distributed Denial of Service or DDoS. DDoS is the most familiar name we know than DOS.

Preventing DDoS Attacks
How are we going to prevent a DDoS attack? The answer is Plan Ahead…..! The moment a server experiences a DDoS attack, it will be too late. There is not so much do other than enjoying its beauty.
Depending on the scale and scope of DDoS source, there are many steps to be considered to prevent DDOS.

First things First,

1.Bandwidth
When you step into a cloud, buy more bandwidth. It will cost you money. But you will be safe on the internet.

2.Filtering Requests using Reputation
Everything is smart these days. A phone is smart, TV is smart, Why not our server firewall? Why we are using inbuilt firewalls when UTM appliances are available? If you want to be safe, then you need to spend money on it.

UTM appliances or Unified Threat Management appliance is a hardware or software based firewall which is much more powerful than our inbuilt standard firewalls

The UTM Firewall has the ability to inspect and control in the multiple layers of the protocol stack. The UTM system can sense the number of requests and the amount of traffic coming from the individual IP Address and it will limit or block the connections from the particular IP Address and will keep you safe.

3.TCP Intercept
If there is a SYN Flood attack, the firewall can check whether the handshake valid or not. The firewall can take initial SYN request, send SYN ACK requests and if there is a final Acknowledgement, then the firewall can set up a valid session with the server. The malicious SYN flood attack will never make past the firewall

4.Load balancers or Application Delivery Controllers (LB or ADC)
If we are using Load balancers, we can implement cache engines. So that the requested contents is cached by a content delivery system in the Load Balancers, there is no need to go to the server. It will reduce the resource usage of the actual Web Server

5.Sandboxing
Consider a web server is providing many functions like login function or a search function etc. What if we separate those functions to different areas even to different systems? Even if an attacker compromises the login function, it will not affect other functions.

The traffic to the web server can be granted by a challenge like a captcha not only to the users but also to check the authenticity of the browsers

6.Third party DDOS protection Services
You can hire third-party DDoS protection services to protect your website or server from being DDoSed

Eg : Cloudflare

7.Disable ICMP packets (This won’t help much. Because there is no server which will not respond to an arp request)

What is Brute Force?
This attack has the same characteristics of the meaning of the word “brute”. The phrase “Brute Force” has many definitions. When it comes to cryptography, it is the process of trying many passwords or passphrases until the correct one is found to bypass the authentication

There is a quote by Robert Louis Stevenson “Nothing Made by Brute Force Lasts”
Let me tell you, even if he didn’t meant it for the IT world, he is right… Unlike DDOS, recovery from the Brute force is not much of a work. We can easily reset the password if we can find out the password is changed or account is compromised.

Preventing Brute Force Attacks
There are various aspects to be considered while securing a server or website
If you are securing a website you can set delay between failed login attempts.
Control the maximum failed login attempts in the account lockout policy of the server
On the public interface (WAN Interface) of the server, do not enable any service other than TCP/IPv4/IPv6
Do not open unwanted ports to the outside world. Open only necessary ports like 21 for FTP, 80 and 443 for World Wide Web Users
Enable windows authentication only if the service need them
Always keep a password policy at least with the below conditions
At least 8 characters long
Must contain alpha-numeric characters
Must contain symbols
If you are ready to use third party applications, then you may use some HIPS (Host-based Intrusion Prevention System) like RDP Guard
Filter the access to the server only from a particular IP which is whitelisted in the server

Wrapping UP
DDoS and Bruteforce are not easy to prevent, with better security practices and employing secure software solutions, one can mitigate the same.

If you need some high spec security, be ready to spend a lot of money. There is a limit for us to secure everything.


When we look at the diagram, it is clear that as security increases, functionality and usability decreases. So, It is better to keep an optimum level of all three factors.

How to Tune and Speed up WordPress Site

A slow website means users will potentially leave your website before it even loads. Check your WordPress site speed through 365andup.com and take your report. Use the report to make WordPress specific optimizations that improve load times.

A good page load time is below 2 seconds. Google recommends a >200ms response time.
Studies shows that the average human attention span have reduced from 12 seconds to 7 seconds in the period 2000 to 2016. i.e you have very little time to show your content and convince the users to stay on your site. According to studies a 1 second delay in page load time can lead to 7% loss in conversions, 11% fewer page views and 16% decrease in customer satisfaction.

Also Google and other search engines have started penalizing slow websites by pushing them down in the search results which results in low traffic for the website for slower websites. So, if you want more traffic, subscribers and revenue from your website then you must make your WordPress website fast.

2 primary factors i.e your cache techniques and hosting are the 2 things that have the biggest impact on load times.
The primary causes for a slow WordPress website are;
Web Hosting – When your hosting server is not properly configured then it can hurt your website speed.
WordPress Configuration – If your WordPress site is not serving cached pages then it will overload your server thus causing your website to be slow.
Page Size – Mainly images that are not optimized for web.
Bad Plugins – If you’re using a poorly coded plugin, then it can significantly slow down your website.
External scripts – External scripts such as ads, font loaders, etc can also have a huge impact on your website performance.

1.Update WordPress
Update WordPress core, theme, plugins, and framework if you use one. WordPress is updated frequently. Each update will not only offer new features, but also fix security issues and bugs. Your WordPress theme and plugins may have regular updates, too. As a website owner, it’s your responsibility to keep your WordPress site, theme, and plugins updated to the latest versions. Not doing so may make your site slow and unreliable, and make you vulnerable to security threats.

2.Upgrade your Hosting
Your WordPress hosting service plays an important role in website performance. The optimization techniques available to you will depend on your hosting setup.

On a shared hosting server you share the server resources with many other customers. Another option is to use a managed WordPress hosting service. But, in both cases, your access level is limited, and you won’t be able to tune server side configuration.and if your neighbouring site gets a lot of traffic, then it can impact the entire server performance which in turn will slow down your website.

If you are on your own dedicated/VPS hosting, go ahead with the best ways that we found to consistently speed up your WordPress.

3.Apache Tweaks
Apache is a fast, reliable, and flexible server but is heavy on resources by default. If you are running a VPS, and using it just for WordPress, you can make some small tweaks to your configuration and get some significant performance gains.

Please note, by default Apache comes with lots of unnecessary installed modules. Some modules that are particularly resource eating, that you should disable if you don’t need them.So it’s recommended to disable all those modules that are not in use. You can list all the compiled modules of web server, using following command;
# grep LoadModule /etc/httpd/conf.modules.d/00-base.conf


To disable the particular module, you can insert “#” at the beginning of that line and restart the service.


Apache MPM Prefork Module
This Multi-Processing Module (MPM) implements a non-threaded, pre-forking web server. This module controls the number of processes and spare processes Apache will start and run. This is especially important if you are running a small VPS that is handling MySQL and Apache.

Prefork and worker are two type of MPM apache provides. Both have their merits and demerits.
By default mpm is prefork which is thread safe.

Prefork MPM uses multiple child processes with one thread each and each process handles one connection at a time.

Worker MPM uses multiple child processes with many threads. Each thread handles one connection at a time.

# httpd -V | grep MPM
Server MPM: prefork

Most critical hardware item to be taken into account is the amount of RAM allocated for each Account/Apache process. While you cannot control this directly, but can restrict the number of processes/values by adjusting the following values in the apache configuration file; # vi /etc/httpd/conf/httpd.conf StartServers 8 MinSpareThreads 5 MaxSpareThreads 20 ServerLimit 256 MaxRequestWorkers 30 MaxConnectionsPerChild 1000 


StartServers:- The StartServers directive sets the number of child server processes created on startup. As the number of processes is dynamically controlled depending on the load.
MinSpareThreads:- The MinSpareServers directive sets the desired minimum number of idle child server processes.
MaxSpareThreads:- The MaxSpareServers directive sets the desired maximum number of idle child server processes.
MaxClients:- MaxClients directive sets the limit of the number of simultaneous requests that can be supported.
MaxRequestWorkers:- The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served.
MaxConnectionsPerChild:- The MaxConnectionsPerChild directive sets the limit on the number of connections that an individual child server process will handle.

KeepAlive and KeepAliveTimeout
The Keep-Alive extension and the persistent connection provide long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. When a client uses a Keep-Alive connection, it will be counted as a single “request” for the MaxConnectionsPerChild directive, regardless of how many requests are sent using the connection.

# vi /etc/httpd/conf/httpd.conf
KeepAlive On

Keep Alive Timeout is the number of seconds Apache httpd will wait for a subsequent request before closing the connection.Setting KeepAliveTimeout to a high value may cause performance problems in heavily loaded servers. The higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients.

# vi /etc/httpd/conf/httpd.conf
KeepAliveTimeout 5

Adjust Timeout
This directive tells Apache how many seconds to wait while receiving an incoming request, processing it, and sending back a response. Default value is 300 secs, but it is best to keep this value as low as possible to prevent resource wastage.

Timeout 40

4.Mysql Innodb Tweaks
Databases are the “brains” of your website: They store the valuable data that you show on your pages. The content management systems have to rely on databases (SQL, NoSQL, XML, JSON and such) to store your data. WordPress has no difference, it uses MySQL to store the static and dynamic content along with your website information, WordPress settings, user details and so on.

Please note that Databases have a powerful standard to keep, serve and alter your data, but if you use them wrong and forget to maintain, they will get fat and bloated, which lead to slowness of the websites.

Ensure that an upgraded Mysql version with InnoDB storage is using in your server. MariaDB/MySQL 5.5.4 introduces new configuration settings for the InnoDB storage engine. This can greatly improve MySQL’s InnoDB performance, both in read and write operations. One of those settings is innodb_buffer_pool_instances. The innodb_buffer_pool_instances divides the InnoDB buffer pool into separate instances. To enable multiple buffer pool instances, set the innodb_buffer_pool_instances configuration option to a value greater than 1 up to 64 (the max).

vi /etc/my.cnf

innodb_buffer_pool_size = 128M
innodb_buffer_pool_instances = 2

Please avoid setting innodb_buffer_pool to a value that is higher than the amount of RAM on the server, otherwise it could start to swap out pages and performance will drop quickly.
MySQL Max Connections

The maximum number of simultaneous client connections permitted is controlled by the max_connections system variable. The default value is 151 to improve performance when MySQL is used with the Apache Web server. mysqld actually permits max_connections+1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege. Please keep in mind that, too many connections can cause high RAM usage and lock up your MySQL server.

You could update Max Connections without restarting the service by;

# mysql -u root -p
mysql> set global max_connections := 150;


MySQL thread_cache_size
The thread_cache_size directive sets the amount of threads that your server should cache. The default value is 0 (no caching), which causes a thread to be set up for each new connection and disposed of when the connection terminates. Set thread_cache_size to N to enable N inactive connection threads to be cached. thread_cache_size can be set at server startup or changed while the server runs. A connection thread becomes inactive when the client connection with which it was associated terminates.

You could calculate the thread cache hit rate percentage from the following formula;

100 - ((Threads_created / Connections) * 100)


MySQL query_cache_size
The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. When it is enabled, if an identical statement is received later, the server retrieves the results from the query cache rather than parsing and executing the statement again. So the query cache can be useful in an environment where you have tables that do not change very often and for which the server receives many identical queries.

To set the size of the query cache, set the query_cache_size system variable. Setting it to 0 disables the query cache, as does setting query_cache_type=0. By default, the query cache is disabled.

When you set query_cache_size to a nonzero value, keep in mind that the query cache needs a minimum size of about 40KB to allocate its structures.


The query_cache_size value is aligned to the nearest 1024 byte block. The value reported may therefore be different from the value that you assign.

Please find the below query cache config for a normal wordpress installation;query_cache_type = 1 query_cache_limit = 256K query_cache_min_res_unit = 2k query_cache_size = 80M 

MySQL max_allowed_packet
MySQL always splits data into packets. The max_allowed_packet directive defines the maximum size of packet or any generated/intermediate string, or any parameter that can be sent. The largest possible packet that can be transmitted to or from a MySQL 5.6 server or client is 1GB.

max_allowed_packet=16M

5.Use a Content Delivery Network (CDN)
Users from different geographical locations may experience different loading times for the site. Location of your web hosting servers can have an impact on site speed. Using a CDN (Content Delivery Network) can help to speed up loading times for the users. A CDN is a network made up of servers all around the world. Each server will store “static” files used to make up your website. Static files are unchanging files such as images, CSS, and JavaScript, unlike the WordPress pages which are “dynamic”.

When using a CDN, every time a user visits your website they are served with the static files from whichever server is closest to them. Your own web hosting server will also be faster since the CDN is doing a lot of the work.
Working of CDN:

Upon setup CDN uses technologies like anycast, ligttpd and BGP to transmit the static content files from web host’s server to a network of servers that are dispersed at different geographic locations around the world, caching the contents of the file.

When the user’s browser requests a static file that is linked to a CDN, the CDN redirects the request from originating site’s server to a point of presence that is closest to the user. User’s proximity to web servers impact on load time. The closer the CDN server is to user is, the faster the site loads for them.
Advantages of CDN:
Speed – Having a CDN clearly improves site load time.
Crash Resistance – CDN allows you to distribute the load to multiple servers instead of 100% load from the main server thus making it less likely to crash.
Improved user experience – Upon using CDN, there is decline in bounce rate, increase in pageviews and number of pages viewed per user. i.e fast site means improved user experience.
Improvement in SEO – Faster sites have higher rank in search engines like Google. CDN makes your site faster, so you need it for your site to be ranked higher in search engines.

6.Installing/Using Memcached
Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

Installing Memcached and related packages can be done by running just one command;

yum -y install memcached

You could update the configuration changes on “/etc/sysconfig/memcached” . We suggest stick on with 64MB cache size, and gradually raise as needed.


Then restart and enable Memcached at boot;

# systemctl restart memcached
# systemctl enable memcached
# systemctl status memcached

Now you will need to install memcache PHP plugin

# yum install php-pecl-memcache

Then restart apache and memcached service to reflect the changes.

# systemctl restart memcached
# systemctl restart httpd

Please run the following command to verify Memcache PHP module is loaded;

# php -m | grep mem
memcache

7.Installing/Using Varnish
Varnish is a web application accelerator, also known as a caching HTTP reverse proxy, which is designed for content-heavy dynamic web sites as well as heavily consumed APIs. As we all knew nobody like to wait ages for a page to load. Varnish can increase the performance of your website and prevent the web server from overloading in case of high server traffic. Varnish receives requests from clients and tries to answer them from the cache. If it cannot answer from the cache it will forward request to the origin server and fetch the response, then store it in cache and same time deliver it to the client. When Varnish has a cached response ready, it is typically delivered in a matter of microseconds.

Before installing Varnish, you will have to install the EPEL repository. You can do this by running the following command;

# yum install -y epel-release

Once it is completed you will be able to install varnish from the following command;

# yum -y install varnish

To configure varnish to start at boot, run the following command;

# systemctl enable varnish

To start varnish, run the following command;

#systemctl start varnish

By default Varnish listens on port 6081. You will need to change port 6081 to 80 so that website requests access the Varnish cache first. You can do this by editing the varnish.params configuration file (/etc/varnish/varnish.params).

VARNISH_LISTEN_PORT=80
VARNISH_STORAGE_SIZE=128M

Now need to make changes in /etc/varnish/default.vcl file. This file contains configuration that points to the content. By default it is set to serve at 8080 and points to host as localhost. The value of .host is localhost by default. It should be replaced with the fully qualified hostname or IP address and .port should be replaced with the web server’s listening port.

# vi /etc/varnish/default.vclbackend default { .host = “your_webserver/IP address”; .port = “8080”; } backend default { .host = “your_webserver/IP address”; .port = “8080”; } 

Configure Apache to work with Varnish
By default Apache listens on port 80. Now, you need to make Apache to run behind Varnish caching by changing the default Apache port to 8080 (Which is updated on /etc/varnish/default.vcl).

# /etc/httpd/conf/httpd.conf
Listen 8080

It is always required that you restart all services once changes are made in configuration files.

# systemctl restart httpd
#systemctl restart varnish

We suggest you to wait some days and view varnishstat to get an idea of what your “warm” cache looks like. If you are seeing a lot of misses or that Varnish is utilizing all 128Mb, you can then consider raising the storage value as desired.

8.Enable PHP opcode cache
OpCode Caches are performance enhancing extension for PHP and it improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.

Please note, Opcode caching programs, such as XCache, eAccelerator, and OPCache, are not compatible with the suPHP PHP handler. The caching program will either not function, or will function incorrectly.So we strongly recommend the DSO or fcgi PHP handlers for the OPCache opcode cacher. Also avoid installing multiple PHP caching programs on the same system. Multiple opcode caching programs consume excessive memory and degrade system performance.

For PHP 5.5 and above, Zend OpCache is compiled as a shared extension by default unless you specify --disable-all when configuring Or at the time of easyapache.

Now we need to configure the same by uncommenting /adding the following lines to the php.ini file. Also make sure that opcache.so is located in your extensions directory that is specified in the php.ini file. Once it is completed, restart the service to update the changes.zend_extension=opcache.so opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 

9.Configure Cache Techniques
Your cache plugin and hosting are the two most important things that improve load times. WordPress pages are dynamic i.e they are built on the fly every time someone visits a post or page on your website. To build your pages WordPress has to run a process to find the required information, put it all together and then display it to the user. This involves a lot of process and this could really slow down your website when you have high traffic. In order to reduce this process every WordPress site need to use a caching plugin. Caching can make your WordPress site anywhere from 2x to 5x faster.

A cache plugin makes a copy of the page after the first load and then serves that cached version to every subsequent user instead of going through the whole page generation process every time. When a user visits your WordPress site which is built using PHP, your server retrieves information from a MySQL database and your PHP files, and then it’s all put together into a HTML content which is served to the user. It’s a long process, but you can skip a lot of it when you use caching instead.

The popular WordPress cache plugins are WP Rocket, WP Super Cache, WP Fastest Cache and W3 Total Cache.

A cache plugin should fix the following items in your report:
Minify (all items)
Gzip (all items)
Inline small CSS/JS
Reduce HTTP Requests
Leverage browser caching
Specify a cache validator
Enable keep-alive
Add expires headers
Reduce DNS lookups
Configure entity tags (ETags)
Prefer asynchronous resources
Remove query strings from static resources
Reduce cookie size (if using MaxCDN)
Use cookie-free domains (if using MaxCDN)
Use a content delivery network (if using MaxCDN)

How To Install And Configure FreeNAS

FreeNAS is a free and open source storage operating system based on FreeBSD and the OpenZFS file system. You can easily create SAN and NAS storage using this OS. This blog explains how to install and configure FreeNAS.

1. Download the ISO image from FreeNAS website and make it bootable using a USB or any other media.

2. Boot the OS from USB and you can see the first menu as shown in the screenshot below. Select the “Install or upgrade “option and press Enter.


3. Select the destination drive where the OS should be installed and click OK.


4. You will see a ‘warning window’ about data loss, Click ‘Yes’ and proceed with the installation.


5. Enter the root password for the software and proceed to the next step.


6. Select the appropriate BOOT mode, In most cases select ‘Boot via BIOS’. UEFI stands for Unified Extensible Firmware Interface, read more about it here.


7. Now you can see the main configuration window with different options numbered from 1 to 11.


Let us have a close look at each of it.
Configure Network Interfaces : To configure Network interface and IP
Configure Link Aggregation: To manage and create link aggregation
Configure VLAN Interface : To Add or delete VLAN
Configure Default Route : To set the Gateway for IP
Configure Static Routes: To Set static route
Configure DNS: To set DNS host name and corresponding IIP address
Reset WebGUI login credentials: To reset the root password
Reset to factory default: To delete all settings
Shell : To open the shell
Reboot: To reboot the system
Shutdown: To power off the system

Here, we are focusing on option no:1 as we need to set an IP for the FreeNAS.,input option 1, and press Enter.

8. In the next screen, select the appropriate network interface and press Enter


9. You can configure DHCP for FreeNAS in this screen or you can add a static IP. Enter “y/n” for each option accordingly


10. Enter the static IP and Netmask


11. Once the IP configuration is completed, you will see the main menu with a URL based on the IP configured.


12. Enter the IP in the browser and you will see the FreeNAS console asking for password. Enter the root password ( the same password given on Step number 5 ) and login to the console.


13. The FreeNAS OS is installed and configured.


That’s it!
Storages are a must for any infrastructure, but remember the most important part – Backup!