An Application Layer Gateway (ALG) is a network security component that inspects and manages traffic for specific applications at Layer 7 of the OSI model.
Sometimes called an application-level gateway, an ALG understands the protocols behind services such as SIP, FTP and RTSP, so it can open and close firewall ports dynamically, rewrite embedded IP addresses for NAT traversal and block traffic that does not conform to the protocol.
ALGs are commonly built into firewalls, routers and load balancers, where they act as a protocol-aware intermediary between clients and the servers delivering an application. The Progress® Kemp® LoadMaster® solution applies this same application-layer intelligence to load balancing and application delivery.
Standard firewalls filter traffic using IP addresses and port numbers, but many application protocols do not behave predictably at that level.
Protocols such as SIP and FTP negotiate secondary connections on dynamic ports and embed IP address information inside the message payload, which breaks when traffic passes through Network Address Translation (NAT). An ALG solves this by reading the application data itself.
A typical ALG workflow looks like this:
Traffic interception: The ALG sits in the traffic path, usually within a firewall, router or gateway device, and identifies sessions belonging to a supported protocol.
Deep packet inspection: Because the ALG understands the data format of the application, it parses the payload, not just the packet headers.
Dynamic port management: When the application negotiates a new data channel, such as an FTP data transfer or an RTP media stream in a VoIP call, the ALG opens the required firewall pinhole and closes it when the session ends.
NAT rewriting: The ALG rewrites private IP addresses embedded in the payload so sessions survive NAT translation and connect to remote servers on behalf of internal clients.
Protocol validation: Traffic that violates the expected protocol behavior is flagged or rejected, protecting the servers behind the gateway from malformed or malicious requests.
Without an ALG, administrators face an uncomfortable choice: leave wide port ranges open so applications such as VoIP and FTP function, or lock the firewall down and break those applications. An ALG removes that trade-off.
From a security standpoint, an ALG shrinks the attack surface by opening ports only for the duration of a validated session. From an availability standpoint, it keeps latency-sensitive services such as voice and video working reliably across NAT boundaries. From an operational standpoint, it reduces the manual firewall rule maintenance that dynamic-port applications would otherwise require.
For infrastructure teams managing real-time communications, file transfer or streaming services, ALG functionality is often the difference between an application that works and one that generates support tickets.
Application-layer intelligence is not limited to firewalls.
A load balancer operating at Layer 7 applies the same protocol awareness to application delivery.
The Kemp LoadMaster solution applies Layer 7 intelligence to inspect application traffic and make intelligent routing decisions, supports SIP-aware load balancing for VoIP and unified communications environments, and helps protect published services through its integrated Web Application Firewall (WAF).
For teams evaluating ALG capabilities as part of a broader application delivery strategy, LoadMaster combines Layer 7 inspection, traffic management and security in a single platform.
| Technology | Primary Role | How It Differs From an ALG |
|---|---|---|
| Proxy firewall | Terminates the client connection and originates a new connection to the server, fully brokering the session. | The terms overlap, and application-level gateways are sometimes called proxy firewalls. Many ALG implementations inspect and modify traffic in transit without acting as a full proxy. |
| Application-layer firewall or WAF | Filters and blocks threats in application traffic, typically HTTP/S. | An ALG focuses on enabling specific protocols to traverse the network correctly, with inspection as a supporting function. |
| Network Address Translation (NAT) | Translates IP addresses at the network layer. | NAT cannot see addresses embedded inside application payloads. An ALG complements NAT by rewriting that embedded information so the application still works. |
SIP ALG is an application layer gateway function for the Session Initiation Protocol used by VoIP systems. It rewrites SIP messages and manages media ports so calls work through NAT. On enterprise-grade equipment, it is valuable; on many consumer routers, it is implemented poorly and is a common cause of VoIP call problems.
It depends on the implementation. Many VoIP providers recommend disabling SIP ALG on consumer and small business routers because faulty implementations corrupt SIP messages. In enterprise environments, a well-implemented SIP-aware gateway or load balancer handles this function reliably.
It is a legitimate Windows system service that historically supported protocol plugins for Internet Connection Sharing and the built-in firewall. It is safe to leave running, and most modern systems do not actively use it.
They are closely related, and ALGs are sometimes called proxy firewalls. A proxy server fully terminates and re-establishes connections on behalf of clients, while many ALGs inspect and modify traffic inline without acting as a complete intermediary.
No. An ALG extends firewall functionality with application awareness. It typically runs as a component within a firewall, router or application delivery controller rather than replacing one.
Do you have application delivery questions? Our engineers would love to help!
Schedule a Call