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:
parent
421ac61655
commit
9a26436dec
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue