{"id":21403,"date":"2015-07-10T18:23:20","date_gmt":"2015-07-10T12:53:20","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=21403"},"modified":"2015-07-11T11:32:34","modified_gmt":"2015-07-11T06:02:34","slug":"ssh-tunneling-with-aws-private-subnet","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/ssh-tunneling-with-aws-private-subnet\/","title":{"rendered":"SSH tunneling with AWS private subnet"},"content":{"rendered":"<p>It has been a long time while I was working over the project where we required accessing Rabbit MQ dashboard. I know <a title=\"Integrating Rabbit MQ with Grails\" href=\"http:\/\/www.tothenew.com\/blog\/few-simple-steps-for-integrating-rabbit-mq-with-grails\/\">accessing the Rabbit MQ<\/a> is not the difficult task but my scenario was bit complex.<\/p>\n<p>Scenario: I was supposed to access <b>Rabbit MQ dashboard<\/b> from AWS Linux machine which is placed in the private subnet of VPC (AWS) with no public IP. At the same time I used to login over Rabbit MQ server using bastion host to do command line changes.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-22544\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/07\/SSH-Tunneling1.jpg\" alt=\"SSH Tunneling\" width=\"612\" height=\"239\" \/><\/p>\n<p>After digging into some of the blogs over the internet, I have decided to go for SSH tunneling to access the dashboard over my local machine.<\/p>\n<p>To do SSH tunneling I am assuming given pointers are taken care<\/p>\n<ul>\n<li>Necessary ports are open between Bastion host and Rabbit MQ server.<\/li>\n<li>SSH access between your local machine and bastion host<\/li>\n<\/ul>\n<p>Here is command<\/p>\n<p>[js]ssh -p 2200 -f -N user@BastionHost -L 27651:RabbitMQServer:15672[\/js]<\/p>\n<p>Here is attributes explanation<\/p>\n<p>-p : port number if you are using other than 22.<br \/>\n-F : Requests ssh to go to background just before command execution<br \/>\n-N: Do not execute a remote command. This is useful for just forwarding ports<br \/>\n-L : Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side.<\/p>\n<p>Now, to access Rabbit MQ dashboard, Use http:\/\/localhost:2765 in the browser.<\/p>\n<p>Reference:<br \/>\nhttps:\/\/help.ubuntu.com\/community\/SSH\/OpenSSH\/PortForwarding<\/p>\n<address>Thanks<\/address>\n<address>Prashant<\/address>\n","protected":false},"excerpt":{"rendered":"<p>It has been a long time while I was working over the project where we required accessing Rabbit MQ dashboard. I know accessing the Rabbit MQ is not the difficult task but my scenario was bit complex. Scenario: I was supposed to access Rabbit MQ dashboard from AWS Linux machine which is placed in the [&hellip;]<\/p>\n","protected":false},"author":120,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":34},"categories":[1174],"tags":[1547,260,1982,975,1692],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/21403"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/120"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=21403"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/21403\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=21403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=21403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=21403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}