日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

How to create a jump server in AWS VPC

發布時間:2024/6/30 编程问答 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 How to create a jump server in AWS VPC 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

本來是寫的Word文檔,給其他國家的同時看的,所以一開始就是英文寫的,也沒打算翻譯成為中文了,順便抱怨下,網上資料找了很久的資料都沒有看到介紹怎么在單機環境下搭建RD Gateway的,寫本文的目的是給公司的同事介紹下怎么搭建一臺跳轉機來做遠程登錄,同時希望可以幫到有需要的人。

在AWS的VPC中,我們是把所有的服務器都獨立于外部的,不允許外部直接進行訪問,所以如果要遠程登錄到VPC里面的服務器,是需要通過一臺跳轉服務器來進行遠程登錄的。這里在Windows的環境下是通過RD Gateway over SSL 的方式搭建的。本人已經測試過了,可以正常使用。

?由于個人比較偷懶,不想在Blog中進行編輯了,所以原始文檔中的圖片就都沒法插入到博客中了,下面在每個具體的任務中的數字排序也有點亂了。但是如果你要看的話,就是按照順序看下就好了,操作步驟也是一步一步操作的。基本上文字描述大家都比較清楚。如果你有什么問題不明白的可以留言問我。

?

?

Create jump box

Request a server from AWS

  • Select an AMI, here we select the windows server 2012 R2 Base
  • ?

  • Select t2.small as instance type
  • In the step of ‘Configure Instance’, follow by:
  • Network: the VPC you just created

    Subnet: select the public subnet

    Auto-Assign public IP: Enable

    Others by default.

  • Default 30G size is ok in the step of ‘Add Storage’
  • In the ‘Add Tags’ step, please specify the name: Group(your number)-JumperBox
  • In the step of ‘Configure Security Group’, we create a new security group here, and allow the port of 3389, 443 to access by everyone(in the real case, 3389 only for administrator’s IP access)
  • ?

  • When you click the ‘Launch’ button, it will ask you to select a key pairs, please create a new one here, and for the coming EC2 request, you should use the same key pairs file.
  • ?

  • Go back to Instance page, and find the EC2 server you just created, find the IP, then prepare to remote to this server(please note you have to switch to non-Merck network environment to remote this server)
  • ?

  • Click this server, and from the Actions menu to get this server’s password, here you need to upload the key pairs file to get the password
  • ?

  • Open your compute, start->run->input ‘mstsc /f’ command. Input username and password. Then login to the server.
  • Copy the certificate generation tool from sharefoler to a place you want to save.
  • Open your cmd window, locate into the tool folder:
  • Create the certificate

    ?

    ?

  • Create a self-sign root cert(issuer):
  • makecert -n "CN=yourpublicip" -r? -eku 1.3.6.1.5.5.7.3.1 -sv yourpublicip.pvk yourpublicip.cer

    ?

    input the password, for testing purpose, you can just input 1

    ?

    ?

  • Convert the pvk file to pfx file, execute the bellow two commands one bye one, input password 1 in the second command.
  • cert2spc yourpublicip.cer yourpublicip.spc

    pvk2pfx -pvk yourpublickip.pvk -spc yourpublicip.spc -pfx youpublicip.pfx

    ?

    Now the pfx file is created.

  • So far, we have one .cer file, and one .pfx file. we will use the two files later
  • Click Server Manager->on the Dashboard->Add roles and features
  • Select Role-based or feature-based installation
  • Install the Remote Desktop Services

    ?

  • Select the current server
  • ?

  • In the server roles, select Remote Desktop Services
  • ?

  • In the role services, select Remote Desktop Gateway, it will prompt a window to ask you add related features, please add all.
  • ?

  • In the Network Policy And Access Services, please select the Network Policy Server
  • ?

  • In the Web Server Role(IIS), except for the default selection, please add one more: ASP.NET 4.5.
  • ?

  • Click install and wait it till to complete.
  • You will see the components like below screenshot if you installed successfully
  • In the administrative tools, open the internet information services(IIS) manager.
  • click the computer name node:
  • locate into the Server Certificates which is on the right pane under IIS section, double click it
  • Configure the RD Gateway over SSL

    ?

  • in the Actions pane, click Import… link, it will ask you provide the .pfx file
  • ?

  • Browse the .pfx file you saved in the last step. And password should be empty, click OK button
  • ?

  • Locate into the Default Web Site node
  • ?

  • In the right pane, click Bindings… link
  • ?

  • Add 443 port, and select the cert you just upload. Then click OK button.
  • ?

  • Go back to the administrative tools, click Remote Desktop Gateway Manager
  • ?

  • Under the policies, select the Connection Authorization Policies, and Create New Policy
  • ?

  • Using the wizard
  • ?

  • Input the name
  • ?

  • Add who can connect this RD gateway, here we let all users who are in the builtin\users group
  • ?

  • Keep default in the Device Redirection secton
  • ?

  • Session timeout, enable session timeout
  • ?

  • Click next till to finish.
  • Follow the above same step, create another policy 2, in this policy, we allow the administrators group user can connect the RD Gateway
  • Now you have created two policies as bellow:
  • ?

  • Let’s start to create RAP now
  • ?

  • Add the users group
  • ?

  • Allow users to connect to any network resource(computer)
  • ?

  • Allow connections only to port 3389
  • ?

  • Click finish, and the same, create another RAP policy for administrators, then you can see the bellow screenshot
  • ?

  • We are almost done, last we need to configure the SSL for the RD Gateway, locate into computer node, right click and select properties
  • ?

    ?

  • Click the SSL Certificate tab, and select Import a certificate…
  • ?

  • Browse and import certificate which you just save at the before step.
  • ?

  • Empty password, click OK button to show the bellow alert.
  • ?

  • Uncheck the UDP Transport Settings in the Transport Settings tab
  • Click Apply and close this window
  • Restart the RD Gateway services.
  • ?

    Create a user in server

  • Create a user
  • ?

  • Password never expires
  • ?

  • Make sure this user only in the Users group.
  • ?

    Install certificate on your personal computer

  • Copy the .cer file from server to your laptop
  • Double click the cert
  • Click Install Certificate… button
  • ?

  • Choose the ‘Trusted Root Certification Authorities’ as the certificate store.
  • ?

  • Click Next ,when you click finish button, it will have alter window, please click Yes button
  • To verify the cert if is ok, open your IE, and input https://yourpublicip , if there is no warning page, then it turns out you are in the right status.
  • ?

    Start remote desktop connection from your computer

  • In the advanced tab, click Settings…
  • Select ‘Use these RD Gateway server settings’
  • Input the server IP
  • Check the Bypass RD Gateway….
  • Uncheck ‘Use my RD Gateway…’
  • Save the file, and click to connect
  • Firstly, it will ask you to input the credential of the RD Gateway user name and password, if pass, then it will ask you to input the target server credentials.
  • ?

    ?

    轉載于:https://www.cnblogs.com/dannyH/p/7327834.html

    總結

    以上是生活随笔為你收集整理的How to create a jump server in AWS VPC的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。