Abdullah
Abdullah

Reputation: 1

communicate on public ip from socket

apologies for weak English

Hello my friends

I have a problem that very confused me

Project description: I created c# wpf project for server side and android studio app for client side. in wpf I coded socket communication codes also in android studio. main point is I connected my phone to pc by charger cable as modem to connect the internet. also use the phone for debugging android studio app. when I test the communication between my pc and phone established successfully . it connects very good on android virtual device manager too . but when my friend install client app on his phone , connection is not established and my ip (192.168.xxx.xxx) is not accessible for client. I tried by my public ip founded from whatismyip.com but I don't socceeded

thanks in advance

special thanks for you and other friends

Upvotes: 0

Views: 1001

Answers (2)

negrel
negrel

Reputation: 116

For safety reasons your modem is blocking request that come from the outside of your local network. You must setup a NAT/PAT on your modem to allow external request to be treated. There is tutorial on internet depending on your modem. Hope that will help you. Have nice day !

Upvotes: 1

Mohannad_
Mohannad_

Reputation: 89

your private IP "192.168.xxx.xxx" is not routed over internet, you have to use your public IP provided by your ISP provider(NAT), if you are using ADSL router, log in to it IN ORDER TO find your public IP, then do port forwarding to your local IP address,and enable dynamic DNS, then you can access your private IP using public IP from anywhere over internet

Upvotes: 0

Related Questions