Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. win10 firewall cause network connection failed
Forum Updated to NodeBB v4.3 + New Features

win10 firewall cause network connection failed

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 452 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dmnc
    wrote on last edited by
    #1

    My qt program ran well on win7, but got a problem on win10. The program run as UDP client,it send message very well ,but can't receive because of the firewall. I want to solve this problem by writing code but not manual setting. What shoud I do? I tried to use netsh cmd to add rule to the firewall in the script of installer pack software NSIS,but nothing was changed.
    the netsh cmd is:
    netsh advfirewall firewall add rule name="test" dir=in action=allow program="c:\program files\Test\Test.exe" enable=yes security=authnoencap

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, perhaps there's a problem with the path or the Admin password prompt, if you know in advance which UDP port number you'll be using, you could try a netsh to open the that port, for example if it's 7777:

      netsh advfirewall firewall add rule name="Open test port" dir=in action=allow protocol=UDP localport=7777
      
      D 1 Reply Last reply
      1
      • D Offline
        D Offline
        dmnc
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • hskoglundH hskoglund

          Hi, perhaps there's a problem with the path or the Admin password prompt, if you know in advance which UDP port number you'll be using, you could try a netsh to open the that port, for example if it's 7777:

          netsh advfirewall firewall add rule name="Open test port" dir=in action=allow protocol=UDP localport=7777
          
          D Offline
          D Offline
          dmnc
          wrote on last edited by
          #4

          @hskoglund Thanks for your advice, I tested it, but it is invalid for my situation ,any other suggestion?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved