Hello SMPN 3 Kalikajar
To access your web-based application on your Azure VPS with a specific port, you need to ensure several configurations are properly set up:
Network Security Group (NSG) Configuration:
- Make sure the port your application uses is allowed through the Network Security Group (NSG) associated with your Azure Virtual Machine (VM).
- To do this:
- Go to the Azure portal. - Navigate to your VM. - Under the "Settings" section, select "Networking". - In the "Networking" pane, find your NSG and click on it. - Add an inbound security rule to allow traffic on your specific port (e.g., 8080). **Windows Firewall Configuration**: - Ensure the Windows Firewall on your VM allows traffic on your specific port. - To do this: - Connect to your VM via Remote Desktop. - Open the Windows Firewall settings. - Create a new inbound rule to allow traffic on your specific port.
- To do this:
Application Configuration:
- Verify your application is listening on the correct port.
- Ensure the application is bound to the correct IP address or to all available IP addresses (
0.0.0.0
).
- Ensure the application is bound to the correct IP address or to all available IP addresses (
Detailed Steps:
- Network Security Group (NSG) Configuration
Navigate to NSG:
- In the Azure portal, go to
Virtual Machines
and select your VM.- Under
Settings
, selectNetworking
.- Click on the NSG associated with the VM.
- In the NSG settings, select `Inbound security rules`. - Click on `Add`. - Set the `Source` to `Any` or specify a source if needed. - Set `Source port ranges` to `*`. - Set `Destination` to `Any` or specify your VM's IP. - Set `Destination port ranges` to your application's port. - Set `Protocol` to `TCP`. - Set `Action` to `Allow`. - Provide a name and description for the rule. - Click `Add` to save the rule.
- Under
- Windows Firewall Configuration
Open Windows Firewall:
- Connect to your VM using Remote Desktop.
- Open
Control Panel
.- Go to
System and Security
>Windows Defender Firewall
.- Click on
Advanced settings
.
- Click on
- Go to
- Open
Create Inbound Rule:
- In the left pane, click on
Inbound Rules
.- Click on
New Rule...
in the right pane. - Select
Port
and clickNext
. - Select
TCP
and enter your port number. - Click
Next
. - Select
Allow the connection
and clickNext
. - Ensure all profiles are selected (Domain, Private, Public) and click
Next
. - Provide a name and description for the rule.
- Click
Finish
.
- Click on
- Application Configuration
- Verify Application Settings:
- Ensure your application is configured to listen on the correct port and IP address.
- Check your application’s configuration files or settings to ensure it's bound to the correct IP address and port.
- Restart your application to apply any configuration changes.
Testing the Connection
Access Application:
- Open a web browser and navigate to
https://<your-public-ip>:<your-port>
.- Ensure you use
http
orhttps
depending on your application’s configuration.
- If the connection fails, verify: - NSG inbound rules are correctly set. - Windows Firewall rules are correctly configured. - Your application is running and listening on the specified port. - No other application is using the same port.
- Ensure you use
By following these steps, you should be able to access your web-based application on the specified port through your Azure VPS.