I need to configure port forwarding for my IP camera so that I can access it from internet. UPNP
is not supported on my gateway.
My network configuration is the following:
Gateway (Ubuntu Server 12) --- Internal network
7.8.9.10 --- 192.168.2.1 --- 192.168.2.0/24
eth1 eth0
From my camera settings:
Gateway HTTP/RTSP port forwarding: enabled
I need to configure NAT
for the RTSP
connections (default port 554
) and camera web panel (port 80
):
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 554 -j DNAT --to 192.168.254.189:554
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 8000 -j DNAT --to 192.168.254.189:80
iptables -A FORWARD -p tcp -d 192.168.254.189 --dport 554 -j ACCEPT
iptables -A FORWARD -p tcp -d 192.168.254.189 --dport 80 -j ACCEPT
The problem is I can't conect neither to 7.8.9.10:554
nor to 7.8.9.10.8000
from an outside computer.
I tried googling but haven't found anything. There are lots of tutorials how to configure SIP+RTP
with NAT but not just RTSP. I don't use SIP.
How to make the port forwarding working? I would appreciate any help.