November 12th, 2004, 01:26 AM
Okay, I just have a few questions.
So I am messing with sockets in python. I made a client and a server and i put them on different computers on my network and they worked perfectly. Using 192.168. ip addresses.
now i want to try to connect to computers out of my network...how can i do this if i have my server script to be running on my network behind the router. is there a way to connect to by IP...because i clearly can't use it's 192.168 ip since it's only behind my router but i can't give it the ip address my router gives out...because then how would it know to go to that certain computer on the network (mine).
i am trying to basically have a program act as a server or a client and i have access to both computers.
not trying to do anything bad if it sounds so. just trying to learn.
any help whatsoever would be great.
Last edited by jacktasia; November 12th, 2004 at 01:29 AM.
November 12th, 2004, 01:33 AM
you'd have to set up port forwarding on the router - basically, it tells the router "if someone connects to this router's ip on port so and so, it should be sent to the internal LAN ip of such and such a computer and such and such a port".
so you could forward port 10000 to 192.168.whatever, and any connection to port 10000 would go to the server you specified.
November 12th, 2004, 02:58 PM
but how would i go about doing this? and is it possible to do it with python code?
November 14th, 2004, 10:03 AM
No, not really. It depends on the make and model of the router, but if you check the instructions it should tell you.
It will probably be a matter of:
Opening the router configuration in a web browser and logging in.
Changing the settings, wherever they are for that router.
saving and rebooting.
Then you can forget about it.