mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
Update for Ubuntu 16.04
This commit is contained in:
parent
2c85b262d5
commit
bff75f4ff6
@ -38,8 +38,14 @@ DHCP and TFTP) services to a small-scale network.
|
|||||||
**Ubuntu >12.04** runs an internal dnsmasq instance (listening on loopback only) by default
|
**Ubuntu >12.04** runs an internal dnsmasq instance (listening on loopback only) by default
|
||||||
`[1] <https://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/>`_. For our use case, this needs
|
`[1] <https://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/>`_. For our use case, this needs
|
||||||
to be disabled by changing ``dns=dnsmasq`` to ``#dns=dnsmasq`` in
|
to be disabled by changing ``dns=dnsmasq`` to ``#dns=dnsmasq`` in
|
||||||
**/etc/NetworkManager/NetworkManager.conf** and running
|
**/etc/NetworkManager/NetworkManager.conf** and
|
||||||
|
|
||||||
|
if on Ubuntu 16.04 or newer running:
|
||||||
|
|
||||||
|
>>> sudo systemctl restart NetworkManager
|
||||||
|
|
||||||
|
if on Ubuntu 12.04 or 14.04 running:
|
||||||
|
|
||||||
>>> sudo restart network-manager
|
>>> sudo restart network-manager
|
||||||
|
|
||||||
afterwards.
|
afterwards.
|
||||||
@ -61,6 +67,12 @@ DHCP and TFTP) services to a small-scale network.
|
|||||||
|
|
||||||
Apply changes:
|
Apply changes:
|
||||||
|
|
||||||
|
if on Ubuntu 16.04 or newer:
|
||||||
|
|
||||||
|
>>> sudo systemctl restart dnsmasq
|
||||||
|
|
||||||
|
if on Ubuntu 12.04 or 14.04:
|
||||||
|
|
||||||
>>> sudo service dnsmasq restart
|
>>> sudo service dnsmasq restart
|
||||||
|
|
||||||
Your **proxied machine** in the internal virtual network should now receive an IP address via DHCP:
|
Your **proxied machine** in the internal virtual network should now receive an IP address via DHCP:
|
||||||
@ -74,8 +86,8 @@ To redirect traffic to mitmproxy, we need to add two iptables rules:
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080
|
sudo iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080
|
||||||
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 8080
|
sudo iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 8080
|
||||||
|
|
||||||
4. Run mitmproxy
|
4. Run mitmproxy
|
||||||
----------------
|
----------------
|
||||||
|
Loading…
Reference in New Issue
Block a user