TCP Connection Trigger Firewall? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Jishaxe · 2012-02-22 22:47 Hello, just a quick question. If I had a small program that simply connects to a server through TCP over the internet, to send some data in the form of text (with users permission of course), would this theoretically set off a firewall on the client computer? I was just thinking that having a popup from firewall software would be unpleasant for the user and would require manually adding an exception in a firewall. I lack knowledge on firewalls and instead of doing potentially unreliable testing myself I thought I'd ask here to see if anyone had any experience. Thank you in advance! ---------------------------------------------------------------------- ludob · 2012-02-23 07:26 Depends on the firewall software used on the client if any. On windows most consumer type firewalls use white and black lists of applications for outgoing connections, lists which are almost empty when the software is installed on the client. When an application want to access the network, the firewall asks for a permission and adapts the white or black list accordingly. Furthermore, a lot of firewalls maintain additional information on the application such as modification date, size , path, etc. This results in the firewall asking permission again as soon as the app has been changed (recompiled for example).  If this is the type of firewall you are talking about, it will be difficult to get around a permission pop-up. There are possibilities, difficult to implement, that consist of letting commonly white listed applications do the network access for you. The most simple one is to use a web browser to connect to a server and embed your data "payload" in the url. ---------------------------------------------------------------------- Jishaxe · 2012-02-23 09:56 Thanks for the reply ludob, I'll have to do some consideration. It's just I've always used software that connects to the Internet and it doesn't set of a firewall permission popup. It could be my firewall, or perhaps it added an exception for itself to save the user doing it? ---------------------------------------------------------------------- BigChimp · 2012-02-23 10:04 Well... if your application needs the functionality... I'd just leave it as is. After all, the user probably installed/chose/configured a firewall for a reason... and showing a popup the first time is a normal and reasonable way of indicating that a program is connecting to the internet. Edit: to clarify: all firewalls I know that do per application outgoing firewalling allow you to register an exception once and for all (unless a program changes etc, see Ludo's post). So the user only sees the popup once... I'd just mention in your readme/documentation that the application needs access to the internet for xxxx reason, will try and connect and that the user may get a firewall popup or allow access through the firewall; see relevant operating system/firewall documentation for more details. Alternatively, you could do what Ludo indicated and try if you can get e.g. the web browser to connect to a web server you control with, presumably, your outgoing data in the parameters. I as a user would be less than happy if that happened, though... ---------------------------------------------------------------------- Marc · 2012-02-23 10:09 IIRC there are windows API functions to modify the firewall so your app can access the network. Search MSDN http://msdn.microsoft.com/en- us/library/windows/desktop/aa366415%28v=vs.85%29.aspx