Application Layer Gateway
An application layer gateway, or ALG, is a network function that inspects traffic at the application layer and modifies it where required. It is used when protocols carry IP addresses or port numbers inside the payload and therefore conflict with network address translation or firewall rules. Typical examples include SIP for VoIP, FTP in active mode, TFTP and PPTP. The ALG identifies the relevant protocols, rewrites the embedded address information and dynamically opens the required ports. This functionality is provided in routers, firewalls and security appliances. In practice, however, an ALG can also cause issues, for example with encrypted VoIP communication, which is why it is frequently disabled in such scenarios. Deliberate configuration is therefore essential for reliable operation.