Help us understand the problem. What is going on with this article?

透過Bastion Server安全的連線到VPC內

aws-bastion-host.png

在AWS環境中通常會用一台Bastion Server(俗稱跳板機)來縮限從外部Internet來的存取,雖然安全,但也讓Developer常常面臨到debug的難題,例如要觀看private subnet內的web顯示,因此來筆記一下解法。

0. Prerequisite

  1. SSH Client

1. 建立SSH Tunnel

ssh -D 55555 -i <bastion.pem> ec2-user@<Bastion Host>

-D 55555 可以換成local上任何閒置的port

2. 設定SOCK Proxy

Network > 網路連線(Wifi or other) > Advanced > Proxies > SOCKS Proxy

打勾後填上localhost與前一步驟所設定的port即可,設定完成後記得按下Apply後生效。

如果是Chrome的話,有一些人會裝這個extension FoxyProxy Standard,設定方式其實是差不多的~

3. 測試連線

設定完成後,如果你的private subnet後原本已經有運行web相關的服務的話,就可以直接打開瀏覽器測試囉。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした