E
E
Eldalex2020-10-12 18:32:17
openvpn
Eldalex, 2020-10-12 18:32:17

How to set up a network behind an OpenVPN client?

The point is the following.
There is an external openvpn server. At home there is a keenetic router which is a client. the goal is to have access to the home network (192.168.2.0/24) behind keenetic.

server config
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key  # This file should be kept secret
dh dh.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
push "route 10.8.0.0 255.255.255.0"
client-config-dir /etc/openvpn/ccd
route 192.168.2.0 255.255.255.0
keepalive 10 120
tls-auth ta.key 0 # This file is secret
cipher AES-256-CBC
auth SHA256
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
verb 3

contents of /etc/openvpn/ccd/kennetic
iroute 192.168.2.0 255.255.255.0

There is a connection, but pings and traffic do not go :(
server ip route
default via 95.181.157.1 dev ens3 onlink
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
95.181.157.0/24 dev ens3 proto kernel scope link src 95.181.157.xx
192.168.2.0/24 via 10.8.0.2 dev tun0

routes on the router after connection
Действующие маршруты IPv4
0.0.0.0/0		192.168.1.1 	Провайдер
10.1.30.0/24		0.0.0.0		Гостевая сеть
10.8.0.0/24 		10.8.0.22	Home Net
10.8.0.1/32		10.8.0.22	Home Net
10.8.0.21/32		10.8.0.22	Home Net
95.181.157.xx/32	192.168.1.1	Провайдер
192.168.1.0/24		0.0.0.0		Провайдер
192.168.2.0/24		0.0.0.0		Домашняя сеть

did as described in the original config, but I do not see the network.
tracing from the mobile client flies into the unknown, tracing from the server also does not lead anywhere.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Fenrir89, 2020-10-12
@Eldalex

And in order to understand where the traffic flies, you need not ping, but trasert, traseroute

M
Mikhail Miroshnichenko, 2020-10-12
@hetmansoftware

Watch these tutorial videos:
- How to set up an OpenVPN connection between 2 offices (server and client config), Windows network folders: https://youtu.be/fLJWPLSRwdg
- How to create a VPN server on a Windows PC and connect to it from another PC: https ://youtu.be/ZTnkEdggzPg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question