Controlling peer-to-peer traffic in Azure VPN Gateway (or the Gateway Subnet itself)

Antti Keskinen 40 Reputation points
2023-12-24T12:11:27.9633333+00:00

I am planning to use an Azure VPN Gateway in an Azure Virtual Network to allow secure communication between devices. The overall architecture has several client devices which open a point-to-site connection to the same Azure VPN Gateway. I then have a "maintenance PC" which also opens a point-to-site connection to this Azure VPN Gateway, and I want to be able to reach the SSH servers that're running on these individual clients, and are listening on the virtual adapter that's created when the VPN connection is established.

I am planning to use VpnGw1 tier, and the OpenVPN tunnel type.

There are few questions related to this:

  1. Does Azure VPN Gateway, out-of-the-box, prohibit this kind of peer-to-peer traffic?
  2. If it does not then what means or methods do I have to control who can connect and where within the VPN network itself?
    1. Azure documentation suggests that Network Security Groups should not be used in the Gateway Subnet so as to allow correct operation of the virtual machines that run the VPN Gateway
      1. What I want to achieve is only allow the "maintenance PC" to connect to the the SSH servers, and prohibit e.g. "SSH hopping" from one device to another
        1. Using iptables rules on the devices themselves is an option but I doubt that the "maintenance PC" will always get the same "virtual IP" inside the VPN; if this IP changes then the rules will also stop working
  3. In Azure VPN Gateway is it possible to enforce that specific clients will always get a specific "virtual IP" address inside the VPN, or an address from a specific address block?
Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,795 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,775 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 49,611 Reputation points Microsoft Employee Moderator
    2023-12-26T04:04:58.7466667+00:00

    @Antti Keskinen

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to know if we can filter peer-to-peer traffic within network via VPN Gateway.

    I take it that you would like to use the "maintenance PC" to SSH to other remotely connected P2S devices - please let me know if my understanding is incorrect.

    I am afraid this won't be possible, as you mentioned,

    The only workaround I can think of is leveraging SSH Key pairs and providing access only to "maintenance PC" from other remote devices.

    Cheers,

    Kapil


0 additional answers

Sort by: Most helpful

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.