Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProtonVPN #7

Open
AndiLavera opened this issue May 13, 2020 · 7 comments
Open

ProtonVPN #7

AndiLavera opened this issue May 13, 2020 · 7 comments

Comments

@AndiLavera
Copy link

AndiLavera commented May 13, 2020

Hello, I am new to kubernetes so this might be a common issue but i figured this was the best place to try.

There seems to be an error with ProtonVPN. I can't tell if it's your chart, the actual docker image or my configuration.

Create a secret:

kubectl create secret generic openvpn \
    --from-literal username=<VPN_USERNAME> \
    --from-literal password=<VPN_PASSWORD> \
    --namespace media

Create a configmap:

kubectl create configmap openvpn-common-config --from-file my_proton_vpn_file.ovpn --namespace media

Apply the install your transmission chart with:

helm install transmission bananaspliff/transmission-openvpn \
    --values media.transmission-openvpn.values.yml \
    --namespace media

Here is what my config looks like:

replicaCount: 1

image:
  repository: "haugene/transmission-openvpn"
  tag: "latest-armhf" # Suffixed by -armhf to pull the ARM image
  pullPolicy: "IfNotPresent"
  
dnsPolicy: "None"

dnsConfig:
  nameservers:
    - 8.8.8.8
    - 8.8.4.4

env:
  - name: OPENVPN_PROVIDER
    value: "PROTONVPN" # VPN provider. List of supported providers: https://haugene.github.io/docker-transmission-openvpn/supported-providers/
  - name: OPENVPN_USERNAME
    valueFrom: # Reference to the secret | openvpn.username
      secretKeyRef:
        name: "openvpn"
        key: "username"
  - name: OPENVPN_PASSWORD
    valueFrom: # Reference to the secret | openvpn.password
      secretKeyRef:
        name: "openvpn"
        key: "password"
  - name: LOCAL_NETWORK
    value: "192.168.0.1"
  - name: TRANSMISSION_PEER_PORT
    value: "47444"
  - name: TRANSMISSION_DOWNLOAD_DIR
    value: "/downloads/transmission"
  - name: PUID
    value: "1000"
  - name: PGID
    value: "1000"

service:
  type: ClusterIP
  port: 80

volumes:
  - name: "media-ssd"
    persistentVolumeClaim:
      claimName: "media-ssd" # PersistentVolumeClaim created earlier
  - name: dev-tun
    hostPath:
      path: "/dev/net/tun"
  - name: config
    configMap:
      name: "openvpn-common-config"
      

volumeMounts:
  - name: "media-ssd"
    mountPath: "/data"
    subPath: "configs/transmission-data" # Path /mnt/ssd/media/configs/transmission-data where transmission writes the configuration
  - name: "media-ssd"
    mountPath: "/downloads/transmission"
    subPath: "downloads/transmission" # Path /mnt/ssd/media/downloads/transmission where transmission downloads Torrents
  - name: dev-tun
    mountPath: "/dev/net/tun"
  - name: config
    mountPath: /etc/openvpn/protonvpn/default.ovpn

securityContext:
  capabilities: # Needed for VPN
    add:
      - NET_ADMIN

The error:

Using OpenVPN provider: PROTONVPN
No VPN configuration provided. Using default.
Setting OPENVPN credentials...
adding route to local network 192.168.0.1 via 10.42.1.1 dev eth0
RTNETLINK answers: File exists
Wed May 13 18:20:54 2020 disabling NCP mode (--ncp-disable) because not in P2MP client or server mode
Options error: You must define TUN/TAP device (--dev)
Use --help for more information.

Note: I do not receive this error when doing sudo openvpn my_proton_vpn_file.ovpn on my local machine.

@radum
Copy link

radum commented May 24, 2020

I think your network value should be like this:

- name: LOCAL_NETWORK
    value: "192.168.0.0/24"

@sample-usr
Copy link

@andrewc910 Did you ever figure out what was the issue?

@radum
Copy link

radum commented Aug 16, 2020

@razagill I a pretty sure the error was due to miss configuration of the local network IP value.

@AndiLavera
Copy link
Author

I tried the value you provided. It didnt end up working. I ended up switching to nordvpn and that just worked.

However, i just moved and i need to resetup my server. I can give another tey to proton if youd like. I still have the config file.

@sample-usr
Copy link

sample-usr commented Aug 17, 2020

@andrewc910 Sure, I also tried it with 2 different providers (expressvpn and premiumize) and both give the same error. I even tried the CREATE_TUN_DEVICE environment variable from the underlying docker image itself here but still the same error.

replicaCount: 1

image:
  repository: "haugene/transmission-openvpn"
  tag: "latest"
  pullPolicy: "IfNotPresent"

dnsPolicy: "None"

dnsConfig:
  nameservers:
    - 8.8.8.8
    - 8.8.4.4

env:
  - name: OPENVPN_PROVIDER
    value: "CUSTOM" # VPN provider. List of supported providers: https://haugene.github.io/docker-transmission-openvpn/supported-providers/
  - name: OPENVPN_USERNAME
    valueFrom: # Reference to the secret | openvpn.username
      secretKeyRef:
        name: "openvpn"
        key: "username"
  - name: OPENVPN_PASSWORD
    valueFrom: # Reference to the secret | openvpn.password
      secretKeyRef:
        name: "openvpn"
        key: "password"
  - name: LOCAL_NETWORK
    value: "192.168.0.0/24"
  - name: TRANSMISSION_PEER_PORT
    value: "47444"
  - name: TRANSMISSION_DOWNLOAD_DIR
    value: "/downloads/transmission"
  - name: PUID
    value: "1000"
  - name: PGID
    value: "1000"

service:
  type: ClusterIP
  port: 80

volumes:
  - name: "media-ssd"
    persistentVolumeClaim:
      claimName: "media-ssd"
  - name: dev-tun
    hostPath:
      path: "/dev/net/tun"
  - name: config
    configMap:
      name: "openvpn-common-config"

volumeMounts:
  - name: "media-ssd"
    mountPath: "/data"
    subPath: "configs/transmission-data" # Path /mnt/ssd/media/configs/transmission-data where transmission writes the configuration
  - name: "media-ssd"
    mountPath: "/downloads/transmission"
    subPath: "downloads/transmission" # Path /mnt/ssd/media/downloads/transmission where transmission downloads Torrents
  - name: dev-tun
    mountPath: "/dev/net/tun"
  - name: config
    mountPath: "/etc/openvpn/custom/default.ovpn"

securityContext:
  #privileged: true
  capabilities: # Needed for VPN
    add:
      - NET_ADMIN 

@11jwolfe2
Copy link

11jwolfe2 commented Sep 25, 2020

You guys need to add more env variables see this here. Also you can see a good set up here It uses NORDVPN in the transmission part.

Edits were for links

@ianhundere
Copy link

i got it working with the following values:


image:
  repository: "haugene/transmission-openvpn"
  tag: "latest"
  pullPolicy: "IfNotPresent"

env:
  - name: OPENVPN_PROVIDER
    value: "PROTONVPN"
  - name: OPENVPN_USERNAME
    valueFrom:
      secretKeyRef:
        name: "openvpn"
        key: "username"
  - name: OPENVPN_PASSWORD
    valueFrom:
      secretKeyRef:
        name: "openvpn"
        key: "password"
  - name: OPENVPN_CONFIG 
    value: "ch-05.protonvpn.com.udp,ch-08.protonvpn.com.udp,nl-04.protonvpn.com.udp,nl-11.protonvpn.com.udp"
  - name: LOCAL_NETWORK
    value: "192.168.3.0/24"
  - name: TRANSMISSION_PEER_PORT
    value: "47444"
  - name: TRANSMISSION_DOWNLOAD_DIR
    value: "/downloads/transmission"
  - name: PUID
    value: "1000"
  - name: PGID
    value: "1000"

service:
  type: ClusterIP
  port: 80

volumes:
  - name: "media-ssd"
    persistentVolumeClaim:
      claimName: "media-ssd"
  - name: "dev-tun"
    hostPath:
      path: "/dev/net/tun"

volumeMounts:
  - name: "media-ssd"
    mountPath: "/data"
    subPath: "configs/transmission-data"
  - name: "media-ssd"
    mountPath: "/downloads/transmission"
    subPath: "downloads/transmission"
  - name: "dev-tun"
    mountPath: "/dev/net/tun"

securityContext:
  capabilities:
    add:
      - NET_ADMIN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants