A
A
akass2017-10-21 23:39:09
css
akass, 2017-10-21 23:39:09

Is it possible to proxy RTSP?

And so, there is a VPS with a configured OpenVPN, outside the city there is a network with a gray ip, there is also a raspberry pi with a vpn client and a DVR with cameras.
The goal is to access the video stream via the rtsp:// link.
Forwarded the necessary ports through rinet (through iptables) also tried. But alas, the web face is available, but not the rtsp channel.
Everything works on the local network. As I understand it, the fact is that port 554 for rtsp is used only "indirectly" and problems arise due to NAT.
When everything was through a white address, everything worked as it should, but I had to abandon it.
Can you tell me what are the solutions to this problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RAX7, 2019-07-23
@askyy

F
Fuckingawesomenigga, 2019-07-23
@fuckingawesomenigga

Outer container
position: relative;
Inner:
position: absolute;
height: ...px;
width: ...px;
left: ...px;

W
Wexter, 2017-10-23
@akass

For port forwarding through 2 NATs, you need to do SNAT on VPS and RPi at the same time
On VPS

iptables -t nat -A POSTROUTING -d RPI_VPN_IP -p tcp -m tcp --dport 554 -j SNAT --to-source VPS_VPN_IP

on RPi
iptables -t nat -A POSTROUTING -d REG_LOCAL_IP -p tcp -m tcp --dport 554 -j SNAT --to-source RPI_LOCAL_IP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question