#1
  1. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    Lawrence, Kansas [KU]
    Posts
    1,559
    Rep Power
    15

    sockets/routers/ip


    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.

    thanks
    Last edited by jacktasia; November 12th, 2004 at 12:29 AM.
  2. #2
  3. slightly insane code guru
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2004
    Location
    Indianapolis, IN
    Posts
    871
    Rep Power
    18
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    Lawrence, Kansas [KU]
    Posts
    1,559
    Rep Power
    15
    okay thanks.

    but how would i go about doing this? and is it possible to do it with python code?


    thanks again
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    34
    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.

IMN logo majestic logo threadwatch logo seochat tools logo