Bekijk de volledige versie : How to get Photo Album viewable via Internet
kopi_bean
16-03-2007, 02:43
Hi
I have enabled the default photo album and I am able to browse it from LAN using http://192.168.1.1:8081 . However when I tried to assess the photo album from the WAN using http://58.xx.xx.xx address, it is always returning "Internet Explorer cannot display the webpage" error.
I have checked the port forwarding in the router and there is an entry mapping port 80 from WAN to 192.168.1.1 added automatically after I enabled the photo album.
Is there any other steps which I missed to get the photo album working?
kopi_bean
16-03-2007, 06:13
Are there any alternative photo package that can be installed in 700ge?
If the three lines below are all present, then you should be able to view your web content on port WAN port 80:
From 'iptables -n -t nat --list':
DNAT tcp -- 0.0.0.0/0 <your ip> tcp dpt:80 to:192.168.1.1:8081
You said this one was already present...
From 'iptables -n --list':
Chain INPUT
ACCEPT tcp -- 0.0.0.0/0 192.168.1.1 tcp dpt:8081
Chain FORWARD
ACCEPT tcp -- 0.0.0.0/0 192.168.1.1 tcp dpt:8081
- K.C.
kopi_bean
17-03-2007, 16:45
Hi
I have executed the following iptables command and here's the output:
# iptables -n -t nat --list
DNAT tcp -- 0.0.0.0/0 xx.xx.xx.xx tcp dpt:80 to:10.0.1.1:8081
# iptables -n --list
Chain INPUT (policy ACCEPT)
ACCEPT tcp -- 0.0.0.0/0 10.0.1.1 tcp dpt:8081
Chain FORWARD (policy ACCEPT)
There is no entry that reference 10.0.1.1 ip addresss under this section.
There seem to be a missing line in my configuration. How can I configure that missing line into the router? THanks
Try this as root:
iptables -I FORWARD -p tcp --dport 8081 -j ACCEPT
I have a little script tucked into the bottom of my rc.local, outside of the clause that checks to see it it's already been run, that inserts a similar line into my iptables config to enable ssh over the wan. You'll definitely have to tweak it a little bit, but maybe it can help:
#!/opt/bin/bash
lines=`/usr/sbin/iptables --list | /opt/bin/grep dpt:ssh | /opt/bin/wc -l`
if test $lines -eq "1"; then
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
fi
- K.C.
kopi_bean
19-03-2007, 02:37
Hi
I have executed the command to add FORWARD entry into the iptables:
iptables -I FORWARD -p tcp -d 10.0.1.1 --dport 8081 -j ACCEPT
After the entry was added, I tried to access it via the WAN address again. However I am still not able to access the photo album from the WAN. The IE reported "Unable to open page" error.
Any idea what else should I check or configure to get the album working? Thanks.