Re: Proxy Server ... - Mailing list pgsql-general

From Gregory Seidman
Subject Re: Proxy Server ...
Date
Msg-id 20020625031628.GA17550@cs.brown.edu
Whole thread Raw
In response to Proxy Server ...  ("Marc G. Fournier" <scrappy@hub.org>)
List 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




pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Proxy Server ...
Next
From: Hiroshi Inoue
Date:
Subject: Re: SQL server application porting headache