iptables for Windows to redirect traffic

18,727

Burp doesn't look like an IPS designed to handle traffic forwarded directly to it, but you can do a port forward on windows with the netsh interface portproxy command. See MSDN for details and syntax.

Caveat: this will only redirect traffic destined for the IP address of the computer on which you create the forward.

netsh interface portproxy v4tov4 listenport=80 connectaddress=192.168.0.100 connectport=8080 protocol=tcp
netsh interface portproxy v4tov4 listenport=443 connectaddress=192.168.0.100 connectport=8080 protocol=tcp

If instead you mean you want to configure the Burp service to be a transparent proxy for the entire network and you are using RRAS as your router, you are out of luck. There is not a built in capability to do iptables style routing in RRAS, but there are several third party solutions available. Markus claims SoftPerfect Bandwidth Manager may fit the bill.

The classical forced proxy config for a windows network is just to use group policy to push the appropriate settings, but that has its obvious limitations.

Share:
18,727

Related videos on Youtube

bunbun
Author by

bunbun

Coder

Updated on September 18, 2022

Comments

  • bunbun
    bunbun over 1 year

    I am currently testing my server traffic and would like to route all incoming+outgoing traffic so as to be picked up by Burpsuite for analysis.

    Ideally, all traffic from ports 80 and 443 should be routed through port 8080. In Linux, this is simple with iptables, but I want to do this in Windows. Advice?

  • Luc
    Luc over 7 years
    On Windows 7, it errors on unknown interface. When going into the netsh shell manually and navigating to interface > portproxy it works though. However when using (on 10.0.0.1) add v4tov4 listenport=3306 connectaddress=10.0.0.2 connectport=3306 it does not forward the connection. When trying to connect to localhost on 3306, it gives a connection refused error. Using show v4tov4 in that same context shows the rule. Any ideas how to even start debugging this, or what I could try?