binhex / arch-delugevpn

Docker build script for Arch Linux base with Deluge, Privoxy and OpenVPN
GNU General Public License v3.0
696 stars 112 forks source link

Wireguard: Unable to parse IP address: `' #245

Closed sebastian-ruiz closed 3 years ago

sebastian-ruiz commented 3 years ago

My docker-compose.yml file:

version: '2.4'
services:
    arch-delugevpn:
        image: binhex/arch-delugevpn
        container_name: 'deluge-vpn'
        privileged: true
        cap_add:
            - NET_ADMIN
        ports:
            - '8112:8112'
            - '8118:8118'
            - '58846:58846'
            - '58946:58946'
        volumes:
            - './data:/data'
            - './config:/config'
            - '/etc/localtime:/etc/localtime:ro'
        sysctls:
            - net.ipv4.conf.all.src_valid_mark=1
        environment:
            - VPN_ENABLED=yes
            # - VPN_USER=n/a
            # - VPN_PASS=n/a
            - VPN_PROV=custom
            - VPN_CLIENT=wireguard
            # - VPN_OPTIONS=n/a
            # - STRICT_PORT_FORWARD=yes # only works for PIA users
            - ENABLE_PRIVOXY=yes
            - LAN_NETWORK=192.168.1.0/24 # correct, checked this
            - NAME_SERVERS=1.1.1.1,1.0.0.1
            - DELUGE_DAEMON_LOG_LEVEL=info # <info|warning|error|none|debug|trace|garbage>
            - DELUGE_WEB_LOG_LEVEL=info # <info|warning|error|none|debug|trace|garbage>
            - ADDITIONAL_PORTS=1234
            - DEBUG=true
            - UMASK=000
            - PUID=1000
            - PGID=1000

The logs:

2020-12-31 17:52:54,406 DEBG 'start-script' stdout output:
[info] Attempting to bring WireGuard interface 'up'...
2020-12-31 17:52:54,414 DEBG 'start-script' stderr output:
Warning: `/config/wireguard/wg0.conf' is world accessible
2020-12-31 17:52:54,419 DEBG 'start-script' stderr output:
[#] ip link add wg0 type wireguard
2020-12-31 17:52:54,421 DEBG 'start-script' stderr output:
[#] wg setconf wg0 /dev/fd/63
2020-12-31 17:52:54,422 DEBG 'start-script' stderr output:
Unable to parse IP address: `'
Configuration parsing error
2020-12-31 17:52:54,423 DEBG 'start-script' stderr output:
[#] ip link delete dev wg0
2020-12-31 17:52:54,555 DEBG 'start-script' stdout output:
[warn] WireGuard interface failed to come 'up', exit code is '1'

The VPN server I am using is a Wireguard server, specifically it is PiVPN using wireguard. I copied the wireguard .conf file into config/wireguard.

Thank you for your help and the writing of this project!

ghost commented 3 years ago

i get the same too

JohanPy commented 3 years ago

Me too. _My docker compose file is similar, but I removed the "cap-add=NETADMIN" option as said in the readme

ghost commented 3 years ago

Fixed, u need to remove the ipv6 stuff from the wireguard config

sebastian-ruiz commented 3 years ago

I had a comma at the end of AllowedIPs = 0.0.0.0/0 in my wg0.conf file and removing this comma fixed it for me.

wisetc commented 2 years ago

I had a comma at the end of AllowedIPs = 0.0.0.0/0 in my wg0.conf file and removing this comma fixed it for me.

I have a same issue and applyed the same solution to solve this problem.