The TCP/IP Redirector reroutes TCP connections to a different IP address and port without requiring changes to the client code or settings It transparently redirects TCP connections for local port mapping and staging tests while the client keeps connecting to the same endpoint.
What Is TCP/IP Redirector?
TCP/IP Redirector is a built-in HTTP Debugger feature that redirects TCP connections from one IP:port endpoint to another. Rules can be scoped to a specific application; if Application was not specified, the rule applies to all applications.
A TCP redirector operates at the TCP layer: it reroutes the connection itself, so it does not send HTTP 301/302 responses and does not rewrite URLs.
Note: when redirecting HTTP traffic between different websites, also replace the Host header so the destination server selects the correct virtual host. In HTTP Debugger, this can be done with the HTTP Modifier.
TCP/IP Redirector Settings
| Setting | Meaning |
|---|---|
| Application | Limits redirection to a specific application. If no application name is provided, the redirect rule works for all applications. |
| From | The original destination IP:port to match (the endpoint the app is trying to connect to). |
| To | The new destination IP:port to connect to instead. |
For precision and performance, prefer defining an Application whenever possible and disable TCP/IP Redirector when not actively using it.
How to Create a Redirect Rule
- Identify the TCP endpoint that the client connects to (From) and the endpoint you want to test against (To).
- Configure a redirect rule with From and To and (optionally) the Application to scope the rule to one process.
- If the redirect goes to a different website, add an HTTP Modifier rule that replaces the
Hostheader with the destination host name. - Test the client behavior and verify the captured traffic in HTTP Debugger.
- If results do not change, restart the browser or client application to reset cached TCP connections.
Create Redirect Rules from Captured Traffic
Redirect rules can also be created directly from a selected request in the traffic grid using the context menu. This is useful when you already have a real request that shows the exact host and port the application connects to.
TCP Redirector: When It Helps
- Local port mapping: redirect
127.0.0.1:80to127.0.0.1:8080to test a service on a non-default port. - Redirect to a test backend: send the same client traffic to a staging environment without changing client settings.
- Debug traffic between sites: point traffic at a different IP:port and then adjust HTTP headers (for example
Host) when needed.
Practical Example: Redirect to a Staging API
A common debugging workflow is to redirect a production endpoint to a staging backend without rebuilding the client. For example, redirect TCP connections from 203.0.113.10:443 to 198.51.100.20:443, then rewrite the HTTP Host header so the staging server routes the request correctly.
Host header rewrite is an HTTP-layer change, separate from TCP redirection. A typical request header line looks like:
Host: api.example.com
After redirecting to a different site, the Host value must often match the destination site, for example Host: staging-api.example.net.
Notes and Common Mistakes
- Expecting an HTTP redirect: a TCP redirector does not send
301/302responses and does not change the URL in a browser. It only changes the destination of the TCP connection. - Forgetting the
Hostheader: redirecting traffic between websites without changingHostoften leads to the wrong virtual host or unexpected content. - Reused connections: browsers and many HTTP clients keep TCP connections open; changes may not apply until the client restarts.
- Leaving it enabled: disable TCP/IP Redirector when not in use to reduce overhead.
TCP Redirector vs Port Forwarding Tools
TCP port redirection is also possible with OS-level tools such as Windows netsh interface portproxy, Linux iptables DNAT/REDIRECT rules, or socat. These options work outside of HTTP Debugger, but they usually require admin privileges, are harder to scope per application, and do not integrate with HTTP-level debugging tasks like header rewriting.
TCP Redirector FAQ
- Is a TCP redirector the same as an HTTP 302 redirect?
No. An HTTP redirect is an HTTP response sent by a server and changes what URL the client requests next. A TCP redirector changes the destination of the TCP connection before any HTTP request is processed.
- Why does redirecting between sites require changing the Host header?
Many servers host multiple sites behind the same IP address. The
Hostheader tells the server which virtual host the client wants. If you redirect to a different site but keep the oldHost, the server may return content for the wrong site. - Why do I need to restart the browser after changing a redirect rule?
Browsers often reuse existing TCP connections (keep-alive). A redirect rule affects new connections; restarting forces the browser to establish new connections and pick up the updated redirection.
- What is the difference between a TCP redirector and a TCP proxy?
A TCP proxy terminates and re-creates connections at the application layer and often requires explicit proxy configuration. A TCP redirector forwards connections transparently at the TCP level, which makes it useful for local port mapping and test backends when you cannot or do not want to change client configuration.
- Can I scope TCP redirection to one process?
Yes. Use the Application field to target a specific application. If it is left empty, the rule applies to all applications.



