Giter VIP home page Giter VIP logo

docker-openvpn-client's Introduction

Hi πŸ‘‹, I'm Diego Schmidt

A passionate developer from Brazil

schmas

  • πŸ”­ I’m currently working on @clevertech

  • 🌱 I’m currently learning react, react-testing-library, react-query, react-hook-form, styled-components, kotlin

  • πŸ“« How to reach me [email protected]

Connect with me:

dceschmidt github

Languages and Tools:

bash docker elasticsearch gcp git graphql java javascript jenkins kotlin kubernetes linux mongodb mysql oracle postgresql python rabbitMQ react redis spring typescript vuejs vuetify

schmas

docker-openvpn-client's People

Contributors

schmas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-openvpn-client's Issues

share the VPN connection with multiple containers

Hi,

I am want to share the VPN connection with other containers, I wrote my docker-compose file, which is including two services, one for VPN and the other one for my NZBGet container. However, the connection between both containers is not shared. The containers are in the same network, they have the same configuration but no luck.

`version: '3'
services:
windscribe:
container_name: windscribe
image: dceschmidt/openvpn-client
restart: unless-stopped
privileged: true
stdin_open: true
tty: true
cap_add:
- NET_ADMIN
dns:
- 1.1.1.1
- 1.0.0.1
networks:
nzb:
ipv4_address: 172.17.0.7
ports:
- "1022:22/tcp"
environment:
OPENVPN_PROVIDER: "WINDSCRIBE"
OPENVPN_USERNAME: "scbyd9fz-ywfpa9t"
OPENVPN_PASSWORD: "fxvh62t7u8"
OPENVPN_CONFIG: "United-Kingdom-udp"
OPENVPN_OPTS: "--inactive 3600 --ping 10 --ping-exit 60"
LOCAL_NETWORK: "192.168.1.1/24"
volumes:
- /data/infra/windscribe:/config
- /etc/localtime:/etc/localtime:ro

nzbet:
container_name: nzbget
image: hotio/nzbget:latest
restart: unless-stopped
stdin_open: true
tty: true
depends_on:
- windscribe
links:
- windscribe
networks:
nzb:
ipv4_address: 172.17.0.2
ports:
- "6789:6789/tcp"
environment:
- PUID=0
- PGID=0
- UMASK=022
- VERSION=stable
- BACKUP=yes
- TZ=Europe/London
volumes:
- /data/nzb/nzbget/app:/config
- /nfs/download/nzbget:/media/nzbget
networks:
nzb:
external: true`

How can I route the other container traffic via OpenVPN?

vpntunnel certificates?

I would like to use this with vpntunnel.com. Could someobody add the service? Or ist thee anything I should do to support this?

Wrong PIA crt path

For PIA provider, all certificate path is ca.crt / crl.pem but this is not the right file name (ca.rsa.2048.crt / crl.rsa.2048.pem)
So when you start container :

proxy_1  | Options error: --ca fails with '/etc/openvpn/conf/pia/ca.crt': No such file or directory
proxy_1  | Options error: --crl-verify fails with '/etc/openvpn/conf/pia/crl.pem': No such file or directory

I think we do not execute updateConfig.sh to rename crt file in all ovpn config file

Surfshark as a Provider

I have just come across this. Surfshark seems like one of the most common VPN providers atm, adding this would be greatly appreciated.

How can I connect my computer to this docker openvpn?

So I was wondering how to connect a computer in my LAN to the openvpn client I installed on a Synology docker. I have installed this image on a Synology docker and connected to my NordVPN account. This seems to work but I don’t know how to access the internet through the openvpn client.

Can anyone point me in the right direction?

Does this still work?

I think I am using it right. I have this in my docker-compose:

  openvpn:
    image: dceschmidt/openvpn-client
    restart: always
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    dns:
      - 8.8.8.8
      - 8.8.4.4
    environment:
      - OPENVPN_PROVIDER=PRIVATEVPN
      - OPENVPN_USERNAME=${VPN_USER}
      - OPENVPN_PASSWORD=${VPN_PASSWORD}
      - OPENVPN_CONFIG=/etc/openvpn/conf/privatevpn/los-angeles-usa.ovpn
      - OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
      - LOCAL_NETWORK=172.19.0.0/24
    ports:
      - 8112:8112 # port for deluge

My plan was to use it like this to share the networking with the openvn container:

  deluge:
    image: linuxserver/deluge
    network_mode: service:openvpn

To make sure everything is working, I am starting with openvpn. When it starts, I get no errors, and it seems to be connecting:

docker-compose up openvpn

openvpn_1   | *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
openvpn_1   | No SSH host key available. Generating one...
openvpn_1   | Creating SSH2 RSA key; this may take some time ...
openvpn_1   | 2048 SHA256:3HCX8/ncdktLzemHcoCb6x5UDRKH4PQfyc7gsey65cw root@f9d3cd527bfe (RSA)
openvpn_1   | Creating SSH2 DSA key; this may take some time ...
openvpn_1   | 1024 SHA256:tJbstN226OJfsLzpCTmiWIByXUpg5OqCl5oW/PGWiv0 root@f9d3cd527bfe (DSA)
openvpn_1   | Creating SSH2 ECDSA key; this may take some time ...
openvpn_1   | 256 SHA256:jhuwr69NJuPNc0p1iKETWn8p0RyWsImceWb2YBSpQkY root@f9d3cd527bfe (ECDSA)
openvpn_1   | Creating SSH2 ED25519 key; this may take some time ...
openvpn_1   | 256 SHA256:dt8g3GmyOvyMi2di0eaMce2pUuyyt4cgRpfZCQ7ktqc root@f9d3cd527bfe (ED25519)
openvpn_1   | invoke-rc.d: could not determine current runlevel
openvpn_1   | invoke-rc.d: policy-rc.d denied execution of restart.
openvpn_1   | *** Running /etc/my_init.d/10_syslog-ng.init...
openvpn_1   | Jan 22 20:23:33 f9d3cd527bfe syslog-ng[80]: syslog-ng starting up; version='3.5.6'
openvpn_1   | Jan 22 20:23:34 f9d3cd527bfe syslog-ng[80]: EOF on control channel, closing connection;
openvpn_1   | *** Running /etc/my_init.d/openvpn-setup.sh...
openvpn_1   | Using OpenVPN provider: PRIVATEVPN
openvpn_1   | Supplied config /etc/openvpn/conf/privatevpn/los-angeles-usa.ovpn.ovpn could not be found.
openvpn_1   | Using default OpenVPN gateway for provider privatevpn
openvpn_1   | Setting OPENVPN credentials...
openvpn_1   | adding route to local network 172.19.0.0/24 via 172.19.0.1 dev eth0
openvpn_1   | *** Running /etc/rc.local...
openvpn_1   | *** Booting runit daemon...
openvpn_1   | *** Runit started as PID 96
openvpn_1   | OpenVPN OPTS: --inactive 3600 --ping 10 --ping-exit 60
openvpn_1   | OpenVPN config: /etc/openvpn/conf/privatevpn/default.ovpn
openvpn_1   | Jan 22 20:23:34 f9d3cd527bfe cron[102]: (CRON) INFO (pidfile fd = 3)
openvpn_1   | Jan 22 20:23:34 f9d3cd527bfe cron[102]: (CRON) INFO (Running @reboot jobs)
openvpn_1   | Wed Jan 22 20:23:34 2020 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  9 2019
openvpn_1   | Wed Jan 22 20:23:34 2020 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
openvpn_1   | Wed Jan 22 20:23:34 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
openvpn_1   | Wed Jan 22 20:23:34 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
openvpn_1   | Wed Jan 22 20:23:34 2020 UDPv4 link local: [undef]
openvpn_1   | Wed Jan 22 20:23:34 2020 UDPv4 link remote: [AF_INET]91.240.64.20:21003
openvpn_1   | Wed Jan 22 20:24:34 2020 [UNDEF] Inactivity timeout (--ping-exit), exiting
openvpn_1   | Wed Jan 22 20:24:34 2020 SIGTERM[soft,ping-exit] received, process exiting
openvpn_1   | OpenVPN OPTS: --inactive 3600 --ping 10 --ping-exit 60
openvpn_1   | OpenVPN config: /etc/openvpn/conf/privatevpn/default.ovpn
openvpn_1   | Wed Jan 22 20:24:34 2020 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  9 2019
openvpn_1   | Wed Jan 22 20:24:34 2020 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
openvpn_1   | Wed Jan 22 20:24:34 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
openvpn_1   | Wed Jan 22 20:24:34 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
openvpn_1   | Wed Jan 22 20:24:34 2020 UDPv4 link local: [undef]
openvpn_1   | Wed Jan 22 20:24:34 2020 UDPv4 link remote: [AF_INET]91.240.64.18:21003
openvpn_1   | Wed Jan 22 20:25:34 2020 [UNDEF] Inactivity timeout (--ping-exit), exiting
openvpn_1   | Wed Jan 22 20:25:34 2020 SIGTERM[soft,ping-exit] received, process exiting
openvpn_1   | OpenVPN OPTS: --inactive 3600 --ping 10 --ping-exit 60
openvpn_1   | OpenVPN config: /etc/openvpn/conf/privatevpn/default.ovpn
openvpn_1   | Wed Jan 22 20:25:34 2020 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  9 2019
openvpn_1   | Wed Jan 22 20:25:34 2020 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
openvpn_1   | Wed Jan 22 20:25:34 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
openvpn_1   | Wed Jan 22 20:25:34 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
openvpn_1   | Wed Jan 22 20:25:34 2020 UDPv4 link local: [undef]
openvpn_1   | Wed Jan 22 20:25:34 2020 UDPv4 link remote: [AF_INET]91.240.64.20:21003

When I check my remote connection inside the openvpn docker-container I get my real external IP, not the VPN:

docker-compose exec openvpn curl https://vpncheck.now.sh/

What do I need to do to route all traffic in openvpn through the VPN?

Related to #11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.