diff options
author | Jim Higson <jim.higson@gmail.com> | 2017-12-18 17:16:26 +0000 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-12-21 10:47:41 +0100 |
commit | 907ef4a02c3f37edc25f512a0714ad95cac628dd (patch) | |
tree | 15cc1d91ddc5f93b22d296b185cd48b50dcfcc75 /docs | |
parent | 19268d56664900a07fe1aa9e87e939943453fdb0 (diff) | |
download | mitmproxy-907ef4a02c3f37edc25f512a0714ad95cac628dd.tar.gz mitmproxy-907ef4a02c3f37edc25f512a0714ad95cac628dd.tar.bz2 mitmproxy-907ef4a02c3f37edc25f512a0714ad95cac628dd.zip |
Update linux.rst
Diffstat (limited to 'docs')
-rw-r--r-- | docs/transparent/linux.rst | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/docs/transparent/linux.rst b/docs/transparent/linux.rst index 1878008c..d1804d46 100644 --- a/docs/transparent/linux.rst +++ b/docs/transparent/linux.rst @@ -29,8 +29,8 @@ achieve transparent mode. .. code-block:: none iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 - iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080 - + iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080 + 5. Fire up mitmproxy. You probably want a command like this: >>> mitmproxy -T --host @@ -43,3 +43,23 @@ achieve transparent mode. For a detailed walkthrough, have a look at the :ref:`transparent-dhcp` tutorial. + +Debain +====== + +To make the changes permanent on on Debian (inc ubuntu and raspbian) +systems: + + 1. Write the sysctl changes to a new config file at (for example) /etc/sysctl.d/mitm.conf + + .. code-block:: none + + net.ipv4.ip_forward = 1 + net.ipv4.conf.all.accept_redirects = 0 + net.ipv4.conf.all.send_redirects = 0 + + If your system doesn't have a directory /etc/sysctl.d you can instead add the rule to the end of /etc/sysctl.conf + + 2. To make iptables changes persistent, install the package iptables-persistent: + + >>> sudo apt-get install iptables-persistent |