Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a program that can communicate over IPv4 (TCP and UDP) and over IPv6 (TCP and UDP). I want to block the program from being able to use IPv4.

I tried the Windows Firewall:

enter image description here

Except it blocks IP sub-protocols (e.g. TCP, UDP, encapsulated IPv6, GRE), rather than blocking IPv4 itself.

In other words, I need to block IPv4:

  • IPv4/TCP
  • IPv4/UDP
  • IPv4/ICMPv4
  • IPv4/GRE
  • IPv4/L2TP

while allowing IPv6:

  • IPv6/TCP
  • IPv6/UDP
  • IPv6/ICMPv6
  • IPv6/GRE
  • IPv6/L2TP

Can I block a program from using IPv4?

Note: If it cannot be done, then don't be afraid to add that as an answer. There's no shame in giving the correct answer to a question.

share|improve this question
What other firewall software have you tested? – Ramhound Nov 19 '12 at 12:48
@Ramhound None; as far as i know Windows only has the one. And i can't do it at the firewall level, because i only want to block one application. – Ian Boyd Nov 19 '12 at 18:37
If you don't want to use IPv4, then just don't give the computer an IPv4 address in the first place. Otherwise, please clarify your question and explain what you're really trying to do. – Michael Hampton Dec 2 '12 at 17:16
@MichaelHampton i want disallow certain programs from using IPv4. The corollary is that other programs i want to (continue) to be allowed to use IPv4. In the case of WoW i want it to only use the faster IPv6 connection. In the case of Flash i want to defeat geolocation. In the case of uTorrent i want to unlink my torrenting from my IPv4 address. In the case of Flash i want to be unblocked because i am in Canada. In the case of Steam i want to test IPv6-only connectivity. In the case of Visual Studio i want to test IPv6 connectivity. i am trying to block programs from using IPv4. – Ian Boyd Dec 2 '12 at 19:18
@MichaelHampton Or perhaps i don't want to do any of those things, and i am asking on behalf of a friend. Perhaps i'm writing a book. Perhaps i'm trying to further the knowledge of all man-kind. Pick whatever situation you like that will help convince you to answer the question. – Ian Boyd Dec 2 '12 at 19:19
up vote 1 down vote accepted

There's no way to do this with the Windows Firewall unless the client itself supports it. Most applications will use RFC 3484 to determine the best protocol to use if they are both available. A good explanation:

How do client applications know to use IPv4 or IPv6?

Your options would be either:

  • Force the protocol if the application supports doing so (eg. uTorrent supports IPV6-only mode)
  • Using a third party firewall that supports protocol preference per-application.
  • Using a third party firewall that supports protocol preference based on the port.

This is an unusual requirement, so I don't know of any third party firewalls off-hand that support it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.