Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 94FB963596B for ; Mon, 7 Sep 2009 07:40:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 20971-05 for ; Mon, 7 Sep 2009 10:40:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from titania.wxnz.net (titania.wxnz.net [58.28.4.13]) by mail.postgresql.org (Postfix) with ESMTP id DB568634283 for ; Mon, 7 Sep 2009 07:40:25 -0300 (ADT) Received: from gonzo (ip-118-90-135-193.xdsl.xnet.co.nz [118.90.135.193]) by titania.wxnz.net (Postfix) with ESMTP id 1C9351DB81B8 for ; Mon, 7 Sep 2009 22:40:22 +1200 (NZST) Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1Mkbe2-00088P-78 for pgsql-php@postgresql.org; Mon, 07 Sep 2009 22:40:22 +1200 To: pgsql-php@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.php Subject: Re: How to select the source ip address for a connection to the database server Date: 7 Sep 2009 10:40:21 GMT Organization: Dis (not Dat) Organisation Lines: 28 Message-ID: References: <20090902202318.hp0bplmn4kkc48k0@zeus.netdynamics.gr> NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1252320021 14143 127.0.0.1 (7 Sep 2009 10:40:21 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.991 tagged_above=-10 required=5 tests=AWL=-0.251, BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200909/9 X-Sequence-Number: 4067 On 2009-09-02, dimitris.sakellarios@telesuite.gr wrote: > > Hi, > > I am currently=A0working with PHP5+PGSQL 8.2.13 and i have the =20 > following problem to solve and i need your help. > > The server hosting PHP+psql=A0client=A0has 1 physical network =20 > interfaces with multiple=A0subinterfaces using different IPs. > > One of those IP=A0is dedicated to my domain, but it is not servers =20 > default IP address since i share the server. > > So the problem that i need to solve is how am i going to be able to =20 > use-select my domains IP address as source=A0to connect to the remote =20 > databases. > > Is there any configuration to settle default source IP the client will us= > e? > > At the moment all my attempts to connect to the database=A0make use =20 > of=A0servers default interface IP as source. > > Thanks in advance for your help. easiest way it probably by setting a routing rule, you need root/adimnistrator to do this.