summaryrefslogtreecommitdiffstats
path: root/remote/modules/printergui/data/opt/openslx
diff options
context:
space:
mode:
authorSimon Rettberg2014-01-17 19:39:39 +0100
committerSimon Rettberg2014-01-17 19:39:39 +0100
commitbb0282a103944c6e81d43bc09151b8510e6482ce (patch)
treec2e4343f4c32f952e0d08893919f6d182692fe28 /remote/modules/printergui/data/opt/openslx
parentMerge branch 'master' of simonslx:openslx-ng/tm-scripts (diff)
downloadtm-scripts-bb0282a103944c6e81d43bc09151b8510e6482ce.tar.gz
tm-scripts-bb0282a103944c6e81d43bc09151b8510e6482ce.tar.xz
tm-scripts-bb0282a103944c6e81d43bc09151b8510e6482ce.zip
Make some modules use iptables-helper
Diffstat (limited to 'remote/modules/printergui/data/opt/openslx')
-rwxr-xr-xremote/modules/printergui/data/opt/openslx/iptables/rules.d/50-lpd-redirect-and-fw8
1 files changed, 8 insertions, 0 deletions
diff --git a/remote/modules/printergui/data/opt/openslx/iptables/rules.d/50-lpd-redirect-and-fw b/remote/modules/printergui/data/opt/openslx/iptables/rules.d/50-lpd-redirect-and-fw
new file mode 100755
index 00000000..c0b724a2
--- /dev/null
+++ b/remote/modules/printergui/data/opt/openslx/iptables/rules.d/50-lpd-redirect-and-fw
@@ -0,0 +1,8 @@
+#!/bin/ash
+
+# Close from outside
+iptables -A INPUT -i br0 -p tcp --dport 515 -j DROP
+iptables -A INPUT -i br0 -p tcp --dport 5515 -j DROP
+# Redirect from VM to lpd
+iptables -t nat -A PREROUTING -s 192.168.0.0/16 -p tcp --dport 515 -j REDIRECT --to-port 5515
+