summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage32/data
diff options
context:
space:
mode:
authorSimon Rettberg2013-10-04 14:06:18 +0200
committerSimon Rettberg2013-10-04 14:06:18 +0200
commite0fcb1d2f0fb27047e84f2164e1aa0ce0a461f39 (patch)
treed95792068a4190f8027cb862718593d148405b8d /remote/rootfs/rootfs-stage32/data
parentMerge branch 'master' of simonslx:openslx-ng/tm-scripts (diff)
downloadtm-scripts-e0fcb1d2f0fb27047e84f2164e1aa0ce0a461f39.tar.gz
tm-scripts-e0fcb1d2f0fb27047e84f2164e1aa0ce0a461f39.tar.xz
tm-scripts-e0fcb1d2f0fb27047e84f2164e1aa0ce0a461f39.zip
[rootfs-stage32] Add iptables rule to redirect printing jobs to port 515
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data')
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx4
1 files changed, 4 insertions, 0 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx
index 4c1d9ffc..c2dbfbb4 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx
@@ -132,6 +132,10 @@ case "$1" in
# Mark network target as reached
systemctl start network.target
+ # Port redirection for printing
+ iptables -A INPUT -i br0 -p tcp --dport 515 -j DROP
+ iptables -A INPUT -i br0 -p tcp --dport 5515 -j DROP
+ iptables -t nat -A PREROUTING -p tcp --dport 515 -j DNAT --to-destination 127.0.0.1:5515
fi
;;