Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 cannot change firewall network profile #31

Closed
Azuriye opened this issue Jul 28, 2024 · 1 comment
Closed

Windows 11 cannot change firewall network profile #31

Azuriye opened this issue Jul 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Azuriye
Copy link

Azuriye commented Jul 28, 2024

In Windows 11, when starting sing-box with tun adapter it creates tun adapter and gets assigned automatically to Public firewall network making my LAN services (like SSH) unreachable unless I set OpenSSH to Public and Private firewall network. Screenshot below shows tun0 assigned to Public firewall network.

image

OpenSSH firewall default rule is to open up only for Private network unless I set it to Public network in which I can now access my SSH server
image

The issue is similar to this reddit thread:
https://www.reddit.com/r/WireGuard/comments/y8unbd/permanently_set_wireguard_to_private_network_on/

The fix was to run this powershell command
Set-NetConnectionProfile -InterfaceAlias 'tun0' -NetworkCategory 'Private'
(tun0 being the interface name assigned by sing-box)

After every reboot it seems to be properly assigned to Private firewall network but I am not sure if it will stay persistent after changing sing-box versions or Windows OS updates.

Could there be an option so that the user can choose between Domain/Private/Public firewall profiles to assign the tun driver to?
image

@nekohasekai nekohasekai added the bug Something isn't working label Aug 5, 2024
@dyhkwong
Copy link
Contributor

dyhkwong commented Aug 19, 2024

Does #8 help? If you can make permanent changes via powershell it is probably unnecessary? This is also configurable in secpol.msc.
图片

@Azuriye Azuriye closed this as completed Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants