pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: 'Michael Bauland' <Michael.Bauland@knipp.de>
To: pgsql-jdbc@postgresql.org
Subject: Re: Defining local IP address when opening connections to database
Date: Wed, 7 Mar 2012 11:49:41 -0500
Message-ID: <03b601ccfc82$4badef60$e309ce20$@yahoo.com> (raw)
In-Reply-To: <4F578AB8.2050002@knipp.de>
References: <4F578AB8.2050002@knipp.de>


> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-
> owner@postgresql.org] On Behalf Of Michael Bauland
> Sent: Wednesday, March 07, 2012 11:20 AM
> To: pgsql-jdbc@postgresql.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.






view thread (7+ messages)  latest in thread

Message-ID: <03b601ccfc82$4badef60$e309ce20$@yahoo.com>
Permalink:  ../03b601ccfc82$4badef60$e309ce20$@yahoo.com/
Also on:    postgresql.org/message-id/03b601ccfc82$4badef60$e309ce20$@yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: polobo@yahoo.com, Michael.Bauland@knipp.de
  Subject: Re: Defining local IP address when opening connections to database
  In-Reply-To: <03b601ccfc82$4badef60$e309ce20$@yahoo.com>
  References: <4F578AB8.2050002@knipp.de> <03b601ccfc82$4badef60$e309ce20$@yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox