Skip to main content

Posts

Showing posts from August, 2021

Securing Redis to Be Accessed From All Interfaces

Redis can bind to all interfaces with bind * -::* configuration. But, Redis also enables protected-mode by default in its configuration file. It will make bind * -::* configuration ineffective because the protected-mode requires both to explicitly state the binding interfaces and to define user authentication. The unsecured way is to set protected-mode no in the configuration. It will make our Redis server becomes accessible from any interfaces without authentication. It may be fine if we deploy our Redis server in a closed environment such as in a containerized one without exposing and pointing any port to the Redis service port. So that, the service can only be accessible from other services in the container's network. The recommended way is to keep protected-mode yes in the configuration. Then, we need to add a new user authentication configuration and limiting access for the default user. A default user is a user with no assigned name when the client tries to connect ...

Managing Node.js-based Web Project Using Gulp and Nodemon

In building a website, there are two main components which are frontend and backend components. If we build a website based on Node.js for the backend side, and of course Javascript and CSS for the frontend side, we should handle our codes in the project differently. We may perform a linter and the Typescript transpiler for our Node.js codes. While on the frontend side, we may additionally minify and bundle the project styles and scripts. The backend program needs to be restarted when there are any changes in the codes and transpiler is performed. The frontend codes need to be re-bundled when there are also any changes. Nodemon is a tool that is designed to restart a Node program when a change of the program codes is detected. Gulp is a task runner that can be utilized to watch any changes in the program codes and perform specific tasks. In this post, we will make a transpiler is run and the backend program is restarted when there are any changes. We will also compile our Sass-...