Score:0

L2TP VPN. Port Forwarding. Iptables

kr flag

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!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.