This is a migrated thread and some comments may be shown as answers.

Fiddler as reverse proxy

6 Answers 2305 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Wojciech Rajchel
Top achievements
Rank 1
Wojciech Rajchel asked on 18 Nov 2019, 03:57 PM

My aim is to log all requests coming to IIS10 server on the Windows Server 2016 from any customer.

A request is called with the port 80. Fiddler should redirect all requests to IIS on the port 8888. 

I made all steps described by Eric Lawrence:

If you want Fiddler to capture traffic coming *in* to your IIS server and going *out* from your IIS server, then you need to run Fiddler in both reverse proxy mode and normal proxy mode. First, get Fiddler capturing the traffic coming out from your IIS server (by editing machine.config & setting the proxy settings for WinHTTP to 127.0.0.1:8888, etc). Then, move your IIS instance to a different port (8080) and configure Fiddler to listen on port 80 as well (e.g. type !listen 80 in QuickExec to set up a second listening endpoint). In FiddlerScript, you then need to forward requests received on port 80 to your IIS instance (8080).

source https://www.telerik.com/forums/capture-all-iis-traffic-on-the-web-server

I see endless loop of requests sent from Fiddler to IIS. Only one request is sent from a client machine( tested also with Fiddler). Also after I disable "Capture Traffic" the outgoing requests to IIS are logged in Fiddler. 

Configuration

IIS domain binding set to the port 8888

Machine.config

<system.net>
    <defaultProxy>
        <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
    </defaultProxy>
</system.net>

Custom rules in Fiddler:

if (oSession.host == "xxx.com:80") 
{
oSession.host = "xxx.com:8888";
}

Allow remote computers to connect set to true in Fiddler.

What can be wrong in the configuration?

 

 

 

 

 

6 Answers, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 21 Nov 2019, 02:38 PM

Hi Wojciech,

Without seeing the actual configuration, I can only assume that Fiddler and IIS are using the same port because port 8888 is Fiddler's default port. Per Eric's instructions, Fiddler should be in normal proxy mode and reverse proxy mode simultaneously. If using the same port for IIS and Fiddler, this will cause conflicts. I recommend changing the IIS Port to a different Port like 8080, 81, or 8181. Then changing the Custom Rule to the following. 

if (oSession.host == "xxx.com:80") 
{
    oSession.host = "xxx.com:8181"; // Could be 8080,81 or 8181
}

If the issue persists, can you provide screenshots of the configuration from both the IIS bindings and Fiddler?

Please give this a try and let me know the results. Thank you and I look forward to your reply.

Regards,


Eric R | Technical Support Engineer
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wojciech Rajchel
Top achievements
Rank 1
answered on 22 Nov 2019, 01:32 PM

Hello Eric

Fiddler is correctly set to listen on the port 80. The binding in IIS is set the port 81.

if (oSession.host == "xxx.com:80") { oSession.host = "xxx.com:81";  }

So here should be everything ok.

I made a change to test if fiddler works with other websites independently from our web server.

if (oSession.host == "xxx.com:80") { oSession.host = "google.com:80";  }

It should also works and return the Google website, I think.

So something else happens here. Local firewall was disabled during the test. 

Even though I disable "Capture" option in Fiddler infinite loop of requests for a target website is logged.

What should i do in a next step to solve the problem?

 

Regards

WR

 

0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 25 Nov 2019, 03:43 PM

Hi Wojciech Rajchel,

Thank you for providing this information. I was able to reproduce the issue and will be reaching out to my colleagues to verify if this is a bug. Once I have more information I will reply back to this thread.

In the meantime, please let me know if you need any additional information. Thank you for using the Fiddler Forums.

Regards,


Eric R | Technical Support Engineer
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wojciech Rajchel
Top achievements
Rank 1
answered on 25 Nov 2019, 04:12 PM
Thank you Eric. I am waiting for your reply.
0
Wojciech Rajchel
Top achievements
Rank 1
answered on 02 Dec 2019, 01:48 PM

Hello Eric,

Do you have any update from dev team?

Regards

W Rajchel

0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 02 Dec 2019, 03:47 PM

Hi Wojciech Rajchel,

Thank you for following up and providing information for this Bug Report. We discussed this and will move forward with adding this to our backlog. As a token of gratitude for your feedback, I created a public Bug Report and increased its priority by adding a vote for you. I encourage following the request to receive future status updates. 

In the meantime, please let me know if you need any additional information and thank you for your valued feedback.

Regards,


Eric R | Technical Support Engineer
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Fiddler Classic
Asked by
Wojciech Rajchel
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Wojciech Rajchel
Top achievements
Rank 1
Share this question
or