Log in

Bekijk de volledige versie : open port 80



ros
08-08-2009, 10:29
I've searched the forum for this problem, but nothing worked.
Here it is:

I'm tryiing to open port 80 for lighttpd server on WAN.

I've moved admin GUI server to port 8080 (with nvram set...).

Now web server works from LAN. But doesn't respond from WAN.

Here is my post-firewall:

iptables -i ppp0 -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -i vlan1 -I INPUT -p tcp --dport 56881:56889 -j ACCEPT
iptables -i br0 -I INPUT -p tcp --dport 56881:56889 -j ACCEPT
iptables -i br0 -I INPUT -p tcp --dport 65534 -j ACCEPT
iptables -i ppp0 -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -i ppp0 -t nat -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -i vlan1 -I INPUT -p tcp --dport 5060:5062 -j ACCEPT
iptables -i vlan1 -I INPUT -p udp --dport 5060:5062 -j ACCEPT
iptables -i vlan1 -I INPUT -p udp --dport 5004:5084 -j ACCEPT
iptables -i vlan1 -I INPUT -p udp --dport 3478 -j ACCEPT
iptables -i vlan1 -I INPUT -p tcp --dport 3478 -j ACCEPT
iptables -i vlan1 -I INPUT -p tcp --dport 4663 -j ACCEPT
iptables -i vlan1 -I INPUT -p udp --dport 4673 -j ACCEPT
iptables -i vlan1 -I INPUT -p udp --dport 4666 -j ACCEPT

Do I need to enable WAN access to admin GUI? It's disabled at the moment. But I don't want to manage my router from the internet anyway.

newbiefan
08-08-2009, 10:48
I've searched the forum for this problem, but nothing worked.
Here it is:

I'm tryiing to open port 80 for lighttpd server on WAN.

I've moved admin GUI server to port 8080 (with nvram set...).

Now web server works from LAN. But doesn't respond from WAN.

Do I need to enable WAN access to admin GUI? It's disabled at the moment. But I don't want to manage my router from the internet anyway.

Well, as long as your webserver works, it should be ok.
The only point what you missed is to open port 80 from wan. As this is the usual admin gui, you can open port by webif. Further you need a dnydns account when you do not have a static ip. Then you are reachable by a regular webaddress like http://wl500g.dyndns.org
have fun....

ros
10-08-2009, 08:12
Perhaps I wasn't clear.

I don't want webui from wan.

I want my personal web page from WAN on port 80.

If I move webui to 8080 and open WAN from webui, it allows me to open only ports above 1024...
I'm a bit confused

EDIT
OK, I see now that it's not possible place a web server on port 80 of WAN interface.
Is it possible to open port 81 and redirect requests from WAN to from port 80 to port 81?

wpte
12-08-2009, 01:34
Perhaps I wasn't clear.

I don't want webui from wan.

I want my personal web page from WAN on port 80.

If I move webui to 8080 and open WAN from webui, it allows me to open only ports above 1024...
I'm a bit confused

EDIT
OK, I see now that it's not possible place a web server on port 80 of WAN interface.
Is it possible to open port 81 and redirect requests from WAN to from port 80 to port 81?

I dunno if it works with those vpn-like internet connections, since I see ppp0 and vlan1 on your iptables, but this is basicly how I did it:
edit post-firewall:

vi /tmp/local/sbin/post-firewall

place the lines inside post-firewall if they aren't there yet

#!/bin/sh
iptables -D INPUT -j DROP

#here is where the firewall rules shall be placed

iptables -A INPUT -j DROP

add the rule in between the 2 iptables lines:

iptables -A INPUT -p tcp --dport 80 -j ACCEPT

save the file and flash save it:

flashfs save && flashfs commit && flashfs enable && reboot
now port 80 should be opened on your wan

otherwise "virtual server" should help you out located in the web-inf