Port triggering

From Wikipedia, the free encyclopedia

Port triggering is a configuration option on a NAT-enabled router that allows a host machine to dynamically and automatically forward a specific port back to itself. In layman's terms, port triggering opens an incoming port when your computer is using a specified outgoing port for specific traffic.

Contents

[edit] Description

Port triggering is a way to automate port forwarding in which outbound traffic on predetermined ports ('triggering ports') causes inbound traffic to specific incoming ports to be dynamically forwarded to the initiating host, while the outbound ports are in use. This allows computers behind a NAT-enabled router on a local network to provide services that would normally require the computer to have a fixed address on the local network. Port triggering triggers an open incoming port when a client on the local network makes an outgoing connection on a predetermined port or range of ports.

[edit] Example

As an example of how port triggering operates, when connecting to IRC, it's common to authenticate your username with the Ident protocol via port 113.

When connecting to IRC, the client computer typically makes an outgoing connection on port 6667 (or any port in the range 6660-7000), causing the IRC server to attempt to verify the username given by making a new connection back to the client computer on port 113. When the computer is behind a NAT, the NAT silently drops this connection because it does not know which computer behind the NAT to send the request to connect.

In the case of port triggering, you tell the router that when you make an outbound connection on any port 6660-7000, then it should allow inbound connections to that particular computer. This gives it more flexibility than static port forwarding because you do not need to set it up for a specific address on your network. You also gain security in a sense that that port is not left open when not actively in use.

[edit] Disadvantages

The disadvantage of port triggering is that it only allows one client on the network to supply a particular service that uses a particular incoming port. Port triggering is unsuitable for putting servers behind a NAT router because it relies on the computer to make an outgoing connection before it can receive incoming ones; servers should use port forwarding.

[edit] See also