Bài đăng

Hiển thị các bài đăng có nhãn Linux

How to setup an xRDP server on Ubuntu 18.04

Hình ảnh
Most of the tutorials on setting up an xRDP server are based on the older vesions. This tutorial definitely works on Ubuntu 18.04 I am using XFCE as my desktop environment as its light on resources and I don’t always have good internet connection when working remotely. You can choose other environemnt of your choice, like MATE. Note — xRDP has problems working with Unity and GNOME desktop environment. Step 0- Connecting to remote server vivek@Teega:~$ ssh username@r emoteServerIP username @r emoteServerIP's password: ***** Step 1- Install xRDP sudo apt-get update sudo apt-get install xrdp Step 2- Install preferred desktop environment # XFCE sudo apt-get install xfce4 #Optional stuff sudo apt-get install xfce4-terminal sudo apt-get install gnome-icon-theme-full tango-icon-theme or # MATE sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon Step 3- Tell xRDP to use your environment # XFCE sudo sed -i.bak '/fi/a #xrdp multiple ...

SSH Tunnel - Local and Remote Port Forwarding Explained With Examples

There are two ways to create an SSH tunnel, local and remote port forwarding (there’s also dynamic forwarding, but we won’t cover that here). The best way to understand these is by an example, let’s start with local port forwarding. Imagine you’re on a private network which doesn’t allow connections to a specific server. Let’s say you’re at work and imgur.com is being blocked. To get around this we can create a tunnel through a server which isn’t on our network and thus can access Imgur. $ ssh -L 9000:imgur.com:80 user@example.com   The key here is -L which says we’re doing local port forwarding. Then it says we’re forwarding our local port 9000 to imgur.com:80 , which is the default port for HTTP. Now open your browser and go to http://localhost:9000 . The awesome thing about SSH tunnels is that they are encrypted. Nobody is going to see what sites you’re visiting, they’ll only see an SSH connection to your server. Connecting to a database behind a firewall Anoth...

Install Graylog Collector from source

Hình ảnh
Manual Setup 1. Install Java with version above 1.7 2. Download the latest collector release. (find download links in the collector repository README) 3. Unzip collector tgz file to target location and rename     /opt/graylog-collector 4. cp config/collector.conf.example to config/collector.conf     /opt/graylog-collector/config 5. Update server-url in collector.conf to correct Graylog server address (required for registration) 6. Update file input configuration with the correct log files 7. Update outputs->gelf-tcp with the correct Graylog server address (required for sending GELF messages) 8. Start command cd /op/graylog-collector bin/graylog-collector run -f config/collector.conf 9. Login web interface and create new input gelf-tcp port 12201 Sample configure #  vi /opt/graylog-collector/config/collector.conf server-url = "http://10.10.10.10:12900" collector-id = "file:config/collector-id" host-name = "srv-web-06" inputs { ...

What is the Difference between SOAP and REST ??

Hình ảnh
Web services that are used to communicate in-between applications that are being developed in many programming-languages and running on different platforms. Like a Java application running on linux platform can communicate with a PHP application running on windows platform. There are two types of web services, SOAP and REST. Let us discuss some main differences between them. SOAP vs REST – Difference between SOAP and REST Web Services S.No SOAP REST 1. SOAP stands for Simple Object Access Protocol. REST stands for Representational State Transfer. 2. SOAP is a protocol. It defines some standards that should be followed strictly. REST is an architectural style. It doesn’t define so many standards like SOAP. 3. SOAP is highly secure as it defines its own security. REST inherits security measures from the underlying transport. 4. SOAP message request is processed slower as compared to REST. REST message request is processed faster as compared to SOAP. 5. SOAP supports only XML ...

High Availability Log Processing with Graylog, MongoDB and ElasticSearch

Hình ảnh
Graylog is an open-source log management tool. Similar to Splunk and LogStash, Graylog helps centralize and aggregate all your log files for full visibility. It also provides a query language to search through log data. For large volumes of log data in a big production setup, you might want to deploy a Graylog Cluster. Graylog Cluster consists of several components: Graylog server  - Log processor Graylog web UI  - Graylog web user interface MongoDB  - store configuration and the dead letter messages ElasticSearch  - store messages (if you lose your ElasticSearch data, the messages are gone) In this blog post, we are going to deploy a Graylog cluster, with a MongoDB Replica Set deployed using ClusterControl. We will configure the Graylog cluster to be able to collect syslog from several devices through a load balanced syslog TCP running on HAProxy. This is to allow high availability single endpoint access with auto failover in case if any of the Graylog...