aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTom Saleeba <tom.saleeba@gmail.com>2019-08-01 22:04:58 +0930
committerGitHub <noreply@github.com>2019-08-01 22:04:58 +0930
commitf47608c85ec0dcba456a759d1b862c3db8bcaddb (patch)
tree8f2b14a39cc59563bcc83c346b0545cf520ccb2f /docs
parentba848e2040a50bc63fd14d79939df53869d9dcdb (diff)
downloadmitmproxy-f47608c85ec0dcba456a759d1b862c3db8bcaddb.tar.gz
mitmproxy-f47608c85ec0dcba456a759d1b862c3db8bcaddb.tar.bz2
mitmproxy-f47608c85ec0dcba456a759d1b862c3db8bcaddb.zip
docs: correct command to install mitmproxy
Diffstat (limited to 'docs')
-rw-r--r--docs/src/content/howto-transparent.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/src/content/howto-transparent.md b/docs/src/content/howto-transparent.md
index 5b4b5dd8..803f8f10 100644
--- a/docs/src/content/howto-transparent.md
+++ b/docs/src/content/howto-transparent.md
@@ -91,12 +91,14 @@ Set the test device up to use the host on which mitmproxy is running as the defa
Follow steps **1, 2** as above, but *instead* of the commands in step **3**, run the following
Create a user to run the mitmproxy
+
{{< highlight bash >}}
sudo useradd --create-home mitmproxyuser
-sudo -u mitmproxyuser 'cd ~ && pip install --user mitmproxy'
+sudo -u mitmproxyuser bash -c 'cd ~ && pip install --user mitmproxy'
{{< / highlight >}}
Then, configure the iptables rules to redirect all traffic from our local machine to mitmproxy. **Note**, as soon as you run these, you won't be able to perform successful network calls *until* you start mitmproxy. If you run into issues, `iptables -t nat -F` is a heavy handed way to flush (clear) *all* the rules from the iptables `nat` table (which includes any other rules you had configured).
+
{{< highlight bash >}}
iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner mitmproxyuser --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner mitmproxyuser --dport 443 -j REDIRECT --to-port 8080