1

My setup looks like that:

 --------------------------------      ---------------------------------
|Digital Ocean droplet          |      |TC7200 router                  |
|Running OpenVPN server         | <--> |                               |
|                               |      |LAN: 192.168.0.1               |
|OpenVPN IP: 10.8.0.1           |      |WAN: 78.11.146.13              |
 --------------------------------      ---------------------------------

                                                    ^
                                                    |
                                                    V
                                        -------------------------------
                                        | RaspberryPi+OpenVPN client  | 
                                        | LAN: 192.168.0.28           |
                                        | tun0: 10.8.0.6              |
                                        -------------------------------
                                                    ^
                                                    |
                                                    V
                                        -------------------------------
                                        | Android phone with IP Webcam| 
                                        | LAN: 192.168.0.39           |
                                        -------------------------------

What I want to achieve is to access from openvpn server (10.8.0.1) to IP WebCam (192.168.0.39).

server.conf

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir ccd
route 192.168.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 67.207.67.2"
push "dhcp-option DNS 67.207.67.3"
client-to-client
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1

ccd/client

iroute 192.168.0.0 255.255.255.0
push route "192.168.0.0 255.255.255.0"

route:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         159.89.16.1     0.0.0.0         UG    0      0        0 eth0
10.8.0.0        10.8.0.2        255.255.255.0   UG    0      0        0 tun0
10.8.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
159.89.16.0     0.0.0.0         255.255.240.0   U     0      0        0 eth0
192.168.0.0     10.8.0.2        255.255.255.0   UG    0      0        0 tun0

With this configuration I'm able to connect from openvpn server to raspbery pi using ssh. I'm able to connect(ssh) or ping from another vpn client to raspberry pi. But I don't know how to configure openvpn server to get access to raspberry pi LAN devices. Maybe I should forward some ports on my home router?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.