Kali VM is slow on RDP when accessed via DNS Name

Najam ul Saqib 300 Reputation points
2024-03-04T02:56:33.14+00:00

Hi,

I have deployed a Kali VM in Azure, xrdp is being used as RDP server on it. When I access this VM from my Windows VM which is in the same VNet using Kali's private IP, it works seamlessly but when I access the Kali VM directly it is very slow. How can this be fixed?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,908 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,567 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jackson Martins 10,556 Reputation points MVP
    2024-03-04T13:57:41.5933333+00:00

    Hi @Najam ul Saqib

    Network

    The issue might be due to the network latency or limited bandwidth between your location and the Azure region where the VM is hosted

    Use tracert to check the latency, just like (Windows):

    Tracert xxx.xxx.xxx.xxx 
    

    or

    You can try azure speed to show Latency test by region

    https://www.azurespeed.com/Azure/Latency

    XRDP Session Configuration

    This file, typically located at /etc/xrdp/xrdp.ini, contains configuration settings for the XRDP server. You can adjust the settings related to color depth and resolution to lower values to improve performance. For example, changing the max_bpp (bits per pixel) to a lower value like 16 can reduce the amount of data transmitted.

    Compression: Enabling or increasing compression can also improve performance. Look for compression settings in the xrdp.ini file and adjust accordingly.

    Other suggestions:

    Ensure your VM's DNS settings are correctly configured to resolve external and internal names efficiently. This is more about ensuring reliable connections than performance optimization

    Get in touch if you need more help with this issue.

    --please don't forget to "[Accept the answer]" if the reply is helpful--


  2. Anveshreddy Nimmala 3,545 Reputation points Microsoft Vendor
    2024-03-04T14:07:45.23+00:00

    Hello Najam ul Saqib,

    Welcome to microsoft Q&A, Thank you for posting your query here

    • Check the network configuration of both the Kali VM and the Windows VM. Ensure that they are both connected to a virtual network (VNet) and subnet within the same Azure region.
    • Verify that the network security group (NSG) associated with the Kali VM allows inbound traffic on the RDP port (default is TCP port 3389).
    • If the Kali VM and the Windows VM are in different Azure regions, consider setting up Azure ExpressRoute or a VPN Gateway to establish a private connection between the two regions. This can reduce latency and improve performance.
    • If the Kali VM is under heavy load, increasing its resources (such as CPU, memory, and disk) may improve performance. You can scale up the VM size in the Azure portal.
    • Check the RDP settings on the Kali VM. Ensure that the RDP server (xrdp) is configured to use optimal settings for performance. This might include adjusting settings related to display resolution, color depth, and compression.
    • Monitor network performance metrics in the Azure portal to identify any bottlenecks or issues affecting network connectivity between the Kali VM and the Windows VM. Hope this helps you.

  3. Anveshreddy Nimmala 3,545 Reputation points Microsoft Vendor
    2024-03-07T10:18:37.6566667+00:00

    Hello Najam ul Saqib,

    use this settings

    • xfce4
    • xorgxrdp-glamor

    In /etc/xrdp/sesman.ini and /etc/xrdp/xrdp.ini:

    • Policy=UBDI
    • max_bpp=16
    • xserverbpp=16
    • use_compression = yes
    • crypt_level=none
    • KillDisconnected=true
    • DisconnectedTimeLimit=0
    • tcp_send_buffer_bytes=4194304

    Tweak for TCP (2x request buffer size):

    • sudo sysctl -w net.core.wmem_max=8388608

    see https://github.com/neutrinolabs/xrdp/issues/1483

    Disable compositor:


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.