我正在配置我的家庭路由器華碩N18U番茄通過Shibby FW。我想建立一個家庭網絡服務器NGINX。我知道,這並不理想。我唯一的問題是我無法從Wan訪問服務器。此外,我擁有動態IP,我已使用DDNS服務解決了這個問題。它工作正常,如果我想訪問路由器或SFTP的配置頁,或者當我鍵入myddnsdomain,並且我在LAN內。我打開我的調制解調器端口80(從ISP),並添加下面的代碼到路由器(華碩N18U)配置,我不能只是端口轉發它在管理菜單,因爲它只允許轉發到局域網(我的網絡服務器是在「路由器」 )。訪問廣域網路由器上的NGINX
的iptables -A INPUT -p根據tcp --dport 80 -j ACCEPT
iptables的-I INPUT -p根據tcp --dport 80 -j ACCEPT
的iptables -t濾波器-A INPUT - p tcp --dport 80 -j ACCEPT
沒有一個解決了我的問題。我也嘗試了不同的端口。我跟蹤它,看來,路由器阻止它。通過Wan IP訪問我的服務器沒有幫助。文件夾「www」由任何人擁有。感謝您的幫助
# NGinX generated config file
user nobody;
worker_processes 1;
worker_cpu_affinity 0101;
master_process off;
worker_priority 10;
error_log /tmp/var/log/nginx/error.log;
pid /tmp/var/run/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 512;
}
http {
include /tmp/etc/nginx/mime.types;
include /tmp/etc/nginx/fastcgi.conf;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
client_max_body_size 100M;
server {
listen 80;
server_name mydynamicdomain.net;
access_log /tmp/var/log/nginx/access.log main;
location / {
root /tmp/mnt/CORSAIR/www;
index index.html index.htm index.php;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location /50x.html {
root /tmp/mnt/CORSAIR/www;