# t-online

This is about connecting the Draytec Vigor 165 as simple Modem to a VDSL2 t-online connection in Germany

# setup

[![installation](https://naumann.dev/uploads/images/gallery/2020-04/scaled-1680-/IMG_20200222_102700.jpg)](https://naumann.dev/uploads/images/gallery/2020-04/IMG_20200222_102700.jpg)

I am using the following hardware for this setup

* 1 DrayTek Vigor 165 as VDSL2 Modem (250/40 Connection)
* 1 apu3c4 (black) as OPNsense router (VLAN WIFI LAN)
* 1 apu3c4 (red) as docker host (LAN) with a 1TB SATA SSD inside
* 1 Cisco SG 200-8

# DrayTec Vigor 165

I did configure the DrayTec Vigor 165 as a Modem with t-online.

I use the following settings

[![General Setup](https://naumann.dev/uploads/images/gallery/2020-04/scaled-1680-/General_Setup.png)](https://naumann.dev/uploads/images/gallery/2020-04/General_Setup.png)
[![PPPoE](https://naumann.dev/uploads/images/gallery/2020-04/scaled-1680-/PPPoE.png)](https://naumann.dev/uploads/images/gallery/2020-04/PPPoE.png)
[![MPoA](https://naumann.dev/uploads/images/gallery/2020-04/scaled-1680-/MPoA.png)](https://naumann.dev/uploads/images/gallery/2020-04/MPoA.png)
[![MultiPVC](https://naumann.dev/uploads/images/gallery/2020-04/scaled-1680-/MultiPVC.png)](https://naumann.dev/uploads/images/gallery/2020-04/MultiPVC.png)
[![LAN](https://naumann.dev/uploads/images/gallery/2020-04/scaled-1680-/LAN-General.png)](https://naumann.dev/uploads/images/gallery/2020-04/LAN-General.png)

# docker

To be able to reach the DrayTec Vigor 165 admin page from other vlans I added a route to traefik.

This is my `/etc/environment` file

```bash
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
PUID=1001
PGID=1001
TZ="Europe/Zurich"
DOMAINNAME="apu07.home"
DNS=10.51.0.254
```

This is my `docker-compose.yml` file

```bash
version: '3.7'
  
services:
  traefik:
    container_name: traefik
    domainname: ${DOMAINNAME}
    image: traefik
    restart: unless-stopped
    command:
      - --api.insecure=true
      - --providers.docker
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --providers.file.directory=/rules
      - --providers.file.watch=true
      #- --providers.docker.defaultRule="Host(`${DOMAINNAME}`)"
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./traefik/rules:/rules
    networks:
      - default
      - discovery
    dns:
      - ${DNS}

networks:
  discovery:
```
And I have traefik rules in a `traefik/rules/vigor.toml` file for the DrayTec Vigor 165
```bash
[http.routers]
  [http.routers.vigor-rtr]
      entryPoints = ["web"]
      rule = "Host(`vigor.apu07.home`)"
      service = "vigor-svc"

[http.services]
  [http.services.vigor-svc]
    [http.services.vigor-svc.loadBalancer]
      passHostHeader = true
      [[http.services.vigor-svc.loadBalancer.servers]]
        url = "http://10.51.0.1:80" 
```