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)
This commit is contained in:
♥ Minnie ♥ 2025-11-01 18:26:03 +08:00
parent 421ac61655
commit 9a26436dec
Signed by: jasmine
GPG key ID: 8563E358D4E8040E

View file

@ -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
'';
};
};