• Advertisement

Archived

This topic is now archived and is closed to further replies.

Problem with UDP behind firewall

This topic is 6555 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

My game is currently using only TCP, but I´m going to change it so it will use a combination of both TCP and UDP. I have written a testprogram that will set up a server or a client dependending of your choice. The server binds a socket to a desired port number and listen for a client to connect. The client connects to a desired ip address and port number. Both client and server bind a udp socket to the same number (not the same number as the tcp socket though). The server stores the client´s ip address, which it receives from accept(), which will be used for sendto(). The client sends, depending of user input, udp or tcp messages to the server. When the user types ''0'', the server starts sending to the client instead. Now to my problem. When I use the test program on my company´s LAN there is no problem at all. The problem occurs when I try to use my program with an outside computer. I run my computer at the office as a client, and the outside computer as a server. The outside server receives both udp and tcp messages. So long no problems. But when the server starts sending messages to the client, only tcp messages are received by the client. Both computer are behind firewalls. My computer at the office (client) is assigned a dynamic ip, the outside computer (server) is having a static ip. The ports we used were free, allowed by the firewall. We first tried to play Quake2, which uses only udp, between the computers with no problems. Can anyone help me? I''m really stuck. I hope I have explained my problem in an understandable way.

Share this post


Link to post
Share on other sites
Advertisement
Did you try running the client in a SOCKSifying launcher? If it works in that it may be that the firewall is blocking the traffic anyway. Is your firewall using network address translation? Hardwiring your ports on the client side can often cause NAT to fail.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by SiCrane

Did you try running the client in a SOCKSifying launcher? If it works in that it may be that the firewall is blocking the traffic anyway. Is your firewall using network address translation? Hardwiring your ports on the client side can often cause NAT to fail.


What is a SOCKSifying launcher? And what is NAT?

Share this post


Link to post
Share on other sites
By a SOCKSifying launcher, I mean a program that executes the network program on top of an additional network protocal stack that implements the SOCKS4 or SOCKS5 protocol. e.g. Sockscap.

NAT is network address translation. Linux''s implementation of network address translation is called IP Masquerading.

Share this post


Link to post
Share on other sites

  • Advertisement