UDP datagram don’t get the server

55 pts.
Tags:
Datagram protocol
Firewalls
Network
UDP
UDP port
Visual C++
I have implemented with c++, two small apps:
an UDP client and an UDP server
I place client in same machine than server.
I start server, I start client, and I send data from client to 127.0.0.1... server receives OK
now i do ipconfig and i get my local IP is 192.168.1.8 so I repeat by sending to that ip from client.... and server receives OK
but now i get my external IP, i repeat the operation by sending to that ip, but server never receives...
I have checked by pinging to that IP and it pings with less than 1ms latency so it means is my IP address.
I have also tried to disable firewall with no luck either...
What should be the problem?


Software/Hardware used:
visual c++

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Do you have a public ip address for your machine ? How did you 'get' your external IP address ? How are you connected to the internet (a proxy, a router) ?
    69,065 pointsBadges:
    report
  • Thetonatiuh
    Hi Carlos, well i just get my external IP address, as entering in http://www.whatismyip.com/ Then I have realized, i had to add NAT/PAT rules in my router to redirect the server port to my computer ( because i have other devices connected in network, so router knows who must send it ) . I have done and that way, and after sending the client.exe to a friend, outside my network, he has been able to connect from internet to the server in my computer by using that "public" or external IP. The server receives the data nicely. So it's almost solved, but why i still can't access to the server from my own computer by using that IP?... has no sense
    55 pointsBadges:
    report
  • petkoa
    It works as expected - you need some trickier NAT-ting/redirection rules than those implemented in the standard routers to accomplish connection to yourself through the internet interface of the router from within the internal network... Pinging also should not work if you have more than a single public IP - you probably have just a single public IP (doing so called "masquerading", not full featured NAT/PAT)
    3,120 pointsBadges:
    report
  • Thetonatiuh
    But anyway the IP is visible from inside, and also from outside and using NAT that port is redirected to the computer where the server is, and works. So it should also work from inside, why don't? the config is just 1 router, and some home computers/devices connected to it. The only special adjustment i did in router is force the server port to be redirected to my computer. So when i access to that IP with that port from inside, router should back to myself... why not?
    55 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following