Skip to content

OpenBSD patch in pf: NAT source port translation for MAP-E customer edge

License

Notifications You must be signed in to change notification settings

toru-mano/openbsd-pf-map-e-ce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

OpenBSD patch in pf: NAT source port translation for MAP-E customer edge

MAP-E (RFC 7597) transports IPv4 packets across an IPv6 network using IP encapsulation. MAP-E uses a single IPv4 address for multiple customers. To distinguish customers at Border Relay, each Customer Edge must use an exclusive port set.

This patch provides an option map-e-portset in pf(4) to specify the port set used in MAP-E Customer Edge. The following pf.conf(5) example sets PSID offset to 4, PSID length to 6, and PSID to 20:

match out on $gif_if nat-to ($gif_if) map-e-portset 4/6/20

Note that, to work as a MAP-E Customer Edge, creating and configuring a tunneling gif(4) interface are also required.

How to use

To apply this patch, you need to build OpenBSD from source.

Follow the instructions in Building OpenBSD from Source (www.openbsd.org) and before building a new kernel, apply the path as follows.

cd /usr/src/
patch -p0 < /path/to/mape.patch

After applying the patch, continue to follow the above instructions.

Prerequisites

  • OpenBSD 7.0 or later

About

OpenBSD patch in pf: NAT source port translation for MAP-E customer edge

Topics

Resources

License

Stars

Watchers

Forks