Why Remote Access Fails Behind CGNAT — And How Relay Networks Solve It
Remote access sounds simple: connect to a computer, phone or server over the internet. But what happens when the device you want to reach does not have a publicly reachable IP address? For millions of internet connections, Carrier-Grade NAT creates exactly this challenge.
A computer can be connected to the internet, browse websites, download files and communicate with cloud services — yet still be impossible to reach directly from another network. This is not necessarily a firewall misconfiguration or a problem with the computer itself. The reason may be somewhere inside the internet service provider's network.
One of the technologies responsible for this situation is Carrier-Grade Network Address Translation, commonly known as CGNAT. It changes how incoming connections work and creates challenges for remote desktop software, self-hosted services, peer-to-peer applications and device-to-device communication.
1. Understanding NAT: Why Private Devices Are Not Directly Reachable
Most home and office networks use private IPv4 addresses for internal devices. A laptop might have an address such as 192.168.1.20, while a phone might use 192.168.1.21.
These private addresses are not globally routable across the public internet. Instead, a router performs Network Address Translation (NAT), allowing multiple internal devices to share an external public IP address.
When an internal device initiates an outgoing connection, the router creates a translation entry. Return traffic can then be associated with the connection that was already established.
This arrangement works well for ordinary internet usage. Problems appear when an external device needs to initiate a new connection toward a device inside the private network.
A router may support port forwarding, which maps a specific external port to an internal device. However, port forwarding only controls the NAT device managed by the user. It cannot automatically configure additional translation layers operated by an internet service provider.
2. What Is Carrier-Grade NAT (CGNAT)?
IPv4 address availability is limited. To allow many customers to continue using IPv4 connectivity, internet service providers can deploy Carrier-Grade NAT systems. Instead of assigning every customer a unique public IPv4 address, the provider shares public addresses among multiple subscribers.
This means a customer's home router may receive an address that is not globally reachable. The provider performs another translation between the customer's network and the public internet.
The IETF documented a dedicated shared IPv4 address range for this purpose in RFC 6598. The range is 100.64.0.0/10, reserved for shared address space in service provider networks.
From the customer's perspective, internet access may appear completely normal. Websites load, applications work and outgoing connections succeed. The difficulty is that unsolicited incoming connections generally cannot be forwarded through the provider's translation layer without provider support or another connectivity mechanism.
3. Why Port Forwarding Often Does Not Solve the Problem
Port forwarding is a common recommendation for remote desktop applications, game servers, security cameras and self-hosted services. In a network with a directly assigned public IPv4 address, configuring a router may be enough.
Under CGNAT, however, there can be two separate NAT devices:
- Your own router, which you can usually configure.
- The internet service provider's CGNAT gateway, which you generally cannot configure yourself.
A forwarding rule on your home router does not create a corresponding forwarding rule on the provider's gateway. As a result, an external connection may never reach your router in the first place.
4. NAT Traversal: Finding a Direct Connection
NAT traversal describes techniques that help devices establish communication despite the presence of network address translation and firewall restrictions.
One approach is to discover the external address and port mapping created by a NAT device. Another is to coordinate connection attempts between two endpoints so that their NAT devices permit traffic associated with those attempts.
STUN
Session Traversal Utilities for NAT (STUN) allows a device to discover the public-facing address and port that a remote server observes for its connection. This information can help applications determine possible connection paths.
STUN does not guarantee that two devices can communicate directly. Different NAT behaviors, firewall policies and network configurations can prevent a direct path from being established.
ICE and connectivity checks
Interactive Connectivity Establishment (ICE) is a framework used by applications to gather and test possible network paths. It can evaluate local addresses, server-reflexive addresses and relay candidates to determine which connection method works.
This approach is particularly relevant to real-time communication systems, including applications that need to establish audio, video or data sessions between endpoints.
When direct connectivity fails
Some network combinations make direct communication impractical or impossible. For example, restrictive NAT mapping behavior or enterprise firewall policies can prevent the necessary incoming traffic.
The IETF describes these limitations in RFC 8656 — Traversal Using Relays around NAT (TURN). The standard specifies how an intermediate server can relay traffic between clients when a direct communication path cannot be established.
5. How Relay Networks Make Remote Connectivity Possible
A relay architecture changes the connection model. Instead of requiring one device to accept a new incoming connection from another device, both endpoints can establish outgoing connections to an intermediary server that has a publicly reachable address.
The relay then forwards traffic between the connected endpoints according to the application's protocol and access rules.
This model can work even when neither endpoint has a directly reachable public IPv4 address, provided both devices can establish and maintain their connections to the relay and the required traffic is permitted.
A relay is not necessarily the first choice for every session. Direct peer-to-peer communication can offer a shorter path and avoid the additional bandwidth costs of relaying. A well-designed connectivity system can attempt direct communication first and use a relay when direct connectivity is unavailable.
Devices exchange data over a direct network path when NAT and firewall conditions allow it.
An intermediary forwards traffic when a direct connection cannot be established.
6. The Trade-offs of Relay-Based Connections
Relay infrastructure solves an important connectivity problem, but it introduces its own engineering considerations.
Latency and network distance
Relayed traffic travels through an additional network endpoint. Depending on the relay's location, routing and network conditions, this can increase latency compared with a direct connection.
Bandwidth and infrastructure costs
A relay server must process and forward traffic. Large file transfers, screen streaming and continuous network tunnels can consume substantial bandwidth. Infrastructure capacity and geographical placement therefore matter.
Security and trust
A relay architecture should not automatically be treated as an end-to-end security guarantee. Applications need an explicit security design covering peer authentication, session encryption, authorization, key management and relay access policies.
Encryption between endpoints can help protect application data even when packets pass through an intermediary, provided the protocol is designed and implemented correctly.
Availability and resilience
If a relay becomes unavailable, sessions depending on it may be interrupted. Production systems should consider monitoring, capacity management, recovery behavior and alternative connection paths.
7. Beyond Remote Desktop: Why Device-to-Device Connectivity Matters
CGNAT is not only a remote desktop problem. It affects a much wider range of applications that need devices to communicate across separate networks.
- Remote administration: Access computers and servers outside the local network.
- File transfer: Exchange files between devices in different locations.
- Network access: Reach services and resources inside remote networks through supported gateway configurations.
- IoT and monitoring: Connect remote devices that cannot accept conventional incoming connections.
- Distributed infrastructure: Connect multiple endpoints through a coordinated relay architecture.
These use cases demonstrate why connectivity architecture matters. A solution designed only around a single remote desktop session may not be sufficient for environments where users need file transfer, device management, terminal access and network-level connectivity together.
8. How OneFas Approaches Device Connectivity
OneFas is a device-to-device platform built around the UDTD protocol. Its goal is to bring several device communication and management capabilities into one system, rather than treating remote control, file transfer and network connectivity as completely separate workflows.
Its connectivity approach supports direct connections where available and relay-based communication for remote connectivity scenarios. This is relevant when devices operate behind different routers, NAT configurations or provider networks.
One platform for multiple device workflows
Depending on the platform and configuration, OneFas brings together several capabilities:
- Remote computer control and screen interaction.
- File and directory transfer between connected devices.
- Remote terminal access.
- Device telemetry and system monitoring.
- Network gateway and VPN-related functionality on supported platforms.
- Relay infrastructure and server peering capabilities.
Connectivity depends on the platform
Network gateway capabilities are not identical on every operating system. Windows and Linux can support virtual network interfaces and gateway configurations with the necessary permissions and system components. Android uses its platform VPN APIs and is subject to Android-specific restrictions.
This distinction is important: a device being connected through a remote-access platform does not automatically mean that it can act as a full gateway for every device on its local network.
OneFas is developed for Windows, Linux and Android, with platform-specific integrations designed around the capabilities and restrictions of each operating system.
9. Choosing the Right Connectivity Approach
There is no single connection method that is ideal for every environment. The appropriate approach depends on network configuration, security requirements, latency, bandwidth and the type of application.
| Approach | Typical use | Main consideration |
|---|---|---|
| Public IP + port forwarding | Self-hosted services | Requires a reachable public address and careful firewall configuration. |
| IPv6 connectivity | Direct communication where supported | Requires IPv6 support and appropriate firewall rules on both networks. |
| NAT traversal | Peer-to-peer applications | Success depends on NAT behavior and firewall restrictions. |
| Relay server | Remote access across restrictive networks | Requires relay infrastructure and sufficient bandwidth. |
| VPN or outbound tunnel | Private network access | Requires a trusted endpoint, authentication and routing configuration. |
10. The Future of Remote Device Connectivity
The internet is moving through a long transition in which IPv4 remains widely used while IPv6 adoption continues. Shared IPv4 infrastructure, enterprise firewalls and increasingly complex network environments mean that applications cannot always assume direct inbound connectivity.
For developers, this creates an architectural challenge: connectivity must be treated as a core part of the product, not simply as an IP address and port number.
Systems that combine connection discovery, authentication, direct communication attempts and relay alternatives can provide more flexible ways for devices to communicate across different network environments.
The important engineering question is no longer only how to connect two devices on the same network. It is how to establish secure, reliable communication when the devices are separated by different routers, service providers, firewalls and geographic locations.
Frequently Asked Questions
Can CGNAT prevent remote access to my computer?
Yes. CGNAT can prevent unsolicited incoming IPv4 connections from reaching your home router. Remote access may still be possible through IPv6, NAT traversal, an outbound tunnel, a VPN or relay infrastructure.
Does port forwarding work behind CGNAT?
Configuring port forwarding on your own router is generally insufficient if the provider also performs NAT. The provider would need to offer a suitable public address or a supported port-mapping service.
What is the difference between STUN and TURN?
STUN helps a device discover its public-facing network address. TURN provides a relay mechanism for exchanging traffic when a direct communication path cannot be established.
Does a relay server make a connection slower?
It can. Traffic routed through an intermediary may travel a longer path and use additional infrastructure. The actual impact depends on relay location, routing, bandwidth and network conditions.
Can two devices behind CGNAT communicate with each other?
Yes, in some cases. NAT traversal techniques may establish a direct path. If that fails, a relay-based architecture can provide an alternative when both devices can reach the relay.
Does OneFas require a public IP address on every device?
OneFas supports direct and relay-based connectivity approaches, so a directly reachable public IPv4 address is not a universal requirement for every remote connection scenario. Actual connectivity depends on network conditions, configuration and relay availability.
Technical References
The networking concepts discussed in this article are based on published Internet standards and technical documentation. The following references provide further reading:
-
RFC 6598 — IANA-Reserved IPv4 Prefix for Shared Address Space
Read the official RFC -
RFC 8656 — Traversal Using Relays around NAT (TURN)
Read the official RFC -
RFC 8489 — Session Traversal Utilities for NAT (STUN)
Read the official RFC -
RFC 8445 — Interactive Connectivity Establishment (ICE)
Read the official RFC
Connect your devices with OneFas
Explore a unified approach to remote device control, file transfer, network connectivity and device management across Windows, Linux and Android.
Explore OneFas
Comments (0)
This article has no comments yet. Be the first to share your thoughts!