Skip to content

Commit

Permalink
Update readme with guide to add hyper-v firewall rule if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
tjololo committed Feb 5, 2024
1 parent d8fa105 commit cb23b2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,10 @@ if you get a permission denied message this verifies that the bind mount is not

```shell
make podman-selinux-bind-hack
```
```

#### Running Podman on windows with Hyper-V Firewall enabled requires opening port 5005 to the host machine

Check if _local rule merging_ is set to _"No"_ as described [here](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#wsl-has-no-network-connection-on-my-work-machine-or-in-an-enterprise-environment).

If this is the case you can open a Windows Powershell as administrator and run the script `OpenAppPortInHyperVFirewall.ps1` located in the `scripts` folder.
7 changes: 7 additions & 0 deletions scripts/OpenAppPortInHyperVFirewall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$AppPort = 5005
$NetFirewallHyperVName = '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}'

Get-NetFirewallHyperVVMCreator
Get-NetFirewallHyperVVMSetting -PolicyStore ActiveStore -Name $NetFirewallHyperVName
Get-NetFirewallHyperVRule -VMCreatorId $NetFirewallHyperVName
New-NetFirewallHyperVRule -Name Altinn3App -DisplayName "Altinn 3 Application" -Direction Inbound -VMCreatorId $NetFirewallHyperVName -Protocol TCP -LocalPorts $AppPort

0 comments on commit cb23b2d

Please sign in to comment.