Insert string or text at the end of the line.

Insert string or text at the end of the line.

Some time we need to insert text or string at the end of the line in a file. This can be done using two methods “awk” and “sed” command. Below are the examples: Insertion with sed at the end of the line If you want to insert the text during the execution of the command […]

How to insert text string at the beginning of the line

How to insert text string at the beginning of the line

Using sed command we can insert the text at any matching pattern of the file. Using sed we can insert at any point of the file. Insertion with sed at the beginning of the line If you want to insert the text during the execution of the command use -i option. Sed -i ‘s/^/begin here/’ […]

How to Install CSF and LFD In Linux Servers

How to Install CSF and LFD In Linux Servers

Firewall plays an important role in the protection of the server. Firewall protects the servers against harmful stuff. Firewall controls the incoming and outgoing traffic by analyzing the packet and determine whether they are allowed through or not based on set of rules. In Linux we uses IPTABLES to manage the firewall rules. But its […]

How to allow the port in CSF Firewall

How to allow the port in CSF Firewall

Some applications runs on a specific ports which need to be opened in the server firewall. By default csf only allow few basic ports, in order to open/allow other ports you need to edit csf configuration file. This article will you to open ports in CSF firewall. Steps to Open Ports in CSF: 1. Open […]

Change the default SSH port 22

Change the default SSH port 22

The Secure Shell (ssh) protocol by default uses the port 22. Attackers mostly uses the port 22 in automated attack and changing the default will prevent your server from these automated attack. There are many ways of making your server secure and changing the default ssh port is one of the server hardening. Steps to […]