Set up Private Network Load Balancing with Magic WAN
Consider the following steps to learn how to configure Private Network Load Balancing solution, using Magic WAN as the on-ramp and off-ramp to securely connect to your private or internal services.
One of the pre-requisites to using Private Network Load Balancing (PNLB) with Magic WAN is having Magic WAN set up in your account and having completed onboarding. You can connect with a Magic WAN Connector, or your own hardware via an IPsec or GRE tunnel. Check out the Magic WAN documentation for more details or to get started.
Load Balancer Pools are logical groupings of endpoints — typically organized by physical datacenter or geographic region. The endpoints in the pool are the destinations where traffic is ultimately routed.
Pools can be created using either the Cloudflare dashboard or the API. Refer to the Create a pool documentation section for more information.
- Go to Load Balancing at the account level and select Create a Load Balancer.
- Select Private Load Balancer.
- On the next step you can choose to associate this load balancer with either:
- A CGNAT IP from the Cloudflare range or
- A custom RFC1918 address ↗.
- Add a descriptive name to identify your Load Balancer.
- Proceed through the setup.
After selecting an IP address and completing the setup, you will be redirected to the Load Balancing dashboard. You can locate your load balancer using the search bar or by filtering for Private load balancers. Be sure to note the assigned IP address, as it will be required in the following steps.
If you want your load balancer and its endpoints to be transparently accessible to users via a hostname, you can create a DNS record in your internal DNS system or create an override in Cloudflare that maps the hostname to the Load Balancer's IP address. This ensures that traffic destined for the hostname resolves to the correct IP.
To create the override, follow these steps:
- In Gateway, select Firewall policies.
- In the DNS tab, create an override where:
- The Selector equals
Host
- The Operator equals
is
- The Value is the hostname you wish to associate with your load balancer.
- The Selector equals
- Set the Action to Override, and in Override Hostname, enter the IP address of your Private Load Balancer.
Requests to the hostname will now resolve to your private load balancer.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark
-