0

The setup I am trying is as follows:

Device A (PLC, static IP=10.10.10.11) 
        |
        | eth0 connection 
        |
Device B (raspberry B 3,  Jessie) 
          VPN IP. 10.8.0.160
        |
        | OpenVPN (connected via Wi-Fi)  
        |
Device C (laptop, Ubuntu, OpenVPN Server Access)
          VPN IP 10.8.0.1

My Server's ip route

default via 192.168.1.1 dev wlp2s0 proto dhcp metric 600 
10.8.0.0/27 dev as0t0 proto kernel scope link src 10.8.0.1 
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 
10.8.0.32/27 dev as0t1 proto kernel scope link src 10.8.0.33 
10.8.0.64/27 dev as0t2 proto kernel scope link src 10.8.0.65 
10.8.0.96/27 dev as0t3 proto kernel scope link src 10.8.0.97 
10.8.0.128/27 dev as0t4 proto kernel scope link src 10.8.0.129 
10.8.0.160/27 dev as0t5 proto kernel scope link src 10.8.0.161 
10.8.0.192/27 dev as0t6 proto kernel scope link src 10.8.0.193 
10.8.0.224/27 dev as0t7 proto kernel scope link src 10.8.0.225 
169.254.0.0/16 dev tun0 scope link metric 1000 
192.168.1.0/24 dev wlp2s0 proto kernel scope link src 192.168.1.61 metric 600 

I have also enabled routing in Admin web GUI.

With these settings I can ping Server from client and Vice Versa, also can ping PLC from client which is direct connection.

but I cannot ping PLC from server.

but when this is enabled I can't even ping PLC from client even though its a direct connection.

Please help what else needs to be done. Stuck here forever.

Thanks in advance.

Spriya
  • 1
  • I have one query...In the first network with Device A and Device B there is no router in between. The IP's are assigned statically. Is that causing error? Do I need to add router or make R-pi a router?? – Spriya Jun 04 '19 at 07:20

1 Answers1

0

The server needs a route towards 10.10.10.11 via 10.8.0.160.

Something like route 10.10.10.11 255.255.255.255 10.8.0.160 in the openvpn config on the server should do the trick (I'm assuming it's a peer-to-peer connection).

Additionally, IP forwarding needs to be enabled on Device B (echo 1 >/proc/sys/net/ipv4/ip_forward), and Device A needs a route towards 10.8.0.1 via Device B. (If Device B is the default gw of Device A, then this should already be taken care of.)

András Korn
  • 641
  • 5
  • 13