Berkay Aras
Berkay Aras

Reputation: 127

Java Socket connection refused with my Public IP

I have a client server architecture project in android. I cant connect with my public IP to server. I closed firewall, and did the port redirection for server. My friend can connect from outside to my server, but i can't, why? how can it be?.. Thanks..

Upvotes: 3

Views: 1385

Answers (1)

Dhawan Gayash
Dhawan Gayash

Reputation: 463

Which OS are you running your client server code. If Windows, look for c:\Windows\System32\drivers\etc\hosts, if it's linux go the /etc/hosts/ file

Open the file with sudo privileges.

Format:
<IP> <HOSTNAME>.<DOMAIN> <ALIAS>

Example:
127.0.0.1 localhost.localdomain localhost

Add your IP here with domain name. Your Domain Name can be anything and try again. Also your question is a bit vague. Please add more details such as your os env and what exactly are you trying to achieve?

Upvotes: 1

Related Questions