Microsoft SQL Server(DBaaS) server connection
Scenario Overview
Microsoft SQL Server(DBaaS) server connection The scenario involves creating a Bastion host (Virtual Server) and a Database service, and accessing the DB service through the Bastion host. To reliably connect to Microsoft SQL Server (DBaaS) in the Samsung Cloud Platform environment, you need to create a Bastion host and establish a network connection using it. To maintain stability and a high level of security, we recommend configuring the Database service in a Private Subnet environment and setting up the Bastion host in a restricted Public Subnet environment.
This scenario primarily describes creating a Bastion host and Database service, configuring the network environment for Bastion host and Database access, and connecting through a DB client.
Scenario components
You can build the scenario using the following services.
| Service group | service | Detailed description | |
|---|---|---|---|
| Networking | VPC | A service that provides an isolated virtual network in a cloud environment | |
| Networking | VPC > Subnet | A service that lets users segment the network within a VPC to match their purpose and scale | |
| Networking | VPC > Public IP | A service that reserves a public IP and allocates and releases it to Compute resources. | |
| Networking | VPC > Internet Gateway | A service that connects VPC resources to the Internet | |
| Networking | Security Group | Virtual firewall that controls server traffic | |
| Database | Microsoft SQL Server(DBaaS) | A service that easily creates and manages Microsoft SQL Server in a web environment | |
| Compute | Virtual Server | Virtual server optimized for cloud computing | |
| Compute | Virtual Server > Keypair | Encryption file used to connect to the Virtual Server |
- Since the default policy of the Security Group is Deny All, you must register only the allowed IPs.
- The All Open(Any IP, Any Port) policy for In/Outbound can expose cloud resources directly to external threats.
- By specifying the required IP and Port and setting a policy, you can strengthen security.
Scenario setup method
Create the services needed to build the scenario by following the procedure below.
1. ## Configure Network
Describes the process of configuring the network environment for accessing the Bastion Host and Database services.
1-1. ### Create VPC
- All Services > Networking > VPC Click the menu. 1. Navigate to the VPC’s Service Home page.
- On the Service Home page, click the Create VPC button. 2. Go to the Create VPC page.
- On the VPC creation page, enter the information required to create the service.
- Enter the IP range as
192.168.x.0/16.
- Enter the IP range as
- Summary Check the detailed information and estimated billing amount generated in the panel, and click the Complete button.
- When creation is complete, check the created resources on the VPC List page.
1-2. ### Create Subnet
- All Services > Networking > VPC Click the menu. 1. Navigate to the VPC’s Service Home page.
- On the Service Home page, click the Subnet menu. 2. Go to the Subnet list page.
- Create Subnet Click the button. 3. Go to the Subnet Creation page.
- On the Subnet Creation page, enter the information required to create the service.
- Select the Subnet type as General.
- Select a pre‑created VPC.
- Enter the IP range as
192.168.x.0/24.
- Summary Check the detailed information and estimated billing amount generated in the panel, and click the Complete button.
- After creation is complete, check the created resources on the Subnet List page.
1-3. ### Create Internet Gateway
- All Services > Networking > VPC Click the menu. 1. Navigate to the VPC’s Service Home page.
- On the Service Home page, click the Internet Gateway menu. 2. Go to the Internet Gateway List page.
- Internet Gateway creation Click the button. 3. Go to the Create Internet Gateway page.
- On the Internet Gateway Creation page, enter the required information needed to create the service.
- Select a pre‑created VPC.
- In the Firewall usage option, select Use.
- Summary Check the detailed information and estimated billing amount generated in the panel, and click the Complete button.
- Once creation is complete, check the created resource on the Internet Gateway List page.
1-4. ### Create Public IP
- All Services > Networking > VPC Click the menu. 1. Navigate to the VPC’s Service Home page.
- On the Service Home page, click the Public IP menu. 2. Go to the Public IP List page.
- Public IP reservation Click the button. 3. Go to the Public IP reservation page.
- On the Public IP reservation page, enter the required information for service reservation.
- Summary Check the detailed information and estimated billing amount generated in the panel, and click the Complete button.
- After creation is complete, check the created resources on the Public IP List page.
1-5. ### Create Security Group
- Click the All Services > Networking > Security Group menu. 1. Go to the Service Home page of the Security Group.
- On the Service Home page, click the Create Security Group button. 2. Go to the Security Group Creation page.
- On the Security Group creation page, enter the required information to create the service.
- Check the input information and click the Done button.
- After creation is complete, verify the created resources on the Security Group List page.
2. ## Create Bastion host
Explains the process of configuring a Bastion Host that requires the Database access client to be installed.
2-1. ### Create Server Keypair
- All Services > Compute > Virtual Server Click the menu. 1. Navigate to the Service Home page of the Virtual Server.
- On the Service Home page, click the Keypair menu. 2. Go to the Keypair List page.
- Create Keypair button, click it. 3. Go to the Keypair creation page.
- On the Keypair Creation page, enter the required information needed to create the service.
- Verify the creation information and click the Complete button.
- The key can be downloaded only for the first time, and reissuance is not provided.
- Please store the downloaded key in a secure location.
2-2. ### Create Bastion host
- Click the All Services > Compute > Virtual Server menu. 1. Navigate to the Service Home page of the Virtual Server.
- On the Service Home page, click the Create Virtual Server button. 2. Go to the Create Virtual Server page.
- On the Virtual Server Creation page, enter the required essential information needed to create the service.
- Select Windows for the image.
- Select the pre-created VPC and Subnet.
- Click Use NAT, and select the reserved Public IP from 1-4. Public IP 생성하기.
- Connect the Keypair created in 2-1. Create Server Keypair.
- Summary Check the detailed information and estimated billing amount generated in the panel, and click the Complete button.
- When creation is complete, check the created resources on the Virtual Server list page.
2-3. ### Check Bastion host login ID and PW
- All Services > Compute > Virtual Server Click the menu. 1. Navigate to the Service Home page of the Virtual Server.
- On the Service Home page, click the Virtual Server menu. 2. Go to the Virtual Server List page.
- Virtual Serve List page, click the resource you created in 2-2. Bastion host 생성하기. 3. Go to the detailed information page for the resource.
- Click the RDP password view button in the Keypair name field on the detail information page. 4. RDP password lookup A popup window opens.
- RDP password lookup in the popup window, attach the keypair file downloaded from 2-1. 서버 Keypair 생성하기.
- After attaching, click the Password verification button. 6. The ID and password required to access the resource are displayed.
- The ID and Password are used later as credentials to access the Bastion host in 5-1. Bastion host 접속하기.
3. ## Create Database
Describes the process of creating a Database service.
3-1. ### Create Microsoft SQL Server(DBaaS) Service
- All Services > Database > Microsoft SQL Server(DBaaS) Click the menu. 1. Go to the Service Home page of Microsoft SQL Server (DBaaS).
- On the Service Home page, click the Microsoft SQL Server(DBaaS) Create button. 2. Microsoft SQL Server(DBaaS) Creation Navigate to the page.
- Microsoft SQL Server(DBaaS) Creation page, enter the required information to create the service.
- Select the pre‑created VPC and Subnet and connect them.
- Enter database-related creation information on the required information input screen.
- Add the Bastion host IP in the IP access control item.
- The database port defaults to 2866, but users can also specify a different one.
- Summary Check the detailed information and estimated billing amount generated in the panel, and click the Complete button.
- After creation is complete, check the created resource on the Microsoft SQL Server(DBaaS) list page.
4. ## Configure Rules
Describes the process of setting rules for a user to connect to the Bastion host and rules for connecting to the Database from the Bastion host.
4-1. ### Security Group Add security rule
- Click the All Services > Networking > Security Group menu. 1. Go to the Service Home page of the Security Group.
- On the Service Home page, click the Security Group menu. 2. Navigate to the Security Group List page.
- 1-5. 3. Security Group CreateSelect the Security Group resource created in 3. Go to the detailed information page for the resource.
- On the detail information page, click the Rules tab. 4. Go to the Rules tab.
- Click the Add Rule button on the Rule tab. 5. Add Rule Navigate to the popup window.
- Add Rule In the popup window, enter the rule below, and click the Confirm button.
Direction Remote Target address Protocol Port Explanation Inbound CIDR User PC IP TCP 3389 (RDP) Bastion access PC → Bastion host Outbound CIDR DB IP TCP Database Port (manual entry) Bastion host → Database Table. Security Group rules that need to be added
4-2. ### Add IGW Firewall rule
- All Services > Networking > FirewallClick the menu. 1. Navigate to the Firewall’s Service Home page.
- On the Service Home page, click the Firewall menu. 2. Go to the Firewall List page.
- On the Firewall List page, select the Internet Gateway resource name created in 1-3. Internet Gateway 생성하기. 3. Go to the detailed information page for the resource.
- On the detail information page, click the Rules tab. 4. Go to the Rules tab.
- Click the Add Rule button on the Rule tab. 5. Add Rule Navigate to the popup window.
- Add Rule In the popup window, enter the rule below, and click the Confirm button.
Origin address Destination address Protocol Port Operation Direction Explanation Bastion connection PC IP Bastion host IP TCP 3389(RDP) Allow Inbound User PC → Bastion host Table. Internet Gateway Firewall rules to be added
5. ## Database Connect
Describes the process of a user connecting to a database through a DB client program.
This guide provides instructions on how to connect using SSMS (Microsoft SQL Server Management Studio). Database client programs and CLI utilities are diverse, so you can install and use the tool that best suits your needs.
5-1. ### Connecting to Bastion host
- In the Windows environment of the PC that will connect to the Bastion host, run Remote Desktop Connection, then enter the NAT IP of the Bastion Host and click the Connect button.
- When the remote desktop connection succeeds, user credential input window opens. 2. Enter the ID and Password verified in 2-3. Bastion host 접속 ID 및 PW 확인하기 and click the Confirm button.
5-2. ### Install the DB client program (SSMS) on the Bastion host
- Go to the official Microsoft SQL Server page and download the SSMS program.
- SSMS program download URL: https://learn.microsoft.com/en-us/ssms/download-sql-server-management-studio-ssms
- Connect the user’s PC hard drive to upload the file to the Bastion host.
- Click the Details button of the Local devices and resources item on the Local Resources tab of the Remote Desktop Connection.
- Select the local disk of the location where the file was downloaded on the drive, and click the Confirm button.
- Copy the downloaded file, upload it to the Bastion Host, and click the SSMS (Microsoft SQL Server Management Studio) installation file to install.
5-3. ### Connecting to the Database using the DB client program (SSMS)
- Run SSMS (Microsoft SQL Server Management Studio). 1. Connect to Server A popup window appears.
- In the Connect to Server popup, enter the Database server information created in 3-1. Microsoft SQL Server(DBaaS) 서비스 생성하기 and click the Connect button.
Required input element item input value Server type Database Engine Server name Database server IP, Database Port (ex. 192.168.10.1,2866) Authentication SQL Server Authentication Login Database username Password Database password Encryption Optional Table DB connection client program input fields - When the connection is complete, the Database will be accessed. 3. After connecting, you can perform simple queries, etc.
