Postgresql 9.5 is launched on Debian 8, php accesses the database via Unix-socket, administration - command line (psql), in general, the open port is not needed, can it be closed with the help of postgre itself, without iptables?

    1 answer 1

    Install in config

    listen_addresses = '' 

    Then postgresql will not bind the tcp network, even localhost. A separate unix_socket_directories setting is responsible for the unix socket unix_socket_directories

    • Yep! It worked, and I went in the right direction, but just commenting out the line listen_addresses = 'localhost' for some reason was not enough, but listen_addresses = '' - it worked, thanks. - LocaIhost
    • listen_addresses = 'localhost' is implicit in the default if the setting in the config or launch arguments was not specified. - Shallow