# How to forward requests to a local IP

**URL:** <https://community.traefik.io/t/how-to-forward-requests-to-a-local-ip/14795>\
**Category:** Traefik v2\
**Tags:** cli, file, docker\
**Created:** [June 17, 2022, 8:22am UTC](https://community.traefik.io/t/how-to-forward-requests-to-a-local-ip/14795 "2022-06-17T08:22:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![moutoum](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/moutoum/32/5325_2.png) [@moutoum](https://community.traefik.io/u/moutoum)\
**Post date:** [June 17, 2022, 9:28am UTC](https://community.traefik.io/t/how-to-forward-requests-to-a-local-ip/14795/2 "2022-06-17T09:28:11Z")

</div>

Hi @floatingpurr,  
Thanks for your interest in Traefik.

The "too many redirects" error comes from a loop that occurs in your traefik container.  
When using traefik labels for dynamic configuration, the server url is not configurable and always points to the container ip. The label `traefik.http.services.foo.loadbalancer.server.url` with the value `http://192.168.0.8080` is just ignored.

For you use case, I suggest you to use the file provider for the dynamic configuration.  
To do so, you have to:

- enable the [file provider](https://doc.traefik.io/traefik/providers/file/) in the traefik command:

```auto
command:
  --providers.file.filename=/path/to/dynamic.yml
volumes:
  - ./config.yml:/path/to/dynamic.yml

```

- create the dynamic config file (`./config.yml`):

```auto
http:
  routers:
    foo:
      rule: Host(`match.example.com`)
      service: foo

  services:
    foo:
      loadBalancer:
        servers:
          - url: http://host.docker.internal:8081

```

---

_[View the full topic](https://community.traefik.io/t/how-to-forward-requests-to-a-local-ip/14795)._
