Re: Defining local IP address when opening connections to database

Поиск
Список
Период
Сортировка
От Scott Harrington
Тема Re: Defining local IP address when opening connections to database
Дата
Msg-id alpine.WNT.2.00.1203071356590.6596@turks
обсуждение исходный текст
Ответ на Defining local IP address when opening connections to database  (Michael Bauland <Michael.Bauland@knipp.de>)
Список pgsql-jdbc
On Wed, 7 Mar 2012, Michael Bauland wrote:

> I've got a problem when using the PostgreSQL JDBC driver to open a
> connection to a database (not using SSL). The server on which I'm using
> the driver has several IPs configured, but I would like to use a certain
> IP (since only for that IP the firewalls have been set-up to allow the
> connection to the database). Looking at the documentation I couldn't
> find a way to define this local IP.
> Have I missed something? If not, would it be possible to add this
> feature of defining the local IP when setting up a connection?

You haven't missed anything. I had the same requirement a while ago and
needed to patch (see attached) my local build to bind to a localAddress
specified in the JDBC properties.

I find it useful to bind to a particular local address not only for
routing but also simply to improve the connection logs.

Hope this helps.

Вложения

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Michael Bauland
Дата:
Сообщение: Re: Defining local IP address when opening connections to database
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Defining local IP address when opening connections to database