{"id":388,"date":"2022-07-15T10:19:34","date_gmt":"2022-07-15T10:19:34","guid":{"rendered":"http:\/\/wp.chaoyu.nl\/?p=388"},"modified":"2022-07-15T10:44:13","modified_gmt":"2022-07-15T10:44:13","slug":"use-bastion-service-to-connect-to-autonomous-db-within-a-private-subnet-plsql-developer","status":"publish","type":"post","link":"https:\/\/chaoyu.nl\/?p=388","title":{"rendered":"Use Bastion Service to Connect To Autonomous DB within a private subnet PLSQL Developer"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote has-very-light-gray-to-cyan-bluish-gray-gradient-background has-background is-layout-flow wp-block-quote-is-layout-flow\"><p>Validate VCN security list ingression rule.<\/p><\/blockquote>\n\n\n\n<ol class=\"wp-block-list\"><li>Find your database subnet<\/li><li>check security list settings<\/li><li>if 1522 ingress rule not existing, add it <\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_e2f9582944014d2a8353df1056469ecf_mv2.png\" alt=\"\" class=\"wp-image-389\" width=\"839\" height=\"215\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Create A Bastion in the same VCN or existing bastion in the same VCN where your Autonomous DB reside<\/p>\n\n\n\n<blockquote class=\"wp-block-quote has-black-color has-very-light-gray-to-cyan-bluish-gray-gradient-background has-text-color has-background is-layout-flow wp-block-quote-is-layout-flow\"><p>Create Session<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1302\" height=\"802\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_9bdcee5ea6cd4f6797d95a3d6ea0ca69_mv2.png\" alt=\"\" class=\"wp-image-390\"\/><figcaption>type: SSH port forwarding | IP address | Port: 1522 | Paste SSH Key <\/figcaption><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote has-very-light-gray-to-cyan-bluish-gray-gradient-background has-background is-layout-flow wp-block-quote-is-layout-flow\"><p>Open SSH Tunnel<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1621\" height=\"294\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_ee9cb5697996481ab3a744424790d754_mv2.png\" alt=\"\" class=\"wp-image-393\"\/><figcaption>View SSH commands and Copy it<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"375\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_e853998324c847c2ab6545312c305dd7_mv2.png\" alt=\"\" class=\"wp-image-394\"\/><\/figure>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<p class=\"wp-block-paragraph\">&#8220;<strong><em><code><kbd><s>-i &lt;privateKey><\/s><\/kbd><\/code><\/em><\/strong><code>\"<\/code>  is not needed since we use public key, change &#8220;<strong><em>&lt;localPort><\/em><\/strong>&#8221; to &#8220;<strong><em>1522<\/em><\/strong>&#8220;, add &#8220;<strong><em>-v<\/em><\/strong>&#8221; ( verbose) at the end of the ssh command and run command<\/p>\n<\/div>\n<\/div>\n\n\n\n<blockquote class=\"wp-block-quote has-very-light-gray-to-cyan-bluish-gray-gradient-background has-background is-layout-flow wp-block-quote-is-layout-flow\"><p>Download DB wallet<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1650\" height=\"750\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_bc3feaa700f5464691feabd5d10208b7_mv2.png\" alt=\"\" class=\"wp-image-407\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1060\" height=\"412\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_b3179ca54b2449aeb2f87cd31321ecaf_mv2.png\" alt=\"\" class=\"wp-image-408\"\/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote has-very-light-gray-to-cyan-bluish-gray-gradient-background has-background is-layout-flow wp-block-quote-is-layout-flow\"><p>Unzip file and edit tnsnames.ora<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1079\" height=\"405\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_afa5294663d14a45ab60be083bc69cde_mv2.png\" alt=\"\" class=\"wp-image-410\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>Copy all tns settings from<em><strong> Wallet_APEXPROCDBS\/tnsnames.ora<\/strong><\/em> to<em> <strong>tnsnames.ora<\/strong><\/em><\/li><li>Open<strong> <em>sqlnet.ora<\/em><\/strong> in<strong><em> Admin folder<\/em><\/strong>, change the DIRECTORY and point it to your wallet folder<\/li><li>open <em><strong>tnsnames.ora<\/strong><\/em> in <em><strong>admin<\/strong> <\/em>folder, and change <strong>host<\/strong> to <strong>localhost<\/strong>.<\/li><li>open PLSQL Developer and add new connection<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1189\" height=\"222\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_3f7a141ab1d340c39767cf1d10e424ee_mv2.png\" alt=\"\" class=\"wp-image-411\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1013\" height=\"385\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_f4b869b4f0694b8bbdf534cc30b412bc_mv2.png\" alt=\"\" class=\"wp-image-412\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/wp.chaoyu.nl\/wp-content\/uploads\/2022\/07\/e56ed0_87d1508638b8412397e0fd6bb7888b49_mv2.png\" alt=\"\" class=\"wp-image-413\" width=\"838\" height=\"331\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Validate VCN security list ingression rule. Find your database subnet check security list settings if 1522 ingress rule not existing, add it Create A Bastion in the same VCN or existing bastion in the same VCN where your Autonomous DB reside Create Session Open SSH Tunnel &#8220;-i &lt;privateKey>&#8221; is not needed since we use public&#8230;<\/p>\n","protected":false},"author":1,"featured_media":412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,11,12],"tags":[],"class_list":["post-388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apex","category-oci","category-oralce-db"],"_links":{"self":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=388"}],"version-history":[{"count":20,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/388\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/posts\/388\/revisions\/420"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=\/wp\/v2\/media\/412"}],"wp:attachment":[{"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chaoyu.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}