summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/ubuntu/ip-redirect
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-11-28 07:17:11 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-11-28 07:17:11 +0000
commit14f1ada7b2bb66c6c3dae496d3963e9af3f0ab38 (patch)
tree01d610b53ba9b2088138d057f16ed6e5122cfe36 /sca-cpp/trunk/ubuntu/ip-redirect
parent6c67a3ca11e4bcd7715d92df2e3e41e4e3fc0dc9 (diff)
Use different servers for cert-based and password-based auth and use event MPMs for tunnel and proxy servers.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1039840 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/ubuntu/ip-redirect')
-rwxr-xr-xsca-cpp/trunk/ubuntu/ip-redirect6
1 files changed, 4 insertions, 2 deletions
diff --git a/sca-cpp/trunk/ubuntu/ip-redirect b/sca-cpp/trunk/ubuntu/ip-redirect
index 93c60ccfb7..e78c63935b 100755
--- a/sca-cpp/trunk/ubuntu/ip-redirect
+++ b/sca-cpp/trunk/ubuntu/ip-redirect
@@ -26,8 +26,10 @@ tport=$2
dest=$3
# Redirect external incoming traffic
-sudo /sbin/iptables -t nat -A PREROUTING --destination $dest -p tcp --dport $sport -j REDIRECT --to-port $tport
+sudo /sbin/iptables -t nat -S PREROUTING | grep "\-d $dest/" | grep "\-p tcp" | grep "\-\-dport $sport" | grep "\-j REDIRECT" | sed "s/^-A/-D/" | awk -F "\t" '{ printf "sudo /sbin/iptables -t nat %s\n", $1 }' | /bin/sh
+sudo /sbin/iptables -t nat -A PREROUTING --destination $dest -p tcp --dport $sport -j REDIRECT --to-ports $tport
# Redirect local traffic as well
-sudo /sbin/iptables -t nat -A OUTPUT --destination $dest -p tcp --dport $sport -j REDIRECT --to-port $tport
+sudo /sbin/iptables -t nat -S OUTPUT | grep "\-d $dest/" | grep "\-p tcp" | grep "\-\-dport $sport" | grep "\-j REDIRECT" | sed "s/^-A/-D/" | awk -F "\t" '{ printf "sudo /sbin/iptables -t nat %s\n", $1 }' | /bin/sh
+sudo /sbin/iptables -t nat -A OUTPUT --destination $dest -p tcp --dport $sport -j REDIRECT --to-ports $tport