Thread: Can I make Postgresql to bind to 127.0.0.1:5432, instead of all the available interfaces

Hi guys,

 

I am trying to figure out if I can get Postgres to bind to only the loop-back interface (127.0.0.1) as apposed to binding to all the available interfaces (0.0.0.0) available on the system.

1. The first question is whether this is feasible at all?

2. If yes, what is the configuration (and where) to enable it.

 

Thanks a lot in advance.

 

- Uday

 

Uday Singh <uday@ironhide.com> writes:
> I am trying to figure out if I can get Postgres to bind to only the
> loop-back interface (127.0.0.1) as apposed to binding to all the available
> interfaces (0.0.0.0) available on the system.

I think you can do that with the virtual_host config parameter.

            regards, tom lane