read TCPv4_SERVER []: No route to host (fd=56,code=113)

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
gusto
OpenVpn Newbie
Posts: 6
Joined: Wed Jan 27, 2021 8:56 am

read TCPv4_SERVER []: No route to host (fd=56,code=113)

Post by gusto » Tue Mar 12, 2024 7:53 am

server.conf (OpenVPN 2.6.3)

Code: Select all

port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key  
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir ccd
topology subnet
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
tls-version-min 1.0
user nobody
group nogroup
persist-key
persist-tun
log-append /var/log/openvpn.log
status openvpn-status.log
verb 3
client-to-client 
client.conf (OpenVPN 2.5.9)

Code: Select all

dev tun
client
proto tcp
remote example.com 1194
ca ca.crt
cert client.crt
key client.key
port 1194
persist-key
persist-tun
dhcp-option DNS 8.8.8.8
I often find this line in the log

Code: Select all

2024-03-12 08:24:05 client04/192.168.1.2:45102 read TCPv4_SERVER []: No route to host (fd=56,code=113)
The VPN network is working fine. I am interested in what this entry in the log means.

paulchery21
OpenVpn Newbie
Posts: 12
Joined: Wed Jan 19, 2022 12:48 pm

Re: read TCPv4_SERVER []: No route to host (fd=56,code=113)

Post by paulchery21 » Mon Jul 01, 2024 10:08 pm

Let's take a look at the source code:


https://fossies.org/dox/openvpn-2.6.11/ ... tml#l00696

```
msg(x_cs_info_level, "%s %s [%s]: %s (fd=" SOCKET_PRINTF ",code=%d)", description,
sock ? proto2ascii(sock->info.proto, sock->info.af, true) : "",
extended_msg, openvpn_strerror(my_errno, crt_error, &gc),
sock ? sock->sd : -1, my_errno);
```

You can see that the socket your client is trying to reach, does not exist or it's unreachable.
I think that's why sometimes you see this line.

Post Reply