Closed duindain closed 3 years ago
I've submitted this issue on the openvpn repo as well since its the vpn container thats not enabling the connection most likely
hopefully someone will know what to do :)
I think I've managed to resolve this
the vpn's dns did not work for me and also the config to allow scripts to run from the old split tunnel was breaking the connection
I changed the docker compose for vpn to
vpn:
container_name: vpn
image: dperson/openvpn-client:latest
cap_add:
- net_admin # required to modify network interfaces
restart: unless-stopped
environment:
- PUID=${VPNPUID} # vpn service user id, defined in .env
- PGID=${VPNPGID} # vpn service group id, defined in .env
- TZ=${TZ} # timezone, defined in .env
volumes:
- ${VPNROOT}:/vpn # OpenVPN configuration
devices:
- /dev/net/tun:/dev/net/tun
security_opt:
- label:disable
ports:
- 9117:9117 # port for jackett web UI to be reachable from local network
- 9091:9091 # port for transmission web UI to be reachable from local network
command: '-f ""'
I used to inject the following for the split tunnelling config into the vpn.conf file
disable-occ
script-security 2
route-noexec
#up and down scripts to be executed when VPN starts or stops
#up /etc/openvpn/iptables.sh
#down /etc/openvpn/update-resolv-conf
I had already commented out the up and down scripts as this docker container does that internally but the three additional lines at the top seem to cause the vpn to work but not be allowed to be used
I can now jump onto the vpn and transmission containers with
docker exec -it vpn bin/bash
curl ipinfo.io
and both show the vpn addressing
I'll try experimenting soon with re-enabling the vpn dns now that those config changes are gone and see if i can restore that
I've tried changing the docker config to -d -f "" to turn on the vpn dns servers and keep the firewall on
Seems to be working ok still
Hopefully I've mis-configured something
I am getting a working VPN connection but i can't seem to use it
I could be testing it incorrectly potentially
This is my config for transmission and openvpn
This is close to stock but with it running under a different account, and enabling firewall and vpn dns
.env variables
the other paths don't really matter for this issue
Anyway I have got the docker-compose working well for
I can view transmission and jacket web UI's fine
I had to create a vpn.conf file I couldn't seem to change that name (My previous non docker install used different file name) the env variable VPN_FILES didn't work unfortunately
My certificate and key are included in the vpn file as well as the link to a credentials file, all this seems to work fine
I've sanitised the Cert hash, key and servername and ip above
This is the VPN container logs
I've sanitised the Nord vpn server IP above but left everything else as is
For testing I am running
This should return the VPN's details not the details I get through my own account It currently times out after a minute with no response
curl: (28) Failed to connect to ipinfo.io port 80: Operation timed out
I've also tried the same through transmissions container and get the same time out
I think the connection is fine but its not being exposed to itself let alone others
I've tried as configured as
I've also tried
both seem to fail the same
I added the timezone as the logs had the incorrect time against them, no difference I've tried it removing the environment section in the docker-compose file for the vpn service, no difference I've tried without -d in the command for using the vpn dns servers, no difference I've tried without -f "" in the command for using the firewall, no difference
Does anyone have any ideas? am i testing it wrong?
I had a split tunnelling connection previously which I believe I've fully removed now multiple reboots renaming all the files, removing the old up and down scripts that the vpn config used to call