aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-29 13:41:45 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-03-29 13:41:45 +0200
commitee2ed303c8f3d22997e868649240c8c183bdfb89 (patch)
tree12654911ce48bbef5295d31ca0c8379c95199831
parentaedb3988d6ee118615fa3854c96068baec7e02e8 (diff)
Add le iptables helper script
-rwxr-xr-xdoc/le-iptables.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/le-iptables.sh b/doc/le-iptables.sh
new file mode 100755
index 0000000..dff1fea
--- /dev/null
+++ b/doc/le-iptables.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+for host in outbound1.letsencrypt.org outbound2.letsencrypt.org; do
+ for port in 80 443; do
+ dest=$((port+8000))
+ iptables --table nat --append PREROUTING --protocol tcp \
+ --source $host --dport $port --jump REDIRECT --to-ports $dest
+ done
+done