Block an application from accessing the network, except for a single IP address

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












How would I go about preventing a specific .exe from accessing any network (TCP) resources, with the exception of 1 or 2 IP addresses?



Can it be done with Windows Firewall (netsh or UI) and/or IPSec? If so, how?



Note:



  • I don't want to set my default firewall behavior to BLOCK.

  • OS is Windows 10 Pro

Thank you!










share|improve this question

























    up vote
    1
    down vote

    favorite
    1












    How would I go about preventing a specific .exe from accessing any network (TCP) resources, with the exception of 1 or 2 IP addresses?



    Can it be done with Windows Firewall (netsh or UI) and/or IPSec? If so, how?



    Note:



    • I don't want to set my default firewall behavior to BLOCK.

    • OS is Windows 10 Pro

    Thank you!










    share|improve this question























      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      How would I go about preventing a specific .exe from accessing any network (TCP) resources, with the exception of 1 or 2 IP addresses?



      Can it be done with Windows Firewall (netsh or UI) and/or IPSec? If so, how?



      Note:



      • I don't want to set my default firewall behavior to BLOCK.

      • OS is Windows 10 Pro

      Thank you!










      share|improve this question













      How would I go about preventing a specific .exe from accessing any network (TCP) resources, with the exception of 1 or 2 IP addresses?



      Can it be done with Windows Firewall (netsh or UI) and/or IPSec? If so, how?



      Note:



      • I don't want to set my default firewall behavior to BLOCK.

      • OS is Windows 10 Pro

      Thank you!







      windows ipsec windows-10 windows-firewall






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      Adam Plocher

      1136




      1136




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          According to this answer you can't create an exception for an outgoing block rule.



          So instead you will need to create multiple block rules for the executable, so as to cover the entire IP address range apart from those addresses you want to allow.



          For example, if you wanted to only allow traffic to 100.100.1.33, you would create block rules for 1.1.1.1-100.100.1.32 and 100.100.1.34 through 255.255.255.255.






          share|improve this answer




















          • Ah hah, good idea.... gonna try that and I'll report back shortly. Thank you
            – Adam Plocher
            1 hour ago










          • I do believe that worked, thank you. Btw, it can be done with a single rule with multiple IP ranges. Thanks!
            – Adam Plocher
            1 hour ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f935414%2fblock-an-application-from-accessing-the-network-except-for-a-single-ip-address%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          According to this answer you can't create an exception for an outgoing block rule.



          So instead you will need to create multiple block rules for the executable, so as to cover the entire IP address range apart from those addresses you want to allow.



          For example, if you wanted to only allow traffic to 100.100.1.33, you would create block rules for 1.1.1.1-100.100.1.32 and 100.100.1.34 through 255.255.255.255.






          share|improve this answer




















          • Ah hah, good idea.... gonna try that and I'll report back shortly. Thank you
            – Adam Plocher
            1 hour ago










          • I do believe that worked, thank you. Btw, it can be done with a single rule with multiple IP ranges. Thanks!
            – Adam Plocher
            1 hour ago














          up vote
          3
          down vote



          accepted










          According to this answer you can't create an exception for an outgoing block rule.



          So instead you will need to create multiple block rules for the executable, so as to cover the entire IP address range apart from those addresses you want to allow.



          For example, if you wanted to only allow traffic to 100.100.1.33, you would create block rules for 1.1.1.1-100.100.1.32 and 100.100.1.34 through 255.255.255.255.






          share|improve this answer




















          • Ah hah, good idea.... gonna try that and I'll report back shortly. Thank you
            – Adam Plocher
            1 hour ago










          • I do believe that worked, thank you. Btw, it can be done with a single rule with multiple IP ranges. Thanks!
            – Adam Plocher
            1 hour ago












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          According to this answer you can't create an exception for an outgoing block rule.



          So instead you will need to create multiple block rules for the executable, so as to cover the entire IP address range apart from those addresses you want to allow.



          For example, if you wanted to only allow traffic to 100.100.1.33, you would create block rules for 1.1.1.1-100.100.1.32 and 100.100.1.34 through 255.255.255.255.






          share|improve this answer












          According to this answer you can't create an exception for an outgoing block rule.



          So instead you will need to create multiple block rules for the executable, so as to cover the entire IP address range apart from those addresses you want to allow.



          For example, if you wanted to only allow traffic to 100.100.1.33, you would create block rules for 1.1.1.1-100.100.1.32 and 100.100.1.34 through 255.255.255.255.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          Harry Johnston

          3,14012035




          3,14012035











          • Ah hah, good idea.... gonna try that and I'll report back shortly. Thank you
            – Adam Plocher
            1 hour ago










          • I do believe that worked, thank you. Btw, it can be done with a single rule with multiple IP ranges. Thanks!
            – Adam Plocher
            1 hour ago
















          • Ah hah, good idea.... gonna try that and I'll report back shortly. Thank you
            – Adam Plocher
            1 hour ago










          • I do believe that worked, thank you. Btw, it can be done with a single rule with multiple IP ranges. Thanks!
            – Adam Plocher
            1 hour ago















          Ah hah, good idea.... gonna try that and I'll report back shortly. Thank you
          – Adam Plocher
          1 hour ago




          Ah hah, good idea.... gonna try that and I'll report back shortly. Thank you
          – Adam Plocher
          1 hour ago












          I do believe that worked, thank you. Btw, it can be done with a single rule with multiple IP ranges. Thanks!
          – Adam Plocher
          1 hour ago




          I do believe that worked, thank you. Btw, it can be done with a single rule with multiple IP ranges. Thanks!
          – Adam Plocher
          1 hour ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f935414%2fblock-an-application-from-accessing-the-network-except-for-a-single-ip-address%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Confectionery