Click here to Skip to main content
13,044,115 members (83,580 online)
Rate this:
Please Sign up or sign in to vote.

I am currently having problems, with accepting connections. I have developed a Client & Server Application. When I tested my Application on Local host it worked great but when working remotely the firewall does not accept any connections. I have thoroughly looked and it says Firewall blocks all Incoming Connection. So how exactly can I bypass this. On all Windows.

If so how do some Applications bypass this.


If you are kind can you provide a source code with comments involved please.
Posted 12-Apr-13 7:42am
richcb 12-Apr-13 13:50pm
A bit of a red flag comes up with this question and the combination of your screen name. Your question is vague and you have not provided any code showing your application and the section that needs to connect.
Cyberwarfare 12-Apr-13 13:53pm
Well, No you see this is not some kind of Hacking thing or such since I actually am a White hat. I can prove it if u wish.

Besides as I said my application works on Localhost completely fine but remotely it does not so it must not be my application but the actual firewall.
richcb 12-Apr-13 13:54pm
Fair enough. Don't you think it would be a network issue rather than an application issue then?
Cyberwarfare 12-Apr-13 13:56pm
So what type of Network issue is there or known which can cause such effects. I also want to know how do those Real-Time applications bypass the Firewall.
richcb 12-Apr-13 14:02pm
Well I cannot tell you about those sort of applications because I don't of them. Let me ask you this though, what do you mean exactly by "accepting connections"?
Cyberwarfare 12-Apr-13 14:08pm

Thanks for cooperation, When I mean Accepting Connections I mean that when server is behind a Firewall and the client tries to connect to the server the Firewall blocks it so that the Clients connection request does not get to the Server. Therefore making sure the server cannot get any connections from Remote PC.
richcb 12-Apr-13 14:14pm
OriginalGriff has explained it in the solution below.
Philippe Mori 12-Apr-13 16:10pm
You don't provide enough information on the type of connection you are trying to make and where is the server and the client. Atr they on a local network, across the web, do you have access to one or both?

If the server is on your own network, then it is up to you to adjust the firewall....
Cyberwarfare 12-Apr-13 16:58pm
Hi Philippe Mori,

I am doing a TCP connection with Server & Client. No the Client or server can be anywhere.

No I programmed it but I do not have access to those servers. I know I can but say someone else buys it or needs it. It is not very good to make them keep adjusting their firewall.
Philippe Mori 12-Apr-13 21:58pm
If it would be easy to bypass a firewall, then it would be useless as people that are able to do malicious software would be able to bypass firewall. By the way, the are many possible firewall both software and hardware so it would be nearly impossible to bypass them all.
Cyberwarfare 13-Apr-13 5:20am

Thanks, for telling me that. I have now found a Way to bypass a Firewall , In a NON malicious way.
I will add it to the Solutions.
Philippe Mori 13-Apr-13 9:38am
I really don't approve what you are doing. It is an intrusion.
Cyberwarfare 13-Apr-13 10:44am
Well, I can promise you it is not. As If I were some kind of hacker. I would be looking for answers in underground forums and such not here.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You can't - that is the whole idea.

A firewall is there to stop all applications that do not have a good reason from getting access to computers or networks. If your app could "bypass" it, then so could malicious applications, which none of us want.

You can configure firewalls to let particular connections through, but you need to have physical access to the equipment running the firewall to configure that. From the tone of your quetsion, you do not have that level of access, so I think you are out of luck.
richcb 12-Apr-13 14:09pm
Thank you OG, that is what I was trying to get at in my comments. You said it much better, +5.
Cyberwarfare 12-Apr-13 14:11pm
well, I am confused now , then how do those Real-Time Application work then.
OriginalGriff 12-Apr-13 14:13pm
Probably, they are running to servers where the firewall is not so tightly locked down as the one you are trying to use...
enhzflep 12-Apr-13 14:17pm
What "Real-Time Applications" would they be? Real-Time has nothing to do with firewalls, at least not in the traditional sense of the term real-time.
OriginalGriff 12-Apr-13 14:12pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

I know I am going to regret this but (Mr. White Hat) the ways that come to mind are:
(1) Use a different port that is not blocked by the firewall.
(2) Find or use a known proxy server that will translate your acceptable port into the denied port
(3) If IP is blocked, see if UDP, ICMP etc. are open
(4) Use native IPv6
(5) Use a tunnelling technique (eg. IPv6 Teredo, 6to4, ISATAP, AYIYA, ...)

Really the purpose of a firewall is to block what you are trying to unblock.
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

Finally, this thread can be finsihed. I found a way to do that by injecting the program into a trusted process such as explorer.exe ,a native process to all windows OS.

This would have been flagged as a Malware by most Anti-Virus but as this was a Legal program. I have digitally signed it. This way Windows OS understands that my program is safe.

Thanks for the help though.

King Regards,

P.S: If threads can be closed, can some Moderator or Admin close this now?
Philippe Mori 13-Apr-13 9:33am
Although technically it might works, I cannot recommand such solution as I generally do not agree with program that goes around protection. What you don't realize is that by doing that, you are not helping the computer industry as more protection might be added and computer then get slower and slower by having more complex protection.

You should really not do that. You are intruding user computer without their consent and it should be illegal to do that.

You should do as anyone else does. Ask your user to adjust their firewall.
Cyberwarfare 13-Apr-13 12:47pm
I have to agree with you but as my program is SIGNED! It does not matter although I will create a notification to inform the user that:
"The Program has bypassed your Firewall by injecting itself into the Process PID- 3076
Do You want the program to do this? If No you may need to adjust the Firewall Settings"

Well, Now it should have cleared your Mind up. But I really do not know why it would reduce speed as most AV detect Injections so really 0 protection is lost. Actually more is gained as my Program does not accept any random connection but the ones which can respond to the custom protocol. So firewall can be kept to the maximum protection while allowing my program out.

Of course injection & hooking is quite a malicious thing to do but also a good thing to do as most AV use this method like mine they are also signed so AV should know that my program is legal and safe.

Kind Regards,
JackDingler 15-Apr-13 17:38pm
White Hats don't do this.

This is anti-White Hat.
Cyberwarfare 16-Apr-13 12:18pm
Well, I thing I know it is White HAT as I signed it so read before you post.
Rate this: bad
Please Sign up or sign in to vote.

Solution 5

I just found that Wix can register exceptions in the Windows firewall. So it might be a good option. Here is the link about that capability:[^]

For more information, you'll have to look at documentation.[^]

You can also look at MSDN documentation (Windows Firewall with Advanced Security):[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 15 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100