Welcome! Log In Create A New Profile

Advanced

Trouble to reach IP-Cam from Internet

Posted by franze_m 
Trouble to reach IP-Cam from Internet
May 20, 2017 10:50AM
Hello,
i have a IP-Cam in my private network and i can reach the IP-Cam when i am in the local network. But from the Internet the IP-Cam is not working.

My config is:
server {
rewrite_log on;
access_log off;
#access_log /var/log/net-error_log;
error_log /var/log/net-error_log debug;
listen 80;
server_name test.privatedns.org;
root /var/www/http/test.privatedns.org/;
location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location /wansview {
access_log /var/log/wansview-access_log;
error_log /var/log/wansview-error_log warn;
rewrite ^/wansview(.*) http://192.168.1.45/$1 permanent;
#return 301 http://192.168.1.45/$1;
#proxy_pass http://192.168.1.45/$1;
#proxy_http_version 1.1;
#proxy_pass_request_headers on;
#proxy_pass http://192.168.1.45:80;
#proxy_pass http://192.168.1.45:80/url$request_uri; #80 is your first port
#proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
#proxy_redirect http://192.168.1.45:80; http://192.168.1.45:80/mjpeg/snap.cgi?chn=1;
#proxy_redirect http://192.168.1.45:80/ $scheme://$host:$server_port/
#proxy_redirect default;
#more_set_input_headers 'Authorization: $http_authorization';
#proxy_set_header ns_server-ui yes;
#proxy_set_header Accept-Encoding "";
#proxy_set_header Connection "";
#proxy_pass_header Authorization;
proxy_redirect off;
proxy_buffering off;
#proxy_set_header Host $host;
#proxy_set_header Request_Uri_X $request_uri;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-for $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#port_in_redirect off;
#proxy_set_header HOST $http_host;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-NginX-Proxy true;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
#proxy_redirect off;
#proxy_set_header Host $host:$server_port;
#proxy_read_timeout 86400;
#proxy_buffering off;
#auth_basic "Restricted";
#auth_basic_user_file /var/www/http/test.privatedns.org/.htpasswd;
#proxy_intercept_errors on;
}

You see, i have tried many versions from Internet, but the rewrite rule is the only that works local, but not from the Internet.

The link i use from Internet to see the Picture from my IP-Cam is http://test.privatedns.org/wansview/mjpeg/snap.cgi?chn=1

What is wrong ?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 318
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready