Windows 10: Block all in/out traffic except to a single IP in Windows Defender Firewall

Discus and support Block all in/out traffic except to a single IP in Windows Defender Firewall in AntiVirus, Firewalls and System Security to solve the problem; I have a Private workgroup network with Internet enabled. On one of my PC running Windows 10 Pro 64 bit, I want to block all incoming and outgoing... Discussion in 'AntiVirus, Firewalls and System Security' started by Zaheer Ahmed info, Jun 30, 2020.

  1. Block all in/out traffic except to a single IP in Windows Defender Firewall


    I have a Private workgroup network with Internet enabled. On one of my PC running Windows 10 Pro 64 bit, I want to block all incoming and outgoing connections both LAN/Internet except to a single PC.
    PC-1 has IP address 192.168.1.100

    PC-2 has IP address 192.168.1.50

    I want to block all traffic on PC-1 except it can send/receive files to PC-2


    What I tried so far is; in windows firewall I made 2 rules in Inbound and Outbound connections. The first rule allows all traffic to 192.168.1.50 and the second rule Block all traffic. But this setting is not working, because while searching I found that block rule takes precedence over allow rule.


    Can anyone help how to setup the rules to achieve the desired behavior.

    :)
     
    Zaheer Ahmed info, Jun 30, 2020
    #1
  2. MadagaC Win User

    Windows 2012 Server - Creating an exception for a block rule in the firewall

    Hy, ya'll!

    I have to deploy a rule to block all outbound traffic towards port TCP 80 regardless of the destination IP, so I set up an outbound "block" rule in the Windows Firewall specifically against that port. it was straightforward and works like a charm. However,
    I can't seem to find a way to add one single IP as an exception to this rule.

    I tried creating a new rule allowing all traffic to the IP I'm attempting to whitelist but, from what I can gather, the blocking rules in the Windows firewall take precedence over "allow" rules so that explains why it didn't work.

    How can I work around this? All I need is to block outgoing traffic to TCP 80 on all but one IP.

    Thanks!
     
    MadagaC, Jun 30, 2020
    #2
  3. harrymc Win User
    How do I configure the Windows firewall to block communication with all except one IP address?

    I would suggest the following approach:

    1. Save the current firewall rules
    2. Set the default outbound firewall policy to block all
    3. Delete all outbound firewall rules
    4. Add a single rule to allow your website

    Below are the directions in detail.

    Save the current firewall rules

    • Start Windows Defender Firewall with Advanced Security
    • Right-click the upper item - Windows Defender Firewall with Advanced Security
    • Select Export Policy...
    • Follow the prompts to save.


    Block all in/out traffic except to a single IP in Windows Defender Firewall 3GC9R.png


    Set the default outbound firewall policy to block all

    • Right-click again the upper item - Windows Defender Firewall with Advanced Security
    • Select Properties
    • Switch Outbound connections from "Allow (default)" to "Block"

      Block all in/out traffic except to a single IP in Windows Defender Firewall QQs4v.png


    Delete all outbound firewall rules

    • Click on Outbound Rules
    • Click on the middle pane on some item to set the focus
    • Type Ctrl+A to select all the rules
    • Right-click any selected rule and choose Delete


    Block all in/out traffic except to a single IP in Windows Defender Firewall EdeY8.jpg


    Add a single rule to allow your website

    • Still in Outbound Rules, click in the Actions pane on *New Rule"
    • Select Custom and Next
    • Leave selected All programs and click Next
    • Leave Protocol Type as Any and click Next
    • In Scope, select These IP addresses:
    • Click Add... and enter the IP address of your website and click OK
    • Click Next
    • Select Allow the connection and click Next
    • Leave all profiles checked and click Next
    • Give a name to your rule and click Finish

    Undoing this configuration

    To return to normal unblocked rules :

    • Start Windows Defender Firewall with Advanced Security
    • Right-click the upper item - Windows Defender Firewall with Advanced Security
    • Select Import Policy... and point to the save file created in the first step.

    You could also save the blocked state, so it may quickly be reset again
    by using the Import Policy command as above.
     
    harrymc, Jun 30, 2020
    #3
  4. Block all in/out traffic except to a single IP in Windows Defender Firewall

    Block All Connection Except One one IP(i.e Facebook)

    I want to block all my inbound and outbound connection from my computer except one IP address(or URL) i.e Facebook.

    I go to "Windows Defender Firewall with Advanced Security" Setting and Created a new Rule to block all connections. Is there any option possible to Block all connections except specific IP/URL? If so, How can I do it?
     
    DeependraDangal, Jun 30, 2020
    #4
Thema:

Block all in/out traffic except to a single IP in Windows Defender Firewall

Loading...
  1. Block all in/out traffic except to a single IP in Windows Defender Firewall - Similar Threads - Block traffic except

  2. Windows Defender Firewall - Program exception

    in Windows 10 Gaming
    Windows Defender Firewall - Program exception: Hi,I am trying to define a program exception in Windows Defender Firewall on clients using a Domain Profile.The program is located on a network share.The problem is that every time the program gets updated the exe-file has a new name.For instance fof20020.exe.I've tried to...
  3. Windows Defender Firewall - Program exception

    in Windows 10 Software and Apps
    Windows Defender Firewall - Program exception: Hi,I am trying to define a program exception in Windows Defender Firewall on clients using a Domain Profile.The program is located on a network share.The problem is that every time the program gets updated the exe-file has a new name.For instance fof20020.exe.I've tried to...
  4. Windows Defender Firewall - Program exception

    in AntiVirus, Firewalls and System Security
    Windows Defender Firewall - Program exception: Hi,I am trying to define a program exception in Windows Defender Firewall on clients using a Domain Profile.The program is located on a network share.The problem is that every time the program gets updated the exe-file has a new name.For instance fof20020.exe.I've tried to...
  5. Exception policy for Windows Defender Firewall

    in Windows 10 Customization
    Exception policy for Windows Defender Firewall: Hello Team,I believe you're doing well & keeping safe.I'm using an RPA tool to send emails to business. Sending email to business via tool is happening for more than 6 months. But all of sudden it has stopped working. We investigated the issue & found access is getting...
  6. Firewall rule(s) to allow all traffic through the firewall?

    in Windows 10 Network and Sharing
    Firewall rule(s) to allow all traffic through the firewall?: I'm tired of seeing the message that my firewall is disabled all the time. Is there a simply rule or rules that I can apply to the firewall that will allow all traffic to flow both ways? I have a hardware firewall that keeps the network safe, so the Windows firewall isn't...
  7. Defender firewall block

    in AntiVirus, Firewalls and System Security
    Defender firewall block: This opened when I logged in: Windows Defender Firewall has blocked some features of SchedulerConsole on all public and private networks. Name: SchedulerConsole Publisher: Unknown Path: C:\program files...
  8. Windows defender firewall blocked app

    in AntiVirus, Firewalls and System Security
    Windows defender firewall blocked app: What does this mean? When I tried opening iTunes on my laptop C:\program files\windowsapps\appleinc.itunes_12096.3.41072.0_x64__nzyj5cx40ttqa\itunes.exe...
  9. Can 'not' block virtualbox traffic with firewall

    in AntiVirus, Firewalls and System Security
    Can 'not' block virtualbox traffic with firewall: I am trying to configure my Windows system such I can block VirtualBox VM traffic to for example the internet but not the local network. That is I have some services on my local network that my VMs must access but I want to block all traffic outside of the local network e.g....
  10. Windows defender firewall is blocking all after cumulative update?

    in Windows 10 Network and Sharing
    Windows defender firewall is blocking all after cumulative update?: Hi all, This started this morning after I let my laptop do it's cumulative update. I don't know if it's relevant, but it had to be updated and restarted twice as the update was still shown as pending after the first update and restart. Model is Acer Helios 300 2017 model....

Users found this page by searching for:

  1. windows firewall allow all traffic except ip

    ,
  2. win block app port except from ip

    ,
  3. retrict app access internet except local lan window

    ,
  4. windows 10 firewall block outbound connections but one ip for application,
  5. how to block all local ip in firewall rule except virtualbox.exe