net/containernetworking-plugins: update to 0.2

Approved by:    dch
This commit is contained in:
Doug Rabson 2022-11-30 13:30:22 +00:00
parent 512b99159a
commit 26861cc612
4 changed files with 13 additions and 10 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= containernetworking-plugins
DISTVERSION= 0.1
DISTVERSION= 0.2.1
CATEGORIES= net
MAINTAINER= dfr@FreeBSD.org
@ -14,7 +14,7 @@ BUILD_DEPENDS= bash:shells/bash
USE_GITHUB= yes
GH_ACCOUNT= dfr
GH_PROJECT= plugins
GH_TAGNAME= 60b0a2b
GH_TAGNAME= freebsd-v0.2.1
do-build:
cd ${WRKSRC} && ${SETENV} XDG_CACHE_HOME=${WRKDIR}/.cache GO=${GO_CMD} ./build_freebsd.sh

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1667064085
SHA256 (dfr-plugins-0.1-60b0a2b_GH0.tar.gz) = e2eb2a6ec6209b4cd08ebd53b104fe1d0edafb3d3473c8450e60a69e3c509399
SIZE (dfr-plugins-0.1-60b0a2b_GH0.tar.gz) = 4197131
TIMESTAMP = 1669909849
SHA256 (dfr-plugins-0.2.1-freebsd-v0.2.1_GH0.tar.gz) = b915e4861e311797ab266badca84977a9daf1618c7b08c694f1402fbaa7ece66
SIZE (dfr-plugins-0.2.1-freebsd-v0.2.1_GH0.tar.gz) = 4197418

View File

@ -1,8 +1,9 @@
# Change this to the interface with the default route
egress_if = "ix0"
# Change these to the interface(s) with the default route
v4egress_if = "ix0"
v6egress_if = "ix0"
nat on $egress_if inet from <cni-nat> to any -> ($egress_if)
nat on $egress_if inet6 from <cni-nat> to !ff00::/8 -> ($egress_if)
nat on $v4egress_if inet from <cni-nat> to any -> ($v4egress_if)
nat on $v6egress_if inet6 from <cni-nat> to !ff00::/8 -> ($v6egress_if)
rdr-anchor "cni-rdr/*"
table <cni-nat>

View File

@ -3,6 +3,8 @@ out to the host's network. This requires a PF firewall to perform the
translation. A simple example is included - to use it:
# cp /usr/local/etc/containers/pf.conf.sample /etc/pf.conf
... edit /etc/pf.conf and set egress_if to your network interface ...
...
Edit /etc/pf.conf and set v4egress_if, v6egress_if to your network interface(s)s
...
# sysrc pf_enable=YES
# service pf start