postgresql에 원격으로 연결하기 위해 machien을 설정하고 뭔가를 확인했는데 모든 것이 올바른 것 같습니다.
포트 상태 확인:
$> sudo netstat -tulpn | grep LISTEN | grep 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 18134/postgres
방화벽 확인 중
$> sudo ufw status | grep 5432
5432 ALLOW Anywhere
기계 작업 내부 핑:
$> telnet 185.235.x.x 5432
Connected to 185.235.x.x
단, 기계 외부에서 호출할 경우
$> telnet 185.235.x.x 5432
Connecting ... (And then timeout)
또 어떻게 해야 합니까?
업데이트
pg_hba.cof :
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
host all all 0.0.0.0/0 md5