containers/podman-wsl-fedora

Powershell.exe

djarbz opened this issue · 3 comments

Hello,

In a standard WSL2 image I am able to run powershell.exe in the WSL bash terminal in order to interact with the host Powershell.
I am unable to do so from the Fedora image.

This would be useful to allow automated port mapping on the HOST IP to podman services.
I could add the following lines to my service file as ExecStartPost and add the appropriate lines for the ExecStopPost to remove the entries.

netsh interface portproxy add v4tov4 listenport=<HOST PORT> connectport=<PODMAN MACHINE PORT> connectaddress=<PODMAN MACHINE IP>
New-NetFirewallRule -DisplayName "$($RuleName)" -Description "Rule to allow incoming traffic to port proxy to the Podman WSL2 machine instance." -Group "Podman Port Proxy" -Enabled True -Profile Any -Direction Inbound -Action Allow -Protocol TCP -LocalPort <HOST PORT>