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 is blocking printing

    in Windows 10 Network and Sharing
    Windows Defender Firewall is blocking printing: I have a Canon LBP 5050N printer on my LAN at a fixed IP address 192.168.0.10. This is a new PC running Windows 10 Build 19041 i.e. the latest, May edition. Windows Defender Firewall is blocking printing. If I turn WDF off for private networks, printing operates. I've...
  3. 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...
  4. 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...
  5. 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....
  6. Block All Connection Except One one IP(i.e Facebook)

    in Windows 10 Network and Sharing
    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...
  7. 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....
  8. [ Windows Firewall ] Cant block incoming connections by IP

    in AntiVirus, Firewalls and System Security
    [ Windows Firewall ] Cant block incoming connections by IP: I'm trying to block incoming connections for specific IP addresses. But any inbound rules doesn't work. Even if I remove all inbound rules remote computer can still connect. Here is what I did: 1- I defined a rule to allow all incoming connections. Rule settings as...
  9. [ Windows Firewall ] Cant block incoming connections by IP

    in Windows 10 Network and Sharing
    [ Windows Firewall ] Cant block incoming connections by IP: I'm trying to block incoming connections for specific IP addresses. But any inbound rules doesn't work. Even if I remove all inbound rules remote computer can still connect. Here is what I did: 1- I defined a rule to allow all incoming connections. Rule settings as...
  10. firewall rule to block addresses NOT on an IP list?

    in Windows 10 Network and Sharing
    firewall rule to block addresses NOT on an IP list?: I am just starting to learn the Windows Firewall (working on both Windows 7 and 10) and I'm not impressed with the inflexibility of its rules. I would like to know if 1. Is there is a way to do what I want with Windows Firewall? 2. Is there is a third-party firewall...