I have the following setup:
1.) IP camera -> local IP -> Router -> port forward to my public static IP -> Nginx with rtmp module -> IP camera is streaming online perfectly fine.
Now when I change it to the following:
2.) IP camera -> local IP -> Router -> L2TP [VPN] connected right inside the router settings -> port forward to my public static IP -> Nginx with rtmp module -> IP camera is not showing up. It has internet access and works but it just doesn't see my IP cam.
What am I missing here?
I tried iptables with prerouting like this:
iptables -t nat -A PREROUTING -d <vpn-ip> -p tcp --dport 80 -j DNAT --to-destination <camera-ip>:80
iptables -A FORWARD -m conntrack --ctstate DNAT -j ACCEPT
but it still doesn't work. I am not sure if I am even on the right track here.
I think the router creates a different tunnel / network via L2TP and therefore my camera becomes invisible to it, because all the next steps after it such as port forwarding on the router and Nginx access (as per route #2 above) are elsewhere now. Am I wrong? Is there a way to make it work as per my second route? Would be really grateful for any help / advice / comments at all. Many thanks in advance!
0 Answers