Skip to content

Commit 631965b

Browse files
committed
fix: remove iptables filter after CNI (#2421)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent c103001 commit 631965b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/core/services/cluster/src/workflows/server/install/install_scripts/files/pegboard_configure.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ for ipt in iptables ip6tables; do
255255
# Allow egress traffic
256256
add_ipt_rule "\$ipt" "filter" "$ADMIN_CHAIN" "-s \$SUBNET_VAR -o __PUBLIC_IFACE__ -j ACCEPT"
257257
258-
# Allow public ingress traffic ONLY on host ports
259-
add_ipt_rule "\$ipt" "filter" "$ADMIN_CHAIN" "-p tcp --dport __MIN_WAN_PORT__:__MAX_WAN_PORT__ -d \$SUBNET_VAR -i __PUBLIC_IFACE__ -j ACCEPT"
260-
add_ipt_rule "\$ipt" "filter" "$ADMIN_CHAIN" "-p udp --dport __MIN_WAN_PORT__:__MAX_WAN_PORT__ -d \$SUBNET_VAR -i __PUBLIC_IFACE__ -j ACCEPT"
258+
# Allow public ingress traffic on all ports because this is already mapped by CNI
259+
add_ipt_rule "\$ipt" "filter" "$ADMIN_CHAIN" "-p tcp -d \$SUBNET_VAR -i __PUBLIC_IFACE__ -j ACCEPT"
260+
add_ipt_rule "\$ipt" "filter" "$ADMIN_CHAIN" "-p udp -d \$SUBNET_VAR -i __PUBLIC_IFACE__ -j ACCEPT"
261261
262262
# MARK: Deny
263263
# Deny all other egress traffic

packages/edge/api/actor/src/route/actors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub async fn create(
185185
args: Vec::new(),
186186
network_mode: network.mode.unwrap_or_default().api_into(),
187187
environment: body.runtime.and_then(|r| r.environment).unwrap_or_default(),
188-
network_ports: unwrap!(network
188+
network_ports: network
189189
.ports
190190
.unwrap_or_default()
191191
.into_iter()
@@ -230,7 +230,7 @@ pub async fn create(
230230
}
231231
}
232232
)))
233-
.collect::<GlobalResult<HashMap<_, _>>>()),
233+
.collect::<GlobalResult<HashMap<_, _>>>()?,
234234
endpoint_type,
235235
})
236236
.tag("actor_id", actor_id)

0 commit comments

Comments
 (0)