From 9a26436dec2afca8071a6beee6a6e58b414471c4 Mon Sep 17 00:00:00 2001 From: jasmine Date: Sat, 1 Nov 2025 18:26:03 +0800 Subject: [PATCH] feat(fuchsia): enable bidirectional network access for printer Allow devices on the WiFi network (192.168.50.x) to access the 3D printer on the Ethernet subnet (10.1.0.x). This enables printer access from phones and other WiFi devices when used with a static route on the router. Changes: - Add bidirectional forwarding rules between wlo1 and enp34s0 - Remove stateful connection restriction for simpler routing - Improve comments to clarify traffic direction Requires router configuration: Route 10.1.0.0/24 via 192.168.50.237 (fuchsia's WiFi IP) --- nixos/fuchsia/services/internet-sharing/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/fuchsia/services/internet-sharing/default.nix b/nixos/fuchsia/services/internet-sharing/default.nix index b6459a3..dc7f444 100644 --- a/nixos/fuchsia/services/internet-sharing/default.nix +++ b/nixos/fuchsia/services/internet-sharing/default.nix @@ -42,11 +42,13 @@ extraCommands = '' # NAT: masquerade traffic from Ethernet going to WiFi iptables -t nat -A POSTROUTING -o wlo1 -j MASQUERADE - # Allow forwarding from Ethernet to WiFi + + # Allow forwarding from Ethernet to WiFi (printer -> internet) iptables -A FORWARD -i enp34s0 -o wlo1 -j ACCEPT - # Allow established connections back from WiFi to Ethernet - iptables -A FORWARD -i wlo1 -o enp34s0 -m state \ - --state RELATED,ESTABLISHED -j ACCEPT + + # Allow forwarding from WiFi to Ethernet (phone -> printer) + # This enables devices on 192.168.50.x to access the printer + iptables -A FORWARD -i wlo1 -o enp34s0 -j ACCEPT ''; }; };