You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/dns/tutorial-alias-pip.md
+29-60Lines changed: 29 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,6 @@ In this tutorial, you learn how to:
20
20
21
21
> [!div class="checklist"]
22
22
> * Create a virtual network and a subnet.
23
-
> * Deploy Azure Bastion.
24
23
> * Create a web server virtual machine with a public IP.
25
24
> * Create an alias record that points to the public IP.
26
25
> * Test the alias record.
@@ -75,42 +74,13 @@ Create a virtual network and a subnet to place your web server in.
75
74
1. Select the **Review + create** tab or select the **Review + create** button.
76
75
1. Select **Create**.
77
76
78
-
## Deploy Azure Bastion
79
-
80
-
Azure Bastion uses your browser to connect to VMs in your virtual network over secure shell (SSH) or remote desktop protocol (RDP) by using their private IP addresses. The VMs don't need public IP addresses, client software, or special configuration. For more information about Azure Bastion, see [Azure Bastion](/azure/bastion/bastion-overview).
1. In the search box at the top of the portal, enter **Bastion**. Select **Bastions** in the search results.
86
-
87
-
1. Select **+ Create**.
88
-
89
-
1. In the **Basics** tab of **Create a Bastion**, enter, or select the following information:
90
-
91
-
| Setting | Value |
92
-
|---|---|
93
-
|**Project details**||
94
-
| Subscription | Select your subscription. |
95
-
| Resource group | Select **PIPResourceGroup**. |
96
-
|**Instance details**||
97
-
| Name | Enter **bastion**. |
98
-
| Region | Select the same region as your virtual network. |
99
-
| Tier | Select **Developer**. |
100
-
|**Configure virtual networks**||
101
-
| Virtual network | Select **myPIPVNet**. |
102
-
103
-
1. Select **Review + create**.
104
-
105
-
1. Select **Create**.
106
-
107
77
## Create a web server virtual machine
108
78
109
-
Create a Windows Server virtual machine and then install IIS web server on it.
79
+
Create a Linux virtual machine and install NGINX web server on it.
110
80
111
81
### Create the virtual machine
112
82
113
-
Create a Windows Server 2019 virtual machine.
83
+
Create an Ubuntu virtual machine.
114
84
115
85
1. In the Azure portal, enter *virtual machine* in the search box at the top of the portal, and then select **Virtual machines** from the search results.
116
86
1. In **Virtual machines**, select **+ Create** and then select **Azure virtual machine**.
@@ -122,16 +92,17 @@ Create a Windows Server 2019 virtual machine.
122
92
| Subscription | Select your Azure subscription. |
| Authentication type | Select **SSH public key**. |
132
103
| Username | Enter a username. |
133
-
|Password | Enter a password. |
134
-
|Confirm password | Reenter the password. |
104
+
|SSH public key source | Select **Generate new key pair**. |
105
+
|Key pair name | Enter a name for the key pair. |
135
106
|**Inbound port rules**||
136
107
| Public inbound ports | Select **None**. |
137
108
@@ -156,34 +127,32 @@ Create a Windows Server 2019 virtual machine.
156
127
This deployment may take a few minutes to complete.
157
128
158
129
> [!NOTE]
159
-
> **Web-01** virtual machine has an attached NIC with a Standard SKU dynamic public IP that changes every time the virtual machine is restarted.
130
+
> The **web-01** virtual machine has an attached NIC with a Standard SKU dynamic public IP that changes every time the virtual machine is restarted.
160
131
161
-
### Install IIS web server
132
+
> [!NOTE]
133
+
> The network security group rules block inbound SSH access from the internet. To run commands on the virtual machine, use the **Run command** feature in the Azure portal or deploy Azure Bastion. For more information about Azure Bastion, see [Quickstart: Deploy Azure Bastion with default settings](../bastion/quickstart-host-portal.md).
162
134
163
-
Install IIS web server on **Web-01**.
135
+
### Install NGINX web server
164
136
165
-
1. In the **Overview** page of **Web-01**, select **Connect**then **Connect via Bastion**.
137
+
Install NGINX web server on **web-01** using the **Run command**feature in the Azure portal.
166
138
167
-
1. In the **Bastion** connection page, enter or select the following information:
139
+
1. In the search box at the top of the portal, enter *virtual machine*. Select **Virtual machines** in the search results.
168
140
169
-
| Setting | Value |
170
-
|---|---|
171
-
|**Authentication Type**| Select **Password**.|
172
-
|**Username**| Enter the username you created during VM creation. |
173
-
|**Password**| Enter the password you created during VM creation. |
141
+
1. Select the **web-01** virtual machine.
142
+
143
+
1. In the **Operations**section of the left menu, select **Run command**.
144
+
145
+
1. Select **RunShellScript**.
174
146
175
-
1. Select **Connect**.
176
-
1. On the **Server Manager** dashboard, select **Manage** then **Add Roles and Features**.
177
-
1. Select **Server Roles** or select **Next** three times. On the **Server Roles** screen, select **Web Server (IIS)**.
178
-
1. Select **Add Features**, and then select **Next**.
147
+
1. In the **Run Command Script** pane, enter the following command:
179
148
180
-
:::image type="content" source="./media/tutorial-alias-pip/iis-web-server-installation.png" alt-text="Screenshot of Add Roles and Features Wizard in Windows Server 2019 showing how to install the I I S Web Server by adding Web Server role.":::
1. Select **Confirmation** or select **Next** three times, and then select **Install**. The installation process takes a few minutes to finish.
183
-
1. After the installation finishes, select **Close**.
184
-
1. Open a web browser. Browse to **localhost** to verify that the default IIS web page appears.
153
+
1. Select **Run**.
185
154
186
-
:::image type="content" source="./media/tutorial-alias-pip/iis-web-server.png" alt-text="Screenshot of Internet Explorer showing the I I S Web Server default web page.":::
155
+
1. Wait for the command to complete. The output displays the installation progress and finishes when NGINX is installed.
187
156
188
157
## Create an alias record
189
158
@@ -194,18 +163,18 @@ Create an alias record that points to the public IP address.
194
163
1. In the **Add record set**, enter *web01*in the **Name**.
195
164
1. Select **A**for the **Type**.
196
165
1. Select **Yes**for the **Alias record set**, and thenselectthe**Azure Resource**for the **Alias type**.
197
-
1. Select the **Web-01-ip** public IP address for the **Azure resource**.
166
+
1. Select the **web-01-ip** public IP address for the **Azure resource**.
198
167
1. Select **OK**.
199
168
200
-
:::image type="content" source="./media/tutorial-alias-pip/add-public-ip-alias-inline.png" alt-text="Screenshot of adding an alias record to refer to the Azure public IP of the I I S web server using the Add record set page." lightbox="./media/tutorial-alias-pip/add-public-ip-alias-expanded.png":::
169
+
:::image type="content" source="./media/tutorial-alias-pip/add-public-ip-alias-inline.png" alt-text="Screenshot of adding an alias record to refer to the Azure public IP of the web server using the Add record set page." lightbox="./media/tutorial-alias-pip/add-public-ip-alias-expanded.png":::
201
170
202
171
## Test the alias record
203
172
204
173
1. In the Azure portal, enter *virtual machine*in the search box at the top of the portal, and thenselect**Virtual machines** from the search results.
205
-
1. Select the **Web-01** virtual machine. Note the public IP address in the **Overview** page.
206
-
1. From a web browser, browse to `web01.contoso.com`, which is the fully qualified domain name of the **Web-01** virtual machine. You now see the IIS default web page.
174
+
1. Select the **web-01** virtual machine. Note the public IP address in the **Overview** page.
175
+
1. From a web browser, browse to `web01.contoso.com`, which is the fully qualified domain name of the **web-01** virtual machine. You now see the NGINX default web page.
207
176
1. Close the web browser.
208
-
1. Stop the **Web-01** virtual machine, and then restart it.
177
+
1. Stop the **web-01** virtual machine, and then restart it.
209
178
1. After the virtual machine restarts, note the new public IP address for the virtual machine.
210
179
1. From a web browser, browse again to `web01.contoso.com`.
0 commit comments