Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
flask default port is 5000, I'm working with compute engine and testing my service from my local machine browser, for that i've added to the app.run function the parameter host = '0.0.0.0'. I execute the script and my simple hello world service runs, I've read i can give a specific port by adding the parameter port to the app.run command so now it looks like this: app.run(host = '0.0.0.0' , port=5050 , debug = True) it executes fine
* Running on http://0.0.0.0:5050/
* Restarting with reloader
but when i call it from the browser i get the error Oops! Google Chrome could not connect to <compute engine instance external ip>:5050
do i need to "open" port 5050 and if so where and how
Have a look at https://developers.google.com/compute/docs/networking.
It should explain in some gory detail how to connect a google compute engine to the outside world, and to configure firewalls to allow connections.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 12 months ago.
Improve this question
I have a two socket scripts which I want to access from outside local network but None of these solution seem to work.Tried this Accessing python server (web server) using ngrok and this https://pyngrok.readthedocs.io/en/latest/integrations.html#python-tcp-server-and-client and this https://gist.github.com/Jc2k/61aeb5b551d006b17f97 didn't work for me.
Windows 7 python 3.8.8
Any other solution?
This solution may work it worked for me
https://youtu.be/HI1kbr6vBhQ
Just follow the screen as the voice is in another language.
First setup ngrok
Then ngrok tcp port-no
It will return 'forwarding' which will have a port number put it in your file
Then ping the thing it returned it will return the ip then put it in client file
That's all
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I want to connect to my MySQL database, it works locally on my computer but when I want to connect it to my website it doesn't work obviously because it's only local. How do I run my database globally so that my website can access it? If there's any helpful link you can send, please do.
If you want to run a database from your PC you would need to configure your router to have a static external IP address. You would most likely need to talk to your ISP to arrange this, and once in place you would need to update your routers firewall to only allow appropriate traffic into your network.
Although possible, I wouldn't recommend it. It would be far better to get a £5pm droplet from a cloud provider as it will be a lot more reliable, not to mention cheaper!
If you spend a little more you can get a managed database instance in the cloud.
Once you have decided where to run your database, you can update mysqld.conf to configure your bind_address. This is the address that MySQL will listen on, and by default will only listen locally. You can change it to your external IP, or to 0.0.0.0 to listen on all interfaces.
You are going to have to move it to a cloud provider. It will be reliable as well which is a plus. Rather than going through your own router, and setting something up with your ISP.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
How do I connect a client which is on a different network to my server? What IP should I put on each side? IPv4 or my Public Ip? Should I open ports? UDP, TCP or both?
Your client needs to know the IP address of your server and the port the server is listening on. See https://www.tutorialspoint.com/python/python_networking.htm
Based on your comments you are setting up your server on your home network. If so you can determine the IP address your clients need to connect to by typing "what is my ip" in your browser's search. Next you will need to set up port forwarding on your home network's router. You will also need to know the IP address of the computer you will be running your server code on.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I used ip aliasing technique to assign multiple ips on single nic. I am using these ips in a python script to generate traffic. I am doing this for my college project. Can anyone tell me that how would I come to know that currently in my script which IP is used to generate traffic? I am using centos 6.5
You can get the local IP and port used for the socket by doing
>>> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> sock.connect(('8.8.8.8', 53))
>>> sock.getsockname()
('192.168.1.67', 36498)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I want to make my Raspberry Pi to run a server application in python so that, with my client application on my mac, I could send json requests to it so the Raspberry Pi would preform certain actions based on the json request. I want to know:
Which ports should I use? (I think my verizon FiOS router blocks certain ports
should I use raspian for this project?
How can I get a static IP for my pi?
For the 3rd problem you can use no-ip.com. This won't give you a static ip, but will map your dynamic one to a url.