Hi, I am rather new to the Linux networking but I need something done and after few days of reading and reading I just came to a dead end.
Anyway I restarted everything so my setup is rather CLEAN and I would like it to be clean as possible. I will add as much information you need.
Anyway my SETUP is like this:
Mikrotik L2tp router client > Debian server
What I done so far?
I made my MT router connect to my l2tp server and everything works as I want.
On my router I forwarded all ports I need, including my "test" port which is port :81 - apache server on my local PC
When I connect my PC to the router the router port forwards the port :81 to 10.1.2.6 and I can open the index page when I try 10.1.2.6:81 remotely on my server or when I do
iptables -t nat -A PREROUTING -p tcp -d 85.xx.xx.xx --dport 199 -j DNAT --to 10.1.2.6:81
When I do 85.xx.xx.xx:199 which is my l2tp WAN IP I open my apache correctly and all seems as it works fine!
Now my issue is with my IP camera which is also connected to my MT router and I did all the port forwards needed. To test it I tryed port forwarding without the VPN (l2tp) and it works fine to the WAN on my router (without VPN), now when I want to port forward the IP cam to the l2tp server (I did that with port :81 and it worked fine) my cam won't answer at all.
Whats so specific with the camera? It seems that it's GUI which is on :900 won't work without :9008, so i forwarded both ports on router but when I try 10.1.2.6:900 NOTHING happens. But when I do 10.1.2.6:81 I get apache from my PC which is connected to the same router. I did all port forwards on router fine (i think) I don't think the problem is on router side, the problem is on server side (I assume).
So why won't it open :900 (CAM GUI)? I am too newbie to answer it myself... I don't even wanna try to bind it to the server WAN address since it won't work "locally", because later I wanna do
iptables -t nat -A PREROUTING -p tcp -d 85.xx.xx.xx --dport 1900 -j DNAT --to 10.1.2.6:900
so I can access my IP CAM remotely.
My question IS! Since the IP CAM depends on 2 ports (900 & 9008) how to make it work on 10.1.2.6? I thought by default it should work... maybe it's my router?
10.1.2.6 - IP that the l2tp service gave to the mikrotik router
While I am at it! Seems like RTSP:// port which is on 554 won't work either... But! when I try it without VPN tunnel it works fine to the WAN of the MT router but when I do all same thing to the l2tp tunnel so to 10.1.2.6 and i try :554 my router shows my something is trying to access :554 but i don't get any content over the VPN server... why?