Jump to content
  • Advertisement
Sign in to follow this  
Jkom329

UDP, winsock, firewall problem.

This topic is 3714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a simple UDP-based server/client interaction, both running on my own pc, that goes as follows: 1. client sendto 2. server recvfrom 3. server sendto 4. client recvfrom It works perfectly fine with my firewall disabled. However, when I enable the firewall, step one apparently succeeds, but my server is oblivious of it and never passes step two. I think the problem is that my firewall doesn't know that my server is listening (it's UDP, so I just bind the socket), and therefore maybe disregards the packet? I'm just not sure of what to do about it. The same interaction via TCP would work just fine behind my firewall. I suspect it's because of the necessary call to listen() which always triggers a prompt for a block/permit decision from the user. Someone please enlighten me. I'm running Norton's personal firewall. EDIT: Forgot to mention some other things: 1. The first sendto blocks for several seconds only when the firewall is enabled 2. The server and client recvfrom use select() to prevent blocking. 3. After shutting down my client and server sequentially, I receive a prompt from my firewall saying that a "remote system is attempting to access" my server (it's my own client).

Share this post


Link to post
Share on other sites
Advertisement
Sounds like a problem with Norton Firewall. See if you can re-configure it to do what you need.
There is also a "firewall control API" as of Windows XP SP2 that you can try using -- I don't know if Norton pays attention to it, but the Windows Firewall does.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
Sounds like a problem with Norton Firewall. See if you can re-configure it to do what you need.
There is also a "firewall control API" as of Windows XP SP2 that you can try using -- I don't know if Norton pays attention to it, but the Windows Firewall does.


I certainly think so. What bugs me, though, is that I've played online games like Unreal Tournament which use UDP, and those work without problems. There must be a way to get my stuff working without touching the firewall then, right? Hmmm...

Share this post


Link to post
Share on other sites
Try hosting a UT server, that will probably block clients connecting too and you will have to tinker with your firewall settings.

It's also possible Norton has some in-build filtering mechanism, allowing known games, but not your program that is unknown (and could be anything as far as Norton is concerned).

I know my firewall twitches when I make small network apps (I have to enable communications manually via a firewall popup).

Share this post


Link to post
Share on other sites
Quote:
Original post by oliii
It's also possible Norton has some in-build filtering mechanism, allowing known games, but not your program that is unknown (and could be anything as far as Norton is concerned).


That's the only explanation that fits as far as I can see. I wonder if there is a list of such programs somewhere. It's not so much the blocking of my program that bothers me though; it's the performance difference. I wonder why it takes the firewall so long to prompt for approval. And I still can't get my server to receive data. Usually I have to shut the server down before the firewall prompts for receiving data. Seems like some kind of buffer issue.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!