There is a need to combine home and country subnets.

The home network (192.168.0.0) has a static ip and at the entrance is an Asus ac86u router, on which an openvpn server is enabled with default settings. The country network (192.168.7.0) works under tp-link 3020 with installed OpenWRT and OpenVPN.

The VPN client (192.168.7.1) successfully connects to the server (192.168.0.1) and receives the ip-address 10.8.0.6 (10.8.0.5 ip from the other end of the tunnel). The VPN client sees the server by its local address (192.168.0.1), as well as other computers behind the VPN server — that's great.

The problem is that the VPN server does not see the VPN client by its local address (192.168.7.1), as well as other computers in the client’s subnet.

The list of routs on a router with a VPN server looks correct:

10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun21 95.105.128.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 192.168.7.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun21 10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun21 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 95.105.128.0 0.0.0.0 255.255.224.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 95.105.128.1 0.0.0.0 UG 0 0 0 eth0 

Here is a piece of ifconfig:

 tun21 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.1 PtP:10.8.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP PROMISC MULTICAST MTU:1500 Metric:1 RX packets:318 errors:0 dropped:0 overruns:0 frame:0 TX packets:241 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:26172 (25.5 KiB) TX bytes:36037 (35.1 KiB) 

This is a list of routes on a router with a VPN client:

 0.0.0.0 192.168.8.1 0.0.0.0 UG 0 0 0 eth1 10.8.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0 10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 192.168.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0 192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan 192.168.8.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.8.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth1 

and a piece of ifconfig:

 tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.6 PtP:10.8.0.5 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 

What could be the problem? What needs to be done so that the router with the VPN server can see the subnet on the side of the VPN client?

  • What are the addresses 10.8.0.9 and 10.8.0.2 ? Is ip forwarding on client enabled? - gecube
  • We will not pay attention to the fact that the routing tables have completely different addresses. Not 10.8.0.6 or 10.8.0.5, but 10.8.0.2 and 10.8.0.9. Maybe for point-to-point is a simple formality, so that everything is the same, but maybe not. And it would not hurt to check the settings of the firewall. community.openvpn.net/openvpn/wiki/Openvpn23ManPage#lbBG - Sergey
  • I apologize for the inaccuracy. The client receives a dynamic ip, and the data that I cited in the routing tables is from another session. In client routing, lines 2-4 should be 10.8.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0 10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 192.168.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0 Ie the client receives ip 10.8.0.6 and 10.8.0.5 (the other end of the tunnel) And on the server 10.8.0.1 and 10.8.0.2 (entry and exit from the tunnel) - pr0head
  • And a minor clarification - these routings, both on the server and on the client, are added by the VPN machine. He did not prescribe anything with his hands. - pr0head

0