erikespinoza/v4raider

Adding Non-Docker Hosts

gatesry opened this issue · 4 comments

Hi Erik,

First! - Thank you very much for the guide. Do you have any links to buy you a coffee/beer?

I was able to get everything set up and running smoothly for the Traefik Dashboard/WireGuard services. I'm curious if you have any suggestions on adding external servers to the proxy manager? Looking at your Other Containers section, and don't know if this would work for external non-docker hosts that live outside the DMZ network.

I've added a dynamic .yml file for one service that points to my LAN (e.g. 192.168.1.X) and corrected any errors in the dashboard.

image

app-unifi.yml

http:
  routers:
    unifi-rtr:
      rule: "HostHeader(`unifi.mydomain.com`)" 
      entryPoints:
        - https
      middlewares:
        - middlewares-basic-auth@file
      service: unifi-svc

  services:
    unifi-svc:
      loadBalancer:
        servers:
          - url: "https://192.168.1.3:8443"

middlewares.yml

http:
  middlewares:
    middlewares-basic-auth:
      basicAuth:
         users:
           - "user:$ABCDEFGHIJK/LMNOP"

Dashboard Screenshot

image

With all the above set, I just get a generic browser error in Edge saying it can't reach this domain.

If this is out of scope, please feel free to close.

Thank you

Hey @mazak-ui, I'm glad you found this repo helpful. No need to buy a coffee/beer, the fact that it was used is enough for me.

My guess, you need to do two things.

  1. Remove this line to tell Traefik that it should be able to access any network.
  2. Add a static route that points 192.168.1.0/24 to your ext interface. I had done something a while back that ran PostUp = /data/routes.sh and that file contained some shell that would find my default route and add a route for just my local lan.

It was pretty rudimentary and lazy like:

ip -4 route add 192.168.1.0/24 via $(ip -4 route | grep ^default | awk '{ print $3}')

Let me know if this works out for you.

@erikespinoza - Awesome. I will report back my findings! 👍

@erikespinoza - Could you expand on bullet point 2? I'm having trouble understanding if the static route should go on the VPS or home server?

Number 2 goes in the wireguard container.

First edit your wg0.conf and add a PostUp line under interface that runs /config/localnetwork.sh. Second create a file and mount it into the container called /config/localnetwork.sh, don't forget to chmod +x it. Then run docker-compose up -d.