Skip site navigation (1) Skip section navigation (2)

Re: Defining local IP address when opening connections to database

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'Michael Bauland'" <Michael(dot)Bauland(at)knipp(dot)de>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Defining local IP address when opening connections to database
Date: 2012-03-07 16:49:41
Message-ID: 03b601ccfc82$4badef60$e309ce20$@yahoo.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org [mailto:pgsql-jdbc-
> owner(at)postgresql(dot)org] On Behalf Of Michael Bauland
> Sent: Wednesday, March 07, 2012 11:20 AM
> To: pgsql-jdbc(at)postgresql(dot)org
> Subject: [JDBC] Defining local IP address when opening connections to
> database
> 
> Hi,
> 
> 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?
> 
> Cheers,
> 
> Michael

Are you missing the obvious, in which case read Kevin's and Dave's
responses, or do you mean that on the "client" machine (i.e., the one using
JDBC) you have multiple network adapters and only one of them is allowed to
connect to the database?

If the latter is the case I am not sure about JDBC but I would presume you
could setup some form of routing table on your machine so that any traffic
to the server IP address is forced to be routed through the appropriate
network card.

David J.




In response to

Responses

pgsql-jdbc by date

Next:From: Michael BaulandDate: 2012-03-07 17:04:55
Subject: Re: Defining local IP address when opening connections to database
Previous:From: Kevin GrittnerDate: 2012-03-07 16:41:37
Subject: Re: Defining local IP address when opening connections to database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group