How To Access My Apps With Windows Azure VPS

SMPN 3 Kalikajar 20 Reputation points
2024-06-04T14:19:14.1533333+00:00

I have been create an Azure VPS with Windows 10 os. After that, I Install my application with web based apps. I have a spesific port to access it. How I can access my apps? I have been access use my ip public addres and port https://ipaddress:port but It's not work.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,000 questions
0 comments No comments
{count} votes

Accepted answer
  1. innovation gadget 155 Reputation points
    2024-06-05T05:44:13.9733333+00:00

    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.
        

    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).

    Detailed Steps:

    1. Network Security Group (NSG) Configuration

    Navigate to NSG:

    • In the Azure portal, go to Virtual Machines and select your VM.
      • Under Settings, select Networking.
        • Click on the NSG associated with the VM.
        Add Inbound Rule:
        - 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.
        
    1. 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.

    Create Inbound Rule:

    • In the left pane, click on Inbound Rules.
      • Click on New Rule... in the right pane.
      • Select Port and click Next.
      • Select TCP and enter your port number.
      • Click Next.
      • Select Allow the connection and click Next.
      • Ensure all profiles are selected (Domain, Private, Public) and click Next.
      • Provide a name and description for the rule.
      • Click Finish.
    1. Application Configuration
    2. 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 or https depending on your application’s configuration.
      Troubleshooting:
      - 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.
      

    By following these steps, you should be able to access your web-based application on the specified port through your Azure VPS.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. vipullag-MSFT 26,391 Reputation points
    2024-06-05T05:42:34.55+00:00

    Hello SMPN 3 Kalikajar

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Based on the details shared, you are running Azure VM with Win 10 OS and have deployed web based application. And you are not able to access the app via your Public IP on specified ports.

    Here are some steps you can take to troubleshoot the issue:
    -Check if the application is running.

    -Make sure that your web-based application is configured to listen on the correct IP address and port. You can check this by going to the application settings and making sure that it is configured to listen on the IP address and port that you are trying to access it on.

    -Check if the port is open in Azure: Use this link (https://ping.eu/port-chk/) and see if the public IP is opened on the specified port.
    -Check if local Window firewall is blocking the port you are trying to access.

    Hope this helps.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.