开发者

postgresql and firewall

开发者 https://www.devze.com 2022-12-20 16:58 出处:网络
I will be building a server/client software on Windows, where many machines need to communicate with a Postresql database running on the server.This is C++ software so I will use libpq to connect to t

I will be building a server/client software on Windows, where many machines need to communicate with a Postresql database running on the server. This is C++ software so I will use libpq to connect to the database.

If I do this, will th开发者_如何学Pythonere be issues with the firewall? I'd like to make configuration as easy as possible and not have users open up firewall ports or disable their firewall.

If I do need to open up firewall ports, can I use WCF to get around the issue? Basically send a command to the server using WCF, run the postgresql command locally, and get the result back (I have never used WCF but understand that it can communication using HTTP port 80).


PostgreSQL typically listens on port 5432, which is not open by default in the Windows firewall. But the only machine where the firewall would need to be re-configured is the one where PostgreSQL is running. If you have many client machines, none of them should require firewall changes (unless they have restrictions on outbound traffic, which is rare).

Hope this helps.


You can also configure SSL connections to ensure better security.

0

精彩评论

暂无评论...
验证码 换一张
取 消