binhex / arch-privoxyvpn

Docker build script for Arch Linux base with Privoxy and OpenVPN
GNU General Public License v3.0
102 stars 24 forks source link

I've changed VPN Provider and when I swap the ovpn/credentials.conf to the new provider the docker won't start #24

Closed twizzlebizzle closed 1 year ago

twizzlebizzle commented 1 year ago

Using unraid, worked great before.

All I did was stop the docker container, replace the OVPN file and the credentials file and updated them to the same in the container setup page.

It won't start and this is the log I get:

2022-08-22 11:23:37.494774 [info] Host is running unRAID
2022-08-22 11:23:37.515396 [info] System information Linux 928ce49a9d4c 5.15.46-Unraid #1 SMP Fri Jun 10 11:08:41 PDT 2022 x86_64 GNU/Linux
2022-08-22 11:23:37.543966 [info] OS_ARCH defined as 'x86-64'
2022-08-22 11:23:37.569265 [info] PUID defined as '99'
2022-08-22 11:23:37.614146 [info] PGID defined as '100'
2022-08-22 11:23:37.673030 [info] UMASK defined as '000'
2022-08-22 11:23:37.695207 [info] Permissions already set for '/config'
2022-08-22 11:23:37.729177 [info] Deleting files in /tmp (non recursive)...
2022-08-22 11:23:37.757644 [info] VPN_ENABLED defined as 'yes'
2022-08-22 11:23:37.780773 [info] VPN_CLIENT defined as 'openvpn'
2022-08-22 11:23:37.802943 [info] VPN_PROV defined as 'custom'
2022-08-22 11:23:37.835100 [info] OpenVPN config file (ovpn extension) is located at /config/openvpn/gw1.ams4.slickvpn.com.ovpn
2022-08-22 11:23:37.869798 [crit] VPN configuration file /config/openvpn/gw1.ams4.slickvpn.com.ovpn does not contain 'remote' line, showing contents of file before exit...

The VPN config file definitely has a "remote" line that's not commented out?

Here's the inside of the OVPN file:


    # host/port of vpn server
    remote gw1.ams4.slickvpn.com 443 udp

    # file containing username and password
    #auth-user-pass openvpn.userpass
    # ... prompt for authentication
    auth-user-pass

    # equivalent to pull, tls-client
    client

    # redirect all outgoing traffic to the vpn gateway
    redirect-gateway

    # verify the server certificate for authenticity
    remote-cert-tls server

    #cipher
    cipher AES-256-CBC

    proto udp
    dev tun
    nobind

    <ca>
    -----BEGIN CERTIFIC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UEAxMDVlBOMQww
    CgYDVQQpEwNWUE4xEjAQBgkqhkiG9w0BCQEWA1ZQToIJAKHK5bbBPSU2MAwGA1Ud
    EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAGuKFW765F3D5wax5IFSQbEtr+rV
    HgjR8jiYTzxOCmbLaU4oj6phOhfQJiTTADQYgCIC/DN0HsAEEqrKkwEn8KdAoNiA
    WfqCV/eqnK83y7yRDGx6/zfsch+PAzKZouMJLrvR9RYbHq7m3adZv84YLge7FE1J
    qFk1j6rSa4dUUnGQPrQgr9Sasnz8O8KK45XH6fqKrsd4p485n+BXPDzWVsHl4M5d
    qQV7qUZTazbzzh4NyP5/RQ6Oh5jqMN7po4qiqWv1pu0EKDxUG6gcECc2cTQwHhIO
    PeCGdHS7uuI2FlLnHaCUFBgi8zTsZxaeaPuPch5M7Zxbdg0GBhS2SmNi+io=
    -----END CERTIFICATE-----
    </ca>
binhex commented 1 year ago

are you sure the contents of gw1.ams4.slickvpn.com.ovpn is what you pasted?, if there are multiple ovpn files in that folder it will pick up the first one (lexicographically), check if that file contains a remote line

twizzlebizzle commented 1 year ago

are you sure the contents of gw1.ams4.slickvpn.com.ovpn is what you pasted?, if there are multiple ovpn files in that folder it will pick up the first one (lexicographically), check if that file contains a remote line

Figured it out this morning after pulling my hair out! The ovpn file they provided had 4 spaces or a tab at the beginning of each line and i'm assuming the docker container doesn't understand that.

I started every line at the beginning and it worked.

binhex commented 1 year ago

ahh right!, yes i have a very tight regex for remote so that it only picks up <start of line>remote and not partial matches.