VPN camera via local ip

kmax1940

Young grasshopper
Joined
Sep 27, 2016
Messages
42
Reaction score
3
Hello, hopefully I can explain this in a simple and concise manner.

I have a "streamer" server which runs custom made streaming software.
It takes the RTSP url from cameras and restreams it to HLS

I installed OpenVPN on that streamer server.

Then I connected my PC via VPN client to the OpenVPN server.

I have a good vpn connection between my pc and the streamer server.

I am trying to be able to input the RTSP url in the server... using local IP addresses instead of public addresses.

This part is not working so far... any tips?

From my pc i can ping the VPN tunnel interface.
But I cant ping my local PC VPN client ip from the server.

Any tips on this whole process?
 

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
I might not be understanding you correctly so don't jump on me. But I think your issue might be because your trying to connect to your server over LAN, but really you need to be connecting over local loop back since the VPN server is running on the same server your trying to connect to.
 

kmax1940

Young grasshopper
Joined
Sep 27, 2016
Messages
42
Reaction score
3
Thanks, I will research that idea.

From my pc i can browser to the local tunnel interface ip of the VPN server... and it brings up the default web page of the server... so from my pc i can browse to the server.

Question though.
On my local lan...

My router / modem is a 192.168.0.1

In my camera I set up the tcpip / network like this.

ip = 10.8.0.50
mask = 255.0.0.0
GATEWAY = 10.8.0.1 ( this is actually the local ip of the vpn tunnel on the server)

I wonder if I need a gateway on my local LAN with that same 10. subnet as the vpn server has....
 

kmax1940

Young grasshopper
Joined
Sep 27, 2016
Messages
42
Reaction score
3
Also, I can ping from my client / pc to my vpn server's 10.8 address....
BUT i cant ping from my vpn server down to my client / pc's 10.8 address.
 

streamnvr

n3wb
Joined
Oct 1, 2019
Messages
8
Reaction score
3
Location
New York, NY
You're missing a critical piece which is the ability to forward, or route, traffic from your local machine --> through the tunnel --> VPN LAN side ip address.

The easiest thing to do would be to install a proxy, like HAproxy and just reverse proxy the port(s) from the VPN server --> LAN ip/port(s).

Your other option is to add a static route to your routing table so that your local machine knows that when you're going to <camera ip> to use your tunnel interface.

In your OpenVPN configuration add: push "route 192.168.100.123 255.255.255.0" (changing the ip of course).

Let me know what operating system you're on and I can help you set things up!

Good luck!
 

kmax1940

Young grasshopper
Joined
Sep 27, 2016
Messages
42
Reaction score
3
@streamnvr thank you so much!

right now i am in the testing phase so locally where the camera is i am just using my windows pc with openvpn client installed.

if it all works then instead of a windows pc for the vpn client....

at each client site i am going to have some typeo of linux device... pi, router, etc.
that runs openvpn client.

With my setup right now i have openvpn server running on a vps across the internet
on my local windows pc i have openvpn client installed.

i can ping from my local pc up to the tun interface of the openvpn server
the server's tunnel interface is 10.8.0.1

my local lan network is 192.168.0.1...
but the openvpn client address on my pc is 10.8.0.6

i can ping from my pc to the server...
BUT i cannot ping from the server to my pc...

The camera on my local lan is set to 192.168.0.16

I added this to the config file of my openvpn client on my windows PC

push "route 192.168.0.16 255.255.255.0"

saved and restarted the client... no luck still cant ping the camera from my server.
 

kmax1940

Young grasshopper
Joined
Sep 27, 2016
Messages
42
Reaction score
3
Bump. Anyone know how to configure this VPN so that I can access the cameras on my local network over my server via "local network ip"?

I can ping from the client up to the server... but NOT down from the server to the client.
 
Top