IT Infrastructure & Cloud
Static or Dynamic IP for the Office: When You Need a Fixed Public IP
An office needs a static public IP when something must be reachable from the internet at a fixed address. Here is how to sort it out for VPN, servers, and CCTV, and how to check whether your connection sits behind CGNAT.
SEO and Content Specialist
3 min read
Short answer: an office needs a static public IP when something must be reachable from the internet at a fixed address: a VPN gateway, a server or application in the office that is opened to the outside, and cloud services that restrict access by the office IP address. If all traffic only goes out of the office, such as email, browsing, and cloud applications, a dynamic IP is enough. Before deciding, make sure the connection is not behind the provider’s CGNAT.
This question usually comes up when the office is putting together its internet contract. In Calculating Office Internet Bandwidth Requirements, “how many public IPs are included” is one of the questions for the provider. This article answers the follow-up: when a static IP for the office is really needed, and when it is not.
When does an office need a static IP?
A static IP is needed when a party outside the office has to start a connection to the office, or has to recognize the office by its address.
| Need | Static IP needed? | Notes |
|---|---|---|
| Site-to-site VPN to the cloud | Recommended | Azure VPN Gateway accepts the static public IP of the VPN device, or a domain name with Dynamic DNS if the IP is dynamic |
| VPN for employees outside the office | Recommended | The VPN gateway in the office must be reachable from the internet |
| Server or application in the office opened to the outside | Yes | A changing address cuts off access until the DNS record is updated |
| IP allowlist in a cloud service | Yes | Microsoft Entra Conditional Access, for example, defines the office location by public IP ranges |
| Viewing CCTV footage from outside | Through a VPN | Opening a VPN gateway is safer than opening the recorder’s port to the internet |
| Only email, browsing, cloud applications | No | A dynamic IP is enough |
Dynamic DNS can replace a static IP for some needs, but there is a delay. Azure documentation states that VPN Gateway keeps a DNS cache refreshed every 5 minutes and only tries to resolve the domain name again for disconnected tunnels. In other words, every time the office IP changes, the tunnel drops before it reconnects.
Dynamic IP, CGNAT, and Dynamic DNS: what is the difference?
A dynamic IP is handed out for a limited lease. RFC 2131 on DHCP describes addresses being assigned for a lease that can be extended, so an address can move to another customer.
CGNAT (Carrier-Grade NAT) is more restrictive still: the provider shares one public IPv4 address among many customers. RFC 6598 reserves the 100.64.0.0/10 range for connecting CGN devices to customer routers. RFC 7021 notes that applications that wait for incoming connections without first sending outbound traffic fail behind a CGN, and if the shared address is blacklisted, other customers are affected too. Behind CGNAT, a VPN gateway or server in the office cannot be reached from outside, with or without Dynamic DNS.
Dynamic DNS updates a domain name record every time the IP changes. The standard for dynamic updates is RFC 2136.
Steps to decide
- List the services that must be reachable from outside: VPN, servers, CCTV recorders, and cloud services that restrict access by IP.
- Check the WAN address on the router. If it falls in the 100.64.0.0/10 range or the RFC 1918 private ranges (10.x, 172.16-31.x, 192.168.x), the connection sits behind the provider’s NAT.
- Ask the provider in writing: whether the IP is public, whether it is static, and how many are included, including for the backup line.
- Open as little as possible. A static IP makes the office easy to find, so only the VPN gateway and the services that truly need it are opened on the firewall. The setup is covered in Office VPN for Remote Work.
- Record the IP in the network documentation and in every allowlist that uses it, so that switching providers does not silently cut off access.
In the Office Network Installation service, Legia installs and configures the firewall and VPN for access from outside the office, with rules agreed first and the configuration handed over in the documentation. The internet subscription is billed separately from this work. Other services are in the IT Infrastructure & Cloud pillar.
Sources
- Microsoft Learn, Create S2S VPN connection: Azure portallearn.microsoft.com
- Microsoft Learn, Network assignment in Conditional Accesslearn.microsoft.com
- RFC 2131, Dynamic Host Configuration Protocolrfc-editor.org
- RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Spacerfc-editor.org
- RFC 7021, Assessing the Impact of Carrier-Grade NAT on Network Applicationsrfc-editor.org
- RFC 1918, Address Allocation for Private Internetsrfc-editor.org
- RFC 2136, Dynamic Updates in the Domain Name Systemrfc-editor.org

