Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
My Project (c# + MySQL) allow to work through a network one of the devices work as server ( contains MySQL Server and DB) and it work with Windows.

But the firewall closes the connection between this main PC and the others PCs.

What I have tried:

and I had to disable the firewall , now all of the others pc connected to it and work fine.

i know this insecure so, how to add programmatically Firewall rule that allow the others pc to connect to the main PC and the MySQL Service
Posted
Updated 6-Dec-19 9:45am
Comments
RedDk 6-Dec-19 17:43pm    
If your firewall is being managed by third-party software, such as an antivirus program, you can usually go to that apps preferences and find a system settings where it's possible to overule DHCP or other LAN prototcol and input a hard address. Do this on both computers on the network so each sees the other. Then there shouldn't be any security warnings or footplants on any necks as you go forward.

And I think I've managed to hardwire the LAN computer across the room using Windows Defender in the same way. It's in the System Settings under security ... somewhere.

1 solution

Google is your friend: you've asked more than enough questions by know to know to try it first.
A trivial google using part of your question gives loads of info on how to do it: add programmatically Firewall rule - Google Search[^]
In future, please try to do at least basic research yourself, instead of wasting your time and ours...
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900