Hello All.

Ok i have browed the web and looked at a ton of tutorials. I should have this correct but it is still not working.

Im trying to access a computer remotly useing winsock that is within a LAN

My program works fine if both PC's are within the LAN, but not with 1 from outside the LAN.

I 'THINK' i have set up my router correctly. to allow port forwadring. I think my code should be sound.

Rather than for you to work otu whats wrong from my code, could one of you please give a breife description on how you would go about setting up a remote access though a router useing winsock.

I dont need a bunch of code just the steps regarinf the setting up of the router, what ports you would use and which parts ofthe router you would setup. and the IP part of the Winsock code IE this part for connection...

Code:
Public Sub Winsock_Connect()

    On Error GoTo ErrorHandler
    
    mdiMain.winsocks.Close
    mdiMain.winsocks.RemoteHost = "192.168.0.4"  ' this is the internal Ip of the server
    mdiMain.winsocks.RemotePort = 15151  
    mdiMain.winsocks.Connect 

end sub
and this part, the other maching were it detects a new connection..

Code:
Private Sub WinsockArray1_NewConnection(ByVal lngIndex As Long, blnCancel As Boolean)
Hopefully then i can see where i am going wrong.

Thanks for your time.