Share via

Looking to Disable BGP on an VPN Gateway

Shiv Shankar 0 Reputation points
2026-06-18T18:17:50.16+00:00

Looking to Disable BGP on an VPN Gateway. its not enabled but it looks open to the internet, so i want to disable it

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 answer

Sort by: Most helpful
  1. Marcin Policht 92,630 Reputation points MVP Volunteer Moderator
    2026-06-18T19:47:10.14+00:00

    On an Azure VPN Gateway, BGP is only active if it has been explicitly enabled on the gateway connection and ASN settings are configured. If BGP is not enabled in the gateway configuration, Azure does not establish BGP peering sessions, even though you may still see TCP port 179 appear reachable during scans or from public-facing diagnostics. The gateway service itself is Microsoft-managed infrastructure, so certain ports may appear exposed externally as part of the platform architecture, but that does not mean BGP routing is operational.

    To verify the current configuration, go to the Virtual Network Gateway in the Azure portal, select Configuration, and confirm that Configure BGP is set to Disabled. You can also review each Site-to-Site or VNet-to-VNet connection under Connections and ensure that Enable BGP is not checked there either. BGP must be enabled both on the gateway and on the individual connection before dynamic routing sessions can form.

    If you previously enabled BGP and want to fully disable it, turn off Configure BGP on the gateway, save the changes, and then remove or disable BGP on any associated connections. Azure may briefly reprovision the VPN gateway during the update. Once disabled, the gateway uses only static route exchange for VPN connectivity.

    Note that Azure VPN Gateway public IPs cannot be directly firewalled or restricted like a VM NIC because the gateway is a managed PaaS service. You cannot manually close TCP 179 at the Azure edge. If external scans show the port as “open” or “responsive,” that reflects Azure platform behavior rather than an active BGP session. The actual security boundary is whether BGP is configured and whether authenticated VPN peers are allowed to establish routing exchanges.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

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.