Home > Blogroll, dba, security > listener with tcps

listener with tcps

February 14th, 2007

How can you use SSL to encrypt your network traffic?

Here is how I did it.

  1. Install Oracle Certification Authority 10.1.4
  2. you need a CA to approve a certification request

  3. Install Oracle Database 10gR2 Enterprise Edition with Advanced Security Options
  4. Start Wallet Manager
  5. from Database Oracle Home, start $ORACLE_HOME/bin/owm

  6. create a new Wallet
  7. define a password

  8. add certificate request
  9. fill the fields or chose advanced :
    CN=yourhost,DC=yourdomain,DC=com

  10. Start OCA
  11. from OCA home, start $ORACLE_HOME/oca/bin/ocactl start

  12. Open OCA homepage
  13. Open your browser on
    https://yourhost.yourdomain.com:6600/oca/user
    Install the ROOTca in your browser

  14. Request a new certificate
  15. Server/SubCA Certificates - Request a certificate - Paste String from OWM

  16. Approve the certificate
  17. log on the admin page,
    https://yourhost.yourdomain.com:6600/oca/admin
    define your identity, then in Certificate Management, select the certification request and approve it.

  18. Import the certificate in OWM
  19. Select the approved certificate, view details.
    In owm, import user certificate , and copy paste the BASE64 string.
    To get the CA string, download the CA certificate from
    https://yourhost.yourdomain.com:6600/oca/certDownload

  20. Save the wallet
  21. The certificate should show [Ready]
    Select Autologin
    Save in system default (/etc/ORACLE/WALLETS/oracle)

Ok, we are now ready to use the TCPS protocol

listener.ora
LISTENER=(DESCRIPTION=(ADDRESS=(PROTOCOL=<b>TCPS</b>)
(HOST=yourhost.yourdomain.com)(PORT=1521)))

tnsnames.ora
LSC01=(DESCRIPTION=(ADDRESS=(PROTOCOL=<b>TCPS</b>)
(HOST=yourhost.yourdomain.com)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=LSC01)))

Start the listener
$ lsnrctl start
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=<b>TCPS</b>)
(HOST=yourhost.yourdomain.com)(PORT=1521)))
The command completed successfully

Test it!
$ sqlplus scott/tiger@lsc01
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
SQL&gt;

  1. February 15th, 2007 at 00:31 | #1

    Nifty! Thanks or posting that.

  2. Ivan Pechorin
    March 8th, 2007 at 22:25 | #2

    It’s wierd to provide SSL encryption only as part of “Advanced security” option of Enterprise Edition.

    It is year 2007 now. SSL is basic for few years, not “Advanced”!

  3. March 10th, 2007 at 23:43 | #3

    I have multiple customers who use SSH tunnel to save 25% on license cost. Well, if you need security, you should not be too greedy :twisted:

  4. December 30th, 2008 at 13:11 | #4

    Thanks for posting this Laurent.

    It’s a very comprehensive note and has saved me a lot of time.

    Mostly because my client does not have the Advanced Security Option so we have to rule out SSL for the moment.

    Thanks,
    Alan…

  1. February 15th, 2007 at 10:46 | #1
  2. February 26th, 2007 at 16:49 | #2