
Session Handling
50
Normally the choice is random, but there is an option (hash) which can be set to make the choice determined
based on a has of the source and target IP address. This allows consistent mapping of sessions to the same
server. As the choice depends on the set of servers which have an active profile, if the profiles change, sessions
will get a new consistent mapping based on IP addresses.
7.3.3.6. NAT-PMP / PCP (Port Control Protocol)
The FireBrick supports protocols that allow devices on your LAN to request port mapping and firewall holes
using RFC6886 (NAT-PMP) and RFC6887 (PCP). These are newer protcols than uPnP (univeral plug and
play) and used by many devices and applications. PCP is the later protocol and allows handling of IPv6 and
also allows finer control such as opening a firewall hole for a specific block of external IPs only.
It is importamt to understand that there are two stages to the use of these protocols. Firstly a device on the local
network will send a message to the FireBrick as the gateway device requesting a mapping or firewall hole.
Secondly, a session may be created that matches that mapping or firewall hole, and needs to be allowed or not
accoridng to normal firewall rules.
The first stage is controlled by a setting on the subnet. By default, any subnet marked as
nat="true"
has
pcp
true as well, as does any subnet created using IPv6 Prefix Delegation. Settings on the interface and subnet
can override these defaults. Only if a subnet has pcp set will a NAT-PMP or PCP packet be accepted and
processed to create mappings.
Once created, the mappings can be viewed on the status page for sessions. When a new session starts it is
checked against these mappings. The mappings may relate to incoming traffic or outgoing traffic. The mapping
is applied to the new session, so, for example, incoming traffic to a specific mapped external port may be
mapped to an internal device IP and port. This mapped traffic is then processed via the firewall rules as normal,
but as it is already mapped it allows the firewall rules to consider the target (typically a private) IP address and
port. This allows much finer control than would be possible otherwise, and one can, for example, easily allow
all mapped traffic to specific internal devices such as gaming consoles.
In order to make the firewall rules easier to manage, any mapped traffic using a NAT-PMP/PCP rule will be
flagged as
pcp
and so you can make rules relating specifically to these mapped sessions. As such a rule to
allow all incoming mapped sessions is simple to create.
It is important to note that by default, on factory reset, the firewall rules block all incoming sessions to the
LAN, and this will mean that even mapped sessions set up using NAT-PMP or PCP will also be blocked. An
additional rule is necessary to allow such sessions. This rule can test for destination IPs even where these are
private IP addresses on the LAN as the mappings are already applied before checking firewall rules. This means
the FireBrick can be set to allow NAT-PMP and PCP sessions only for specific devices, ports and protocols
by using firewall rules.
Tip
The factory default config has a rule that is set to disabled profile. Simply changing this to not have
a profile will allow all mapped traffic in to your LAN.
Note
NAT-PMP and PCP have no authentication. Any device on your LAN can send a message to create
mappings. Whilst the FireBrick does not allow the PCP third party option, it is possible for packets to
have spoofed IP and even MAC addresses to open ports to other devices. As such a blanket acceptance
of all mappings is a security risk, and ideally you should consider which mappings you wish to apply.
Note
NAT-PMP and PCP can set up outgoing connections as well as incoming. These would typically be
allowed through a firewall, but this allows long timeouts, so for example a long timeout outgoing
UDP session could be created that then allows traffic back the other way for way longer than might
otherwise have been expected. Obviously firewall rules can be used to check outgoing NAT-PMP/
PCP sessions and these can even override the timeouts requested by NAT-PMP/PCP.
Содержание FB6402
Страница 1: ...FireBrick FB6402 User Manual FB6000 Versatile Network Appliance...
Страница 2: ......