Skip to content

Instantly share code, notes, and snippets.

View dusanvelickovic's full-sized avatar
🏠
Working from home

Dusan Velickovic dusanvelickovic

🏠
Working from home
  • Nis, Serbia
View GitHub Profile
@kendallroth
kendallroth / forward_wsl2_ports.ps1
Last active October 8, 2025 02:34
Forward WSL2 ports to host
# Forward WSL2 ports to host machine/platform (handles Windows Firewall)
#
# NOTE: 'iex' is a shortform for 'Invoke-Expression'
# Ports that should be forwarded to WSL2 and allowed through firewall (comma-separated)
$ports = @(8081);
# WSL IP address changes whenever WSL restarts
$wsl_ip = $(wsl hostname -I).Trim();