Differences between revisions 32 and 40 (spanning 8 versions)
Size: 9518
Comment:
|
Size: 9728
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
/* College VPN does not work since /etc/postgresql/8.3/db/pg_hba.conf only allows 146.169.0.0 | |
Line 8: | Line 8: |
*/ | |
Line 10: | Line 11: |
This is similar to using VPN but at an application-level. Use an SSH client to create a tunnel from your computer outside the network to db.doc.ic.ac.uk through one of the externally-accessible SSH servers: shell1.doc.ic.ac.uk - shell4.doc.ic.ac.uk. Here is the syntax from a Linux terminal (the same command can be run in a Mac OS X terminal): | Use an SSH client to create a tunnel from your computer outside the college network to db.doc.ic.ac.uk through one of the externally-accessible SSH servers: shell1.doc.ic.ac.uk - shell4.doc.ic.ac.uk. Here is the syntax from a Linux terminal (the same command can be run in a Mac OS X terminal): |
Line 14: | Line 15: |
After you authenticate, the above command will set up a tunnel from port 12345 on your local computer to port 5432 (upon which the PostgreSQL service listens on db.doc.ic.ac.uk). You can then configure the PostgreSQL client on your local computer to | After you authenticate, the above command will set up a tunnel from port 12345 on your local computer to port 5432 (upon which the PostgreSQL service listens) on db.doc.ic.ac.uk. You can then configure the PostgreSQL client on your local computer to |
Line 19: | Line 20: |
(Replace {{{pguser}}} and {{{theDB}}} with the appropriate DoC PostgreSQL user-name and database respectively) | (Replace {{{pguser}}} and {{{theDB}}} with the appropriate DoC PostgreSQL user-name and database respectively). |
Line 27: | Line 28: |
First of all, you will need the PostgreSQL jdbc driver in your Java classpath. Download the JAR file from http://jdbc.postgresql.org/ or if you are using Debian or Ubuntu, 'apt-get install libpg-java' (which installs /usr/share/java/postgresql.jar). Update your CLASSPATH environment variable to reference the relevant JAR file location or include it in the '-cp' argument of your java/javac invocations. | First of all, you will need the PostgreSQL jdbc driver in your Java classpath. Download the JAR file from http://jdbc.postgresql.org/ or if you are using Debian or Ubuntu, '{{{apt-get install libpg-java}}}' (which installs /usr/share/java/postgresql.jar). Update your CLASSPATH environment variable to reference the relevant JAR file location or include it in the '-cp' argument of your java/javac invocations. |
Line 147: | Line 148: |
"authenticated SSL."); | "SSL with validation."); |
Line 170: | Line 171: |
* Are you referencing the PostgreSQL jdbc driver correctly in your Java classpath? * Did you correctly configure and reference a local Java key store? |
PostgreSQL connections from off-site
If you want to connect directly to the PostgreSQL server from outside the college network, you must use SSL encryption. Here are four possible ways to address this.