OpenVPN / OpenVPN/openvpn

infinity connection

Open
#580 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.6k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
So there is a Windows on which ubuntu 22.04 runs with the help of wsl, on this very ubuntu a server inside the local network should be raised so that then I could connect to the local network from anywhere in the world

installation

  1. "sudo apt install mc nano wget curl"
  2. "wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh"

Immediately and immediately everything does not work, I open the necessary ports on the router and on the PC, again it does not work, it says that the port is busy, I disable the port in all services, it still does not work in the log and there are no errors when connecting, just an eternal connection

Expected behavior connecting to OpenVPN from a client PC and simulating a local network

Configuration

`server.conf local 172.22.182.196
port 1194
proto tcp4
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 172.22.176.1"
push "block-outside-dns"
keepalive 10 120
user nobody
group nogroup
persist-key
persist-tun
verb 3
crl-verify crl.pem
verb 5

server.conf`

`aboba.ovpn client
dev tun
proto tcp
remote 77.37.178.172 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
ignore-unknown-option block-outside-dns
verb 3

vpn.conf`

`root@DESKTOP-DM4V28D:/# systemctl status openvpn@server
● openvpn@server.service - OpenVPN connection to server
Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled-runtime; vendor preset: enabled)
Active: active (running) since Sun 2024-07-28 04:38:41 MSK; 1min 33s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Main PID: 19293 (openvpn)
Status: "Initialization Sequence Completed"
Tasks: 1 (limit: 2013)
Memory: 1.8M
CGroup: /system.slice/system-openvpn.slice/openvpn@server.service
└─19293 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid

Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Listening for incoming TCP connection on [AF_INET]172.22.182.196:1194
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: TCPv4_SERVER link local (bound): [AF_INET]172.22.182.196:1194
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: TCPv4_SERVER link remote: [AF_UNSPEC]
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: GID set to nogroup
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: UID set to nobody
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: MULTI: multi_init called, r=256 v=256
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: IFCONFIG POOL IPv4: base=10.8.0.2 size=253
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: IFCONFIG POOL LIST
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: MULTI: TCP INIT maxclients=1024 maxevents=1028
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Initialization Sequence Completed
root@DESKTOP-DM4V28D:/# journalctl -xeu openvpn@server.service
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: ifconfig_ipv6_pool_base = ::
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: ifconfig_ipv6_pool_netbits = 0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: n_bcast_buf = 256
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: tcp_queue_limit = 64
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: real_hash_size = 256
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: virtual_hash_size = 256
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: client_connect_script = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: learn_address_script = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: client_disconnect_script = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: client_config_dir = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: ccd_exclusive = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: tmp_dir = '/tmp'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: push_ifconfig_defined = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: push_ifconfig_local = 0.0.0.0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: push_ifconfig_remote_netmask = 0.0.0.0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: push_ifconfig_ipv6_defined = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: push_ifconfig_ipv6_local = ::/0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: push_ifconfig_ipv6_remote = ::
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: enable_c2c = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: duplicate_cn = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: cf_max = 0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: cf_per = 0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: max_clients = 1024
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: max_routes_per_client = 256
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: auth_user_pass_verify_script = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: auth_user_pass_verify_script_via_file = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: auth_token_generate = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: auth_token_lifetime = 0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: auth_token_secret_file = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: port_share_host = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: port_share_port = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: vlan_tagging = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: vlan_accept = all
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: vlan_pvid = 1
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: client = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: pull = DISABLED
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: auth_user_pass_file = '[UNDEF]'
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: OpenVPN 2.5.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jun 27 2024
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: net_route_v4_best_gw query: dst 0.0.0.0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: net_route_v4_best_gw result: via 172.22.176.1 dev eth0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Diffie-Hellman initialized with 2048 bit key
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: CRL: loaded 1 CRLs from file crl.pem
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: TLS-Auth MTU parms [ L:1623 D:1154 EF:96 EB:0 ET:0 EL:3 ]
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: TUN/TAP device tun0 opened
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: do_ifconfig, ipv4=1, ipv6=0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: net_iface_mtu_set: mtu 1500 for tun0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: net_iface_up: set tun0 up
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: net_addr_v4_add: 10.8.0.1/24 dev tun0
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Data Channel MTU parms [ L:1623 D:1450 EF:123 EB:406 ET:0 EL:3 AF:14/123 ]
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Socket Buffers: R=[131072->131072] S=[16384->16384]
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Listening for incoming TCP connection on [AF_INET]172.22.182.196:1194
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: TCPv4_SERVER link local (bound): [AF_INET]172.22.182.196:1194
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: TCPv4_SERVER link remote: [AF_UNSPEC]
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: GID set to nogroup
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: UID set to nobody
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: MULTI: multi_init called, r=256 v=256
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: IFCONFIG POOL IPv4: base=10.8.0.2 size=253
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: IFCONFIG POOL LIST
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: MULTI: TCP INIT maxclients=1024 maxevents=1028
Jul 28 04:38:41 DESKTOP-DM4V28D ovpn-server[19293]: Initialization Sequence Completed

journalctl & status`

`try to connect on client pc

Sun Jul 28 05:09:50 2024 Note: --cipher is not set. OpenVPN versions before 2.5 defaulted to BF-CBC as fallback when cipher negotiation failed in this case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers.
Sun Jul 28 05:09:50 2024 OpenVPN 2.6.12 [git:v2.6.12/038a94bae57a446c] Windows [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Jul 18 2024
Sun Jul 28 05:09:50 2024 Windows version 10.0 (Windows 10 or greater), amd64 executable
Sun Jul 28 05:09:50 2024 library versions: OpenSSL 3.3.1 4 Jun 2024, LZO 2.10
Sun Jul 28 05:09:50 2024 DCO version: 1.2.1
Sun Jul 28 05:09:50 2024 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25352
Sun Jul 28 05:09:50 2024 Need hold release from management interface, waiting...
Sun Jul 28 05:09:51 2024 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:62039
Sun Jul 28 05:09:51 2024 MANAGEMENT: CMD 'state on'
Sun Jul 28 05:09:51 2024 MANAGEMENT: CMD 'log on all'
Sun Jul 28 05:09:51 2024 MANAGEMENT: CMD 'echo on all'
Sun Jul 28 05:09:51 2024 MANAGEMENT: CMD 'bytecount 5'
Sun Jul 28 05:09:51 2024 MANAGEMENT: CMD 'state'
Sun Jul 28 05:09:51 2024 MANAGEMENT: CMD 'hold off'
Sun Jul 28 05:09:51 2024 MANAGEMENT: CMD 'hold release'
Sun Jul 28 05:09:51 2024 TCP/UDP: Preserving recently used remote address: [AF_INET]77.37.178.172:1194
Sun Jul 28 05:09:51 2024 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Jul 28 05:09:51 2024 Attempting to establish TCP connection with [AF_INET]77.37.178.172:1194
Sun Jul 28 05:09:51 2024 MANAGEMENT: >STATE:1722132591,TCP_CONNECT,,,,,,
Sun Jul 28 05:11:52 2024 TCP: connect to [AF_INET]77.37.178.172:1194 failed: Unknown error
Sun Jul 28 05:11:52 2024 SIGUSR1[connection failed(soft),connection-failed] received, process restarting
Sun Jul 28 05:11:52 2024 MANAGEMENT: >STATE:1722132712,RECONNECTING,connection-failed,,,,,
Sun Jul 28 05:11:52 2024 Restart pause, 1 second(s)
Sun Jul 28 05:11:53 2024 TCP/UDP: Preserving recently used remote address: [AF_INET]77.37.178.172:1194
Sun Jul 28 05:11:53 2024 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Jul 28 05:11:53 2024 Attempting to establish TCP connection with [AF_INET]77.37.178.172:1194
Sun Jul 28 05:11:53 2024 MANAGEMENT: >STATE:1722132713,TCP_CONNECT,,,,,,
`

**Version information **

  • OS: [ Ubuntu 22.04]
  • OpenVPN version: [2.5.8]

If you need any other information, please write

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported server.conf and aboba.ovpn files, then compare the OpenVPN service status and journalctl output with the Windows client log. Reproduce the TCP connection failure in the stated Ubuntu 22.04 and WSL setup; done requires a clear, project-relevant failure cause or a minimal reproducible case, but no source file or test is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ubuntu
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.