This is my docker-compose:
`vpn:
container_name: vpn
image: dperson/openvpn-client:latest
restart: always
sysctls:
net.ipv6.conf.all.disable_ipv6=1
devices:
"/dev/net/tun:/dev/net/tun"
cap_add:
net_admin
security_opt:
label:disable
environment:
- DNS=1.1.1.1
TZ=Europe/Warsaw
FIREWALL=''
VPN_AUTH='someemail@gmail.com;somepass'
volumes:
/opt/vpn:/vpn
networks:
filmozer_docker:
ipv4_address: 172.19.0.13
This is my vpn.conf: client
dev tun
proto udp
remote otp-c04.ipvanish.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
persist-remote-ip
ca /vpn/ca.ipvanish.com.crt
verify-x509-name otp-c04.ipvanish.com name
comp-lzo
verb 3
auth SHA256
cipher AES-256-CBC
keysize 256
tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA
auth-user-pass
`
But I am unable to connect. This is what I see in the logs:
WARNING: ip6tables disabled! Run 'sudo modprobe ip6table_filter' on your host modprobe: can't change directory to '/lib/modules': No such file or directory modprobe: can't change directory to '/lib/modules': No such file or directory ip6tables v1.8.4 (legacy): can't initialize ip6tables tablenat': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: can't change directory to '/lib/modules': No such file or directory
modprobe: can't change directory to '/lib/modules': No such file or directory
ip6tables v1.8.4 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
Dump terminated
exec sg vpn -c 'openvpn --cd /vpn --config /vpn/vpn.conf --script-security 2 --redirect-gateway def1 --route-up '\''/bin/sh -c " iptables -A OUTPUT -d 127.0.0.11 -j ACCEPT"'\'' --route-pre-down '\''/bin/sh -c " iptables -D OUTPUT -d 127.0.0.11 -j ACCEPT"'\'' --auth-user-pass /vpn/vpn.auth '
Wed Dec 29 01:21:31 2021 WARNING: --keysize is DEPRECATED and will be removed in OpenVPN 2.6
Wed Dec 29 01:21:31 2021 WARNING: file '/vpn/vpn.auth' is group or others accessible
Wed Dec 29 01:21:31 2021 OpenVPN 2.4.9 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Apr 20 2020
Wed Dec 29 01:21:31 2021 library versions: OpenSSL 1.1.1g 21 Apr 2020, LZO 2.10
Wed Dec 29 01:21:31 2021 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Wed Dec 29 01:21:31 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]176.67.84.3:443
Wed Dec 29 01:21:31 2021 Socket Buffers: R=[212992->212992] S=[212992->212992]
Wed Dec 29 01:21:31 2021 UDP link local: (not bound)
Wed Dec 29 01:21:31 2021 UDP link remote: [AF_INET]176.67.84.3:443
`
This is my docker-compose: `vpn: container_name: vpn image: dperson/openvpn-client:latest restart: always sysctls:
- DNS=1.1.1.1
This is my vpn.conf:
client dev tun proto udp remote otp-c04.ipvanish.com 443 resolv-retry infinite nobind persist-key persist-tun persist-remote-ip ca /vpn/ca.ipvanish.com.crt verify-x509-name otp-c04.ipvanish.com name comp-lzo verb 3 auth SHA256 cipher AES-256-CBC keysize 256 tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA auth-user-pass `But I am unable to connect. This is what I see in the logs:
WARNING: ip6tables disabled! Run 'sudo modprobe ip6table_filter' on your host modprobe: can't change directory to '/lib/modules': No such file or directory modprobe: can't change directory to '/lib/modules': No such file or directory ip6tables v1.8.4 (legacy): can't initialize ip6tables table
nat': Table does not exist (do you need to insmod?) Perhaps ip6tables or your kernel needs to be upgraded. modprobe: can't change directory to '/lib/modules': No such file or directory modprobe: can't change directory to '/lib/modules': No such file or directory ip6tables v1.8.4 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?) Perhaps ip6tables or your kernel needs to be upgraded. Dump terminatedand no luck