Results 1 to 6 of 6

Thread: winsock IP correct for useing Port Forwarding?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    129

    winsock IP correct for useing Port Forwarding?

    im trying to connect to an internal Computer though a router remotely with winsock. The cod ei have works fine within the LAN, but imm trying to connect to it form the outside.

    I have set up the Router to set port 80 with the internal ip address of the maching i wish to connect to.

    im then useing

    mdiMain.winsocks.RemoteHost = "999.999.999.999/80"

    (First 4 sets of digits changed for obvious security reasons posting them on the web.)

    But i have no joy. Im new tro useing winsocks and prt forwarding (tunneling) so im not 100% sure i ahve everythign set up right.

    Any ideas? can anyone run though a check list of things i should have done to set this up?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: winsock IP correct for useing Port Forwarding?

    You are using the external IP address of the router? The one from your ISP?

  3. #3
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: winsock IP correct for useing Port Forwarding?

    Post your setup like what router you are using, what ports you are trying to use ect.
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: winsock IP correct for useing Port Forwarding?

    Give your friend the external IP address, and port forwarding will work. Don't give the one on your computer that the router forwards it to.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    129

    Re: winsock IP correct for useing Port Forwarding?

    im useing a ZyXel prestige 600 router. I have set the port forwarding up as..

    Ports From: 80 Ports To: 80...........IP 192.168.0.4
    Ports From: 21 Ports To: 21...........IP 192.168.0.4

    IP address is Internal Lan address of machine i wish to forward to, 80 and 21 are the HTTP and FTP ports used (i just asumed these would be the ones i would need to use for useing winsock?)

    I got my works external IP addres from the PortForwaring.com web site (it shows you what your external IP address is.)

    I then use the same line of code i use for talking to the machine while within
    Then LAN.

    mdiMain.winsocks.RemoteHost = "999.999.999.999/80"

    Where 999.999.999.999 is the external IP address of the company LAN and useing the /80 to forward on port 80 which should forward to the 192.168.0.4 IP inside the lan.

    But im getting no connection.

  6. #6
    Fanatic Member
    Join Date
    Dec 2002
    Location
    North Carolina
    Posts
    734

    Re: winsock IP correct for useing Port Forwarding?

    You're getting no connection because you don't forward 80 and 21 unless you want to host a web server and an ftp server. You have to forward the port that your program is using. Know that whole business of LocalPort for winsock connections?


    "X-mas is 24.Desember you English morons.." - NoteMe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width