Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

socket server not going through firewall

Posted on 2003-03-14
6
Medium Priority
?
165 Views
Last Modified: 2010-04-01
I have an win32 application (not MFC) that is a socket server using winsock that handles http requests from a client.  When the server is run from within most company firewalls, the external clients are unable to connect to it.  I currently am using port 80 because I thought that would be open, but most companies turn off all ports.  How does IE and IM work through these types of firewalls.  Is there better api's to use other than winsock, or am I doing something wrong.

I have been able to use dhcp address from my isp and port forward port 80 on my linksys router to an internal ip address and that works, but most users do not have that luxury to do.



0
Comment
Question by:tbahr99
6 Comments
 

Author Comment

by:tbahr99
ID: 8137230
Thanks
0
 
LVL 5

Expert Comment

by:Kocil
ID: 8137522
Try to reply the HTTP request from port 80 too, not from arbitrary port.
0
 

Author Comment

by:tbahr99
ID: 8137647
Looks like the broadcaster can makes http requests to an external site and back, it seems just the external clients cannot connect.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:tbahr99
ID: 8137850
Thanks Kocil for the reply, not sure what you mean.  The broadcaster never gets the accept connection for an incoming client request.
0
 
LVL 2

Accepted Solution

by:
limestar earned 200 total points
ID: 8143093
You need to see the difference between connections going inwards and connections going outwards through a firewall. Port 80 is generally open for outgoing traffic through a firewall but is generally closed for inward traffic. In a sense, firewalls are there to prevent people from doing what you are trying to do - open servers on internal hosts.

So the way this is generally solved is that you only connect outwards. Thats why ICQ connects to an icq server to be able to communicate - the connection passes through the firewall since it's outbound and can then be used for bidirectional communications. So, if you want to do this kind of thing, you probably need some form of public server.
0
 
LVL 9

Expert Comment

by:tinchos
ID: 9491937
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Please Review

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question