I'm making a new telegram bot and wanna deploy it to Heroku. I made a postgres database with that (heroku). I used to use NordVPN, now I'm not, and I noticed that I can't connect to my database anymore, while using other VPNs. When I run my bot (with other VPNs), I face this error:
Exception: could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "ec2-18-211-41-246.compute-1.amazonaws.com" (18.211.41.246) and accepting
TCP/IP connections on port 5432?
It works fine without VPN though. As I searched, It's because of the firewall. But I made windows firewall off, and also paused my anti-virus, and still got the error. Any suggestions on how to make it work with any VPN?
Some information:
>>> systeminfo
...
OS Name: Microsoft Windows 10 Home
OS Version: 10.0.19042 N/A Build 19042
...
>>> python --version
Python 3.8.0
>>> pip freeze | findstr psycopg2
psycopg2==2.8.6
>>> netstat -a -n | findstr "5432"
TCP 0.0.0.0:5432 0.0.0.0:0 LISTENING
TCP [::]:5432 [::]:0 LISTENING
>>> telnet 0.0.0.0 5432
Connecting To 0.0.0.0...Could not open connection to the host, on port 5432: Connect failed
>>> heroku version
heroku/7.54.1 win32-x64 node-v12.21.0
>>> heroku pg:info -a my-bot
=== DATABASE_URL
Plan: Hobby-dev
Status: Available
Connections: 0/20
PG Version: 13.3
Created: 2021-08-08 07:47 UTC
Data Size: 8.1 MB/1.00 GB (In compliance)
Tables: 1
Rows: 15/10000 (In compliance)
Fork/Follow: Unsupported
Rollback: Unsupported
Continuous Protection: Off
The above commands are done bellow a VPN connection
Note: Telegram is blocked in my country, so in order to be able to code telegram bots, I have to use a VPN