How do I connect my Azure Linux VM to internet on RDP?

Jie Min P 0 Reputation points
2026-07-12T17:11:10.1466667+00:00

Hi! I recently connected my Azure Linux VM SSH to RDP via xrdp. Is it possible to connect to the internet on this? I tried to open the web browser but it always fails, though when I do the ping test it always passes. I've tried checking for network settings too but nothing seems to be working. Does anyone know a possible solution? Thank you so much!

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-07-12T17:11:40.69+00:00

    The RDP session over xrdp is just another way to log on to the same Linux VM. If ping works from inside the VM, the VM already has network connectivity. The browser failure is almost certainly due to one of these on-VM or network restrictions rather than “RDP not having internet.”

    Use these checks from the Linux VM (in the xrdp session or over SSH):

    1. Verify xrdp and desktop are correctly installed
      Ensure the VM is running a supported desktop environment and xrdp, as described for Ubuntu/SUSE:
      • Desktop (for example xfce4) installed
      • xrdp installed and enabled
      • For Ubuntu 24.04, xrdp added to ssl-cert group
      • echo xfce4-session > ~/.xsession set for the user, and sudo systemctl restart xrdp run afterward These steps ensure a stable GUI session, which helps avoid odd behavior with GUI apps like browsers.
    2. Confirm the VM’s outbound connectivity
      From a terminal inside the VM (xrdp or SSH):
         curl -I https://www.microsoft.com
      
      or
         wget https://www.microsoft.com
      
      If these commands succeed but the browser fails, the issue is likely browser- or GUI-specific (proxy settings, DNS in the desktop environment, or a firewall rule affecting the browser process).
    3. Check that RDP is not the bottleneck
      RDP/xrdp does not block internet access by itself. If the VM can reach the internet via CLI tools, then the network path is fine and the problem is inside the desktop session (browser configuration, profile corruption, or a local firewall rule).
    4. Validate NSG and outbound rules
      Since ping works, basic connectivity is present, but if there are restrictive Network Security Group (NSG) or firewall rules, some outbound ports (like 80/443 for HTTP/HTTPS) might be blocked while ICMP is allowed. Review NSG rules associated with the VM’s NIC and subnet to ensure outbound traffic on TCP 80 and 443 is allowed. Use the same approach as for RDP connectivity troubleshooting: verify that no higher-priority deny rules are blocking outbound traffic.
    5. Restart xrdp if GUI behaves inconsistently
      If the desktop session is unstable, restart xrdp on the VM:
         sudo systemctl restart xrdp
      
      Then reconnect via RDP and test the browser again.

    If command-line HTTP/HTTPS access fails as well, focus on NSG/firewall and routing configuration. If command-line access works but the browser fails, reset or reinstall the browser, and verify any proxy/DNS settings inside the desktop environment.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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