Answer the question
In order to leave comments, you need to log in
OpenVPN not working over TCP?
OpenVPN server only works if proto udp
. If proto tcp
, then the error is:
[email protected]:~# sudo service openvpn restart
* Stopping virtual private network daemon [ OK ]
* Starting virtual private network daemon [fail]
[email protected]:~#
. Later I found out that openvpn uses its own version of the tcp protocol and you need to proto tcp
specify proto tcp-server
or instead proto tcp-client
. But this adjustment did not help much. Linux system, Ubuntu distribution, full distribution name: WSL Ubuntu-x64 Bash Windows 10 x64
. My;local a.b.c.d
port 65532
proto tcp-server
;proto udp
dev tap
;dev tun
up "/etc/openvpn/up.sh br0 eth1"
;dev-node MyTap
ca ca.crt
cert TrainzCityVPN.crt
key TrainzCityVPN.key # This file should be kept secret
dh dh4096.pem
;topology subnet
;server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
server-bridge 192.168.2.1 255.255.255.0 192.168.2.100 192.168.2.150
server-bridge
push "route 192.168.1.0 255.255.255.0"
push "route 192.168.0.0 255.255.255.0"
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
;push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client-to-client
;duplicate-cn
keepalive 10 120
tls-auth ta.key 0 # This file is secret
key-direction 0
cipher AES-256-CBC
;compress lz4-v2
;push "compress lz4-v2"
comp-lzo
;max-clients 100
user nobody
group nogroup
persist-key
persist-tun
log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log
verb 3
mute 20
explicit-exit-notify 1
Answer the question
In order to leave comments, you need to log in
At a minimum, you need to see what openvpn writes to the error log: /var/log/openvpn/openvpn.log
According to your description, there is no way to know this.
There is no version of TCP. Set tcp-server on the openvpn server, tcp-client on the client. Although it should work and just tcp in both cases. When I last configured TCP for openvpn, I just specified tcp and everything worked. You can also use tcp4 or tcp6 if you only need to work with a specific version of the protocol. Similarly for udp.
Why are you using the tap interface instead of tun? Are there any reasons? Usually use tun.
proto tcp should suffice as already answered above. It is likely that your firewall only allows connections to the OpenVPN port using the UDP protocol. Make sure first that the port is connected at all. This can be done using telnet, like so:
telnet имя_сервера порт_сервера
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question