Posts

Postgresql Hacked ? - FATAL: pg_hba.conf rejects connection for host "127.0.0.1", user "postgres", database "", SSL on

Two Main Reason : One (Might Not Be Hacked) : Just change Config it will work as given in this link https://dba.stackexchange.com/questions/83984/connect-to-postgresql-server-fatal-no-pg-hba-conf-entry-for-host Second (Might Be Hacked) Oney way to find that is list users and check postgres=#   \du It will list users. If you find " pgdbadm " user good chance your PostgreSQL got hacked One main thing they mainly do is they will add these two rules in begining of the  pg_hba.conf file Hack Code host all postgres 0.0.0.0/0 reject host all pgdbadm 0.0.0.0/0 md5 For more info check the below links https://gist.github.com/andywer/1c7aaa23e758f555b483e171c51514e7 https://dba.stackexchange.com/questions/215294/why-does-pg-hba-conf-sometimes-have-random-rules-added-to-it-postgresql https://stackoverflow.com/questions/52197486/fatal-pg-hba-conf-rejects-connection-for-host-127-0-0-1-user-postgres-dat

Solved Issues

centos php move_uploaded_file move_uploaded_file(/var/www/html/.jpg): failed to open stream: Permission denied in sudo chcon -t httpd_sys_rw_content_t /var/www/html/images -R

How to Disable Root SSH Access on CentOS 7

Image
First, create an alternate user instead of using the default "root" useradd  doneill Second, set a password for this user passwd  doneill   Third, give sudo  permission for this user. For that go this file visudo Add permission to your user  like this. Here the user name is doneill Now check whether you can run the sudo  command with username as doneill   su doneill  sudo ls If things work good, continue Now prevent SSH login as root user. vi  /etc/ssh/sshd_config Search for "Permit" word to Now restart your ssh service by below command service sshd restart Thats  it. Now please check what you have done is working fine. Don't logout now, first make sure everything is working fine. type  ssh doneill@your systemip and give the password and check if the user login works fine.

AWS VPC Operations

Image

AWS RDS

Image
There is a maximum of 30 database per instance and 4 TB on each instance, so if your application depends on an architecture where you need to have 100 databases in the same instance then this is a showstopper for RDS.

Implementing SQL Server on Amazon RDS

Image
Difference between Database AS A Service(Dbaas) and Infrastructure As A Service(Iaas)

Docker on AWS - the Right Way

Image
Container Orchestration: Docker Swarm Kubernetes ECS ECS Cluster :  is a logical grouping of container instances. It can contain one or more container instances. Container instances : is nothing but an EC2 instance with three more things on it. ECS Agent is installed on the container instances Docker is also installed It should register to an ECS Cluster Service  — Defines long-running tasks of the same Task Definition. This can be one running container or multiple running containers all using the same Task Definition. A Scheduling logic that decides when containers should run. Tasks : A logical group of running containers running on an instance. ECS Task Definition:  Docker image for each Container CPU and Memory Requirements for each container Links between Containers Networking and Port Settings Data Storage Volumes Security (IAM) Roles ...