Here is a picture of what I have:
When I first setup I only had one network interface (VLAN10)
Network setup is like this:
HomeAssistant, ESPHome, Mosquitto = on host
Cloudflare = main-stack_dockerlocal
All working well
Then I added a second network interface and created a macvlan bind to the second NIC (VLAN20)
Installed Pihole and Unifi Controller both with static IP = both working well.
Now for my last install: Wireguard + Wireguard UI, all looks good from the log (as far as I think) but when trying to connect I have no access to the network nor Internet from the client (My Android phone).
When I connect, I see one packet being forwarded from port 51821 to port 51820 and looking as the “Connected Peers” on the Wireguard UI I can see the client connected but Received=0b / Transmit=0b.
I’ve been going at this for a while but running out of ideas.
This is my stack:
version: "3"
services:
wireguard:
image: linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
volumes:
- ./config:/config
ports:
- "5000:5000"
- "51820:51820/udp"
networks:
home:
ipv4_address: 172.16.2.3
wireguard-ui:
image: ngoduykhanh/wireguard-ui:latest
container_name: wireguard-ui
depends_on:
- wireguard
cap_add:
- NET_ADMIN
network_mode: service:wireguard
environment:
#- SENDGRID_API_KEY
- EMAIL_FROM_ADDRESS
- EMAIL_FROM_NAME
- SESSION_SECRET
- WGUI_USERNAME=[***]
- WGUI_PASSWORD=[*****]
- WG_CONF_TEMPLATE
- WGUI_MANAGE_START=true
- WGUI_MANAGE_RESTART=true
logging:
driver: json-file
options:
max-size: 50m
volumes:
- ./db:/app/db
- ./config/wg_confs:/etc/wireguard
networks:
home:
external:
name: home
Looking at the Wireguard log I see this:
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 911
User GID: 911
───────────────────────────────────────
Uname info: Linux 84a6b2fbcf1d 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Client mode selected. ****
[custom-init] No custom files found, skipping...
**** Disabling CoreDNS ****
**** Found WG conf /config/wg_confs/wg0.conf, adding to list ****
**** Activating tunnel /config/wg_confs/wg0.conf ****
Warning: `/config/wg_confs/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.252.1.0/24 dev wg0
[#] ip link set mtu 1450 up dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth+ -j MASQUERADE
**** All tunnels are now active ****
[ls.io-init] done.
If I SSH to Debian, I do IP a for the network interface that is linked to macvlan I get this:
3: enxa0cec8d902df: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether a0:ce:c8:**:**:df brd ff:ff:ff:ff:ff:ff
inet 172.16.2.35/24 brd 172.16.2.255 scope global dynamic enxa0cec8d902df
valid_lft 54505sec preferred_lft 54505sec
inet6 fe80::a2ce:c8ff:fed9:2df/64 scope link
valid_lft forever preferred_lft forever
Anything I can do to look deeper?