ngoduykhanh / wireguard-ui

Wireguard web interface
MIT License
4.25k stars 524 forks source link

Not able to connect from outside, no response at all #441

Open unclamped opened 1 year ago

unclamped commented 1 year ago

Hey all, after having a kind of messy Wireguard UI install (only a certain profile would handshake and the rest would return no response), I decided to delete my db and do a fresh install. My host OS is DietPi, running on a Raspberry Pi 4. I am forwarding my ports with a cron script that runs upnpc every 20 minutes for 51820 UDP in the case of WireGuard, and it seems to do that just fine judging from my previous connections. The issue is, after logging in for the first time and creating a new user, when scanning the config QR code from my phone and then trying to start the VPN, I just get 0 rx and plenty of tx (from my phone attempting to connect). I doubt it is an issue with my "port forwarding" method, since other services are also being done like this and they work just fine, but at the same time I haven't modified much from the stock config and I don't really know what the issue could be. sudo modprobe wireguard returns no output, which is good since WireGuard is installed. I have already disabled the wg-quick service as well. I'd appreciate any hints or help at trying to debug this issue. My stack looks like this (loaded through Portainer):


 version: "3"

services:
  wireguard-ui:
    image: ngoduykhanh/wireguard-ui:latest
    container_name: wireguard-ui
    cap_add:
      - NET_ADMIN
    # required to show active clients. with this set, you don't need to expose the ui port (5000) anymore
    network_mode: host
    environment:
      - BIND_ADDRESS=0.0.0.0:${WEBPORT}
      - SENDGRID_API_KEY
      - EMAIL_FROM_ADDRESS
      - EMAIL_FROM_NAME
      - SESSION_SECRET
      - WGUI_USERNAME=$(WGUI_USERNAME)
      - WGUI_PASSWORD=${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
      - /etc/wireguard:/etc/wireguard
    restart: unless-stopped
volumes:
  db:```
luciust commented 1 year ago

OK, skip the docer, run "./wireguard-ui" and paste the logs from client. BTW: uPNP should be avoided if possible, but that's probably not the worst choice.

Prepare to run tcpdump on the incomming interface on WG host.

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.