PDA

Bekijk de volledige versie : Access web service from outside world?



denny
27-06-2004, 14:22
Hi all,

I am using Oleg's 1.7.5.9-2 firmware,
and running busybox_httpd on port 8080.
I can access the web page from inside network
by http://192.168.1.1:8080/ without problem.

Now I want to expose the web to outside world,
so I add an entry in "Virtual server" settings with
"Local IP"=192.168.1.1, "Port Range"=8080,
"Protocol"=TCP, "Protocol No."=80.
But after setup & reboot, it still can't be reached from
outside. So what's wrong with it?

By the way, I am wondering:
Do we really have to reboot the router to make the "Virtual Server"
settings effective? Is there any way to do that
by some commands under console? (e.g.., something like
kill -HUP xxx)? Thanks.

Oleg
28-06-2004, 20:25
use /usr/local/init/post-firewall for this. Add line like this:


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

denny
29-06-2004, 05:40
use /usr/local/init/post-firewall for this. Add line like this:


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


Thanks, by this command I can access web via port 8080
from outside world. However, I am still wonder why I cannot
setup "outside 80=>inside 8080" by the web administration interface.
What's wrong with my settings? (as in first post).

Oleg
29-06-2004, 18:54
Virtual Server can't be used to alter port numbers. "Protocol No = 80" is look like a nonsense... This field is intended to store protocol (not port) number when you've OTHER selected.
You need to manually add rules like this to post-firewall


iptables -A INPUT -p tcp --syn --dport 8080 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp -d "$2" --dport 80 -j REDIRECT--to-ports 8080

ThaPaSSioN
05-07-2004, 17:52
Hello, Denny or Oleg can you write here how to use the router as a webserver?
I understand that you use a hd or a memory stick in the usb outlet.
But then its abracadabra for me?
Do i have to make a directory on the memery stick?
Do i have to have another program?
Please tell me.

ronin
13-07-2004, 00:04
is Nat standard supported in this iptables because the command below does not work?

thnxz