Not able to perform base backup in postgres replication. Error: pg_basebackup: could not connect to server

I am running postgresql 11.2 inside docker containers. While preparing the master and standBy PostgreSQL instances for streaming replication, I have enabled archiving on the master server. After this I need to run the pg_basebackup command on the standBy server to take a backup from master to standBy. No matter what I do, I am facing the same error:

pg_basebackup: could not connect to server: FATAL:  no pg_hba.conf entry for replication connection from host "10.244.0.1", user "repluser", SSL off

Commands I am running using postgres user, inside the docker container running standBy server, are:

pg_basebackup -h 10.0.0.1 -D /data/postgres -U repluser -v -P --wal-method=stream

OR

pg_basebackup -h 10.0.0.1 -U repluser -Ft -D /data/postgres

(Please assume 10.0.0.1 is my master server's IP and 10.0.0.2 is my standBy server's IP. They are in same subnet)

The pg_hba.conf file on the master server looks like this:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

host all all all md5

# TYPE  DATABASE        USER            ADDRESS                 METHOD
host    replication     repluser        10.0.0.2/32             trust