Re: Proxy Server ...

From: Gregory Seidman <gss+pg(at)cs(dot)brown(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Proxy Server ...
Date: 2002-06-25 03:16:28
Message-ID: 20020625031628.GA17550@cs.brown.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marc G. Fournier sez:
} does anyone know of a proxy server that i can run on a server to "pretend"
} its a postgresql server? so that I can connect to IP:port and have it
} establish a connection to IP:5432?
}
} Basically, I have a domain running in a FreeBSD jail, with a database
} server behind it ... the database server isn't accessible from the
} Internet, only from the local network ... so I need to run a proxy server
} in the jail that will accept connections, thru it, to the database server
} ...
}
} I need it to work for JDBC connections as well as ODBC (pgAdminII) ...
} which I don't think is any different, but figured i'd mention it "just in
} case" ...
}
} I've looked at SSLProxy (JDBC Proxy server), but its SSL only, which makes
} pgAdminII a problem :(

There are several possible solutions. The simplest is to use the socket
program, which will do what you want (with minor trickery, see the man
page); it can be found at http://sources.isc.org/network/utils/socket.txt .
Another is to use ssh with the -L or -R flag (look at the man page). Still
yet another is that if you are running a firewall and natd, which is what
it sounds like, natd has a -redirect_port flag which will let you do what
you want (again, see the man page). Again, those solutions are:

1. socket -bfslp "socket <pg host> 5432" <listenport>
2. ssh -L <listenport>:<pg host>:5432
3. natd -redirect_port tcp <host>:<listenport> <pg host>:5432

(I'm not too sure of those commandlines. Some testing and reading of man
pages may be necessary.)

} Thanks ...
--Greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-06-25 03:23:10 Re: Proxy Server ...
Previous Message Gordon Luk 2002-06-25 03:03:17 [Please Help!!!!!!!!] Problem in Chinese (Big5)!!! Version 7.2.1 (come with Redhat 7.3)