Development discussion of WireGuard
 help / color / mirror / Atom feed
From: enlight <enlight@riseup.net>
To: "wireguard@lists.zx2c4.com" <wireguard@lists.zx2c4.com>
Subject: [question] wireguard-windows wfp issue
Date: Sun, 12 Jun 2022 21:34:08 +0000	[thread overview]
Message-ID: <em1e5036cb-2ace-44db-80c1-23772d981c13@8507782e.com> (raw)

Hello,

when enabling wireguard kill-switch, it creates aggressive wireguard 
firewall rule on windows, it creates rule on windows filtering platform 
(WFP).  The rule is to block all inbound/outbound traffic not for or 
from wireguard interface.

i want to modify current wireguard wfp rule to premit inbound/outbout 
traffic to additional interfaces,  like vmware interface. There are 
several network interfaces in my system active, like "Yggdrasil" -> 
adapter name in Network and sharing center (it uses wintun driver to 
create).

I tried to modify "wireguard-windows/tunnel/firewall/blocker.go"  inside 
EnableFirewall( ) to add:
```
var adapter *driver.Adapter
var luid2 winipcfg.LUID

adapter, err = driver.OpenAdapter("Yggdrasil")  -> gives error here
luid2 = adapter.LUID()
err = permitTunInterface(session, baseObjects, 12, uint64(luid2))
```

the error is: ```Failed to find matching adapter name: Element not 
found. (Code 0x00000490)
Unable to enable firewall rules: Firewall error at 
golang.zx2c4.com/wireguard/windows/tunnel/firewall/blocker.go:148: 
Element not found.```

how can i solve the issue ?


                 reply	other threads:[~2022-06-17 11:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=em1e5036cb-2ace-44db-80c1-23772d981c13@8507782e.com \
    --to=enlight@riseup.net \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).