×


Blog


Listen on Privileged Ports with Nagios Log Servers - How to set it up

This article covers how to configure Nagios Log Servers to listen on privileged ports. Now Nagios Log Server Administrators who would like configure Nagios Log Server to listen on ports below 1024 which are privileged in Linux. This can be useful if you have legacy devices that can only send on specific ports (e.g. syslog on port 514).

Ports below 1024 are privileged on Linux and only allow the root user to listen on them. 

This can be implemented via two solutions:

1. Run Logstash as root

2. Use setcap


To use Use setcap for Listening On Privileged Ports:

Here, you can use the logstash running as the nagios user but this method may be less secure in some environments as it will allow any Java process to listen on privileged ports.

i. The logstash init configuration file requires three lines to be added to the end of it, open the file with the following command:

On Debian | Ubuntu:

$ vi /etc/default/logstash

or

$ sudo /etc/default/logstash

2. Then, Add the following three lines to the end of the file:

echo $(dirname $(find /usr/lib -name libjli.so)) | awk '{print $1}'> /etc/ld.so.conf.d/java.conf

eval "$(which ldconfig)"

setcap 'cap_net_bind_service=+ep' $(readlink -f $(which java))

3. Save the file and close vi.

4. Restart Logstash Service

The logstash service needs to be restarted for these changes to apply:

$ sudo systemctl restart lagstash.service


Cannot Copy and Paste via RDP - How to fix this Windows issue

This article covers how to Allow/Prevent Copy and Paste via RDP Clipboard on Windows. Copy and paste is an essential function that should ideally work every day without fail. You can resolve this Windows issue by restarting the rdpclip.exe program in the remote computer.

Also, you can log off the remote user and then log back on on Windows.

Once the rdpclip.exe is relaunched, you should be able to copy paste using clipboard from the local computer to the remote computer. 


In order to fix the copy and paste issue in Windows, you need to end the rdpclicp.exe process and then restart it:

To do this;

1. Press Ctrl + Shift + ESC to start Task Manager.

2. Go to the "Details" tab.

3. Right-click the "rdpclip.exe" process.

4. Select "End task".

5. Go to Windows/system32 folder.

6. Look for "rdpclip.exe" and run it.


AWS Instance loses network connectivity - Fix this issue now

This article covers method to fix AWS Instance loses network connectivity error.

Basically, AWS Instance loses network connectivity if the instance has the wrong time set.


To fix Amazon EC2 Windows instance network connectivity issue:

You can create a temporary elastic network interface, and attach the network interface to the Amazon EC2 Windows instance. Then, you can  temporarily connect to the instance and fix the issue.

1. Open the Amazon EC2 console, and then choose Instances from the navigation pane.

2. Select your instance. From the Description tab, note the Subnet ID.

3. Create a new network interface in the same subnet as the instance.

Important: Be sure to select a security group that allows incoming Remote Desktop Protocol (RDP) traffic from your IP address.

4. Attach the new network interface to the instance.

Note: The network interface might take a few minutes to come online. If you connect to the instance using RDP, associate an Elastic IP address with the network interface.

5. Using the new network interface, connect to the instance using RDP.

6. Change the network connection settings in Windows to use DHCP. Or, specify the correct private IP address settings. For instructions, see Configuring a secondary private IPv4 address for your Windows instance.

7. Detach the temporary network interface.

Note: If you've associated an Elastic IP address with the network interface, and no longer need the Elastic IP address, release the Elastic IP address.


Enable WSGI module support in VestaCP - Do it Now

This article covers how to enable WSGI module support in VestaCP for our customers. WSGI is the Web Server Gateway Interface. It is a specification that describes how a web server communicates with web applications, and how web applications can be chained together to process one request. Also, it implements the web server side of the WSGI interface for running Python web applications.


To enable WSGI support on a Debian or Ubuntu on Vesta Control Panel:

1. Install wsgi apache module

$ apt-get install libapache2-mod-wsgi

$ a2enmod wsgi

2. Download wsgi template

$ cd /usr/local/vesta/data/templates/web

$ wget http://c.vestacp.com/0.9.8/ubuntu/wsgi/apache2.tar.gz

$ tar -xzvf apache2.tar.gz

$ rm -f apache2.tar.gz

3. Create new package or set wsgi as apache template in the existing package

4. Add new user and assing him package with wsgi template

5. Add new domain and check the result


Importance of WSGI ?

1. WSGI gives you flexibility. Application developers can swap out web stack components for others. For example, a developer can switch from Green Unicorn to uWSGI without modifying the application or framework that implements WSGI.

2. WSGI servers promote scaling. Serving thousands of requests for dynamic content at once is the domain of WSGI servers, not frameworks. WSGI servers handle processing requests from the web server and deciding how to communicate those requests to an application framework's process. The segregation of responsibilities is important for efficiently scaling web traffic.


Facts about WSGI:

1. what WSGI stands for (Web Server Gateway Inteface)

2. A WSGI container is a separate running process that runs on a different port than your web server

3. Your web server is configured to pass requests to the WSGI container which runs your web application, then pass the response (in the form of HTML) back to the requester.


Configure PostgreSQL on Linux in Vesta control panel - How to do it

This article covers how to install and setup PostgreSQL on Vesta Control panel running RHEL, CentOS, Debian, or Ubuntu server. PostgreSQL is an advanced version of SQL which provides support to different functions of SQL like foreign keys, subqueries, triggers, and different user-defined types and functions.


To set up PostgreSQL on a RHEL or CentOS:

1. Install PostgreSQL packages

yum install postgresql postgresql-server postgresql-contrib phpPgAdmin

* If you have remi installed then don't forget to explicitly enable it.

yum install --enablerepo=remi postgresql postgresql-server postgresql-contrib phpPgAdmin


2. Initialize database cluster

service postgresql initdb


3. Download hba configuration

wget http://c.vestacp.com/0.9.8/rhel/pg_hba.conf -O /var/lib/pgsql/data/pg_hba.conf


4.  Start the server

service postgresql start


5. Set oracle user password

su - postgres

psql -c "ALTER USER postgres WITH PASSWORD 'pgp4sw0rd'"

exit


6. Enable pgsql databases support in vesta.

open /usr/local/vesta/conf/vesta.conf and set DB_SYSTEM to 'mysql,pgsql'


7. Register pg instance in control panel

v-add-database-host pgsql localhost postgres pgp4sw0rd


8. Download phpPgAdmin configuration

wget http://c.vestacp.com/0.9.8/rhel/pga.conf -O /etc/phpPgAdmin/config.inc.php

wget http://c.vestacp.com/0.9.8/rhel/httpd-pga.conf -O /etc/httpd/conf.d/phpPgAdmin.conf


9. Restart web server

service httpd restart


To set up PostgreSQL on a Debian or Ubuntu:

1. Install PostgreSQL packages

apt-get install postgresql postgresql-contrib phppgadmin


2. Download hba configuration

wget http://c.vestacp.com/0.9.8/debian/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf


3. Restart the server

service postgresql restart


4. Set oracle user password

su - postgres

psql -c "ALTER USER postgres WITH PASSWORD 'pgp4sw0rd'"

exit


5. Enable pgsql databases support in vesta.

open /usr/local/vesta/conf/vesta.conf and set DB_SYSTEM to 'mysql,pgsql'


6. Register pg instance in control panel

v-add-database-host pgsql localhost postgres pgp4sw0rd


7. Download phpPgAdmin configuration

wget http://c.vestacp.com/0.9.8/debian/pga.conf -O /etc/phppgadmin/config.inc.php

wget http://c.vestacp.com/0.9.8/debian/apache2-pga.conf -O /etc/apache2/conf.d/phppgadmin


8. Restart web server

service apache2 restart


Interworx vs cPanel - Which is Better

This article covers InterWorx and cPanel  and gives an idea of how to choose the best control panel for customers. Basically, many factors depends to choose the right panel like InterWorx and cPanel. 


InterWorx includes two main sections:

1.  NodeWorx (similar to WHM)

2. SiteWorx (the analog of cPanel)

NodeWorx is a system administrator interface to configuring, managing and monitoring your server. 

From the NodeWorx amin, you can securely manage multiple SiteWorx accounts.

SiteWorx is a separate control management account and website owner interface that provides access to the tools for managing your websites, email, and databases.


Differences between InterWorx and cPanel:

1. Unlike cPanel, with InterWorx, you can create multiple administrator accounts and provide them with the desired permissions. 

This is especially convenient if your clients have web developers or people who need to manage email only, for example. 

cPanel has only one administrative account, and no more additional accounts can be created.

2. InterWorx doesn't have complicated licensing options like cPanel. 

cPanel recently implemented an account-based pricing model that may have resulted in a substantial price increase. 

Whereas InterWorx lets you host multiple accounts on the server without increasing your license cost as it is licensed per server.

3. cPanel supports PostgreSQL, Mailman mailing lists, NodeJS, server-side Java, Ruby on Rails, and the DNSSEC protocol. 

InterWorx does not support those things at this time. Also, InterWorx does not support CloudLinux, only Linux and CentOS are supported.

4. InterWorx supports all of the same languages for NodeWorx as for SiteWorx. 

In addition, both NodeWorx and SiteWorx share a wide variety of supported themes. WHM only supports US English and one theme for now. cPanel has two themes.