Making webpy framework accessible from outside the local network
I am using ubuntu 12.04.03. I have some basic experience with webpy and I had it working for my LAN just by following the tutorial. The framework needs to be able to be used from outside the local network. I have difficulty seeing how to make the framework accessible from outside the lan. I tried opening a specific port (with "# iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 8081 -j ACCEPT" then I check: "# netstat -ln | grep 8081 and I get: tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN" ) and use "python web_py_test.py MY_IP:8081" without success.
If I understand it at all, we can have a computer connected on a wifi with a non-static IP and there is a way to launch our webpy framework which can be accessible from the outside world. I am experimenting with the hello script:
I observe that nothing is declared in the script about IPs or ports.
Last edited by frad; 12-14-2013 at 11:04 AM..
Reason: browser crashed
How exactly is your "local network" connected with the "outside network"? Do you have NAT in between? If so, it will be a little more effort than just to unguard a port.
Tell us about your environment and we can help you find out a solution.
There is no outside network. I just have wifi and ethernet and the ips are dynamic. I did not configure any NAT. What I want to do is to arrive to the result that everyone (with his own computer, with his own internet connection) will be able to type a specific ip and port on his webrowser and see my webpy framework. The user should be able to enter some variables and launch a calculation (as I am doing locally) that will run on my computer.
I think i should mention that i do not know this "webpy framework", but i am pretty seasoned in networking. So, please bear with me when my questions are sometimes asking the (for you) obvious.
Quote:
Originally Posted by frad
There is no outside network.
As it is, i don't think so. To quote you:
Quote:
Originally Posted by frad
The framework needs to be able to be used from outside the local network.
If this is not an "outside network", what else is it? How is it connected to your "local network"? (I suspect this is the Wifi-box you mentioned, but just to be sure. And do you have routing enabled on this box or does it act as a switch?)
Quote:
Originally Posted by frad
What I want to do is to arrive to the result that everyone (with his own computer, with his own internet connection) will be able to type a specific ip and port on his webrowser and see my webpy framework. The user should be able to enter some variables and launch a calculation (as I am doing locally) that will run on my computer.
OK. First question: with "everyone" you mean "anybody on the internet" (like, for instance, me) or "anyone connected to the box i spoke above" (the Wifi-LAN connection)?
Second question, as i do not know webpy: does one need a browser (or any other software like a terminal emulation, ....) to do so or does it have its own protocol and client/server applications?
Your questions are helpful. I am only connected to the modem/router and the ips are dynamic and yes I wish that everyone on the internet would be able to type an ip/port and see the framework.
All computers connected via wifi/ethernet to my modem/router can see the framework by typing http://0.0.0.0:8080/ or variants after I start the server with
I hope we are advancing
All computers connected via wifi/ethernet to my modem/router can see the framework by typing http://0.0.0.0:8080/ or variants after I start the server with
OK, things start to get clearer. I understand that basically your framework is a sort of web server module. I presume it is configured correctly in its own right, because otherwise you would not be able to use it from your local network.
Next question: what are the IP-networks you use? Look at your IP-addresses and subnet masks. If the addresses are one of these:
you use indeed NAT and we have to sort that out first (in fact most consumer Wifi-routers do that per default). As you say you use dynamic IP addresses chances are you do not have a range of official IP addresses (who still, these days?) but merely a so-called "private address space"-network, as defined in RFC 1597. In this case, to make your server known, you will have to use dynamic DNS to keep at least the name the service is reachable at constant.
If this really works you'd better never succeed in connecting the system to the internet. The network address "0.0.0.0" is the "joker for all" and if the whole world comes down on your system requesting its services chances are it won't keep up with the load.
I still would appreciate if you could give a little more information aforehand instead of letting me guess. You now said several times that your IP addresses are dynamic but were silent about your network layout (which networks, subnet masks, connected how?) save for what i explicitly asked. As your problem is most probably a firewall problem it might help a wee bit to know these things.
Hi All,
I have my SC setup as attached below but I am having problem accessing the port thru network. sc0 was accessible only after i failed over the configuratios to sc1 (now then sc1 was not pingable :(). Just wondering is there anything wrong with my sc settings? Appreciate your advice.
... (4 Replies)
hello i have a ubuntu ssh server that i can acess from any of my comnputers but only if they are on the same wireless network as the server. i tested trhis my tehtehring my samsung blackjack to my windows partition and installing openssh to windows it works when windows is on the wireless but no... (1 Reply)