---
title: "Discussion on \"Access WSL ports Over Lan\" | Hashnode"
description: "Discussion on \"Access WSL ports Over Lan\". Old way [don't use]\n$remoteport = bash.exe -c \"ip -4 addr show eth0 | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}'\"\n$found = $remoteport -match '\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}';\n\nif( $found ){\n  $remoteport = $matches[0];\n} else{\n  echo \"The Script Exited..."
url: "https://hashnode.com/posts/access-wsl-ports-over-lan/63eb524710bd9b40ef92b4e1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Access WSL ports Over Lan](https://blog.ahmadullah.in/access-wsl-ports-over-lan?utm_source=hashnode&utm_medium=feed)

Old way \[don't use\] $remoteport = bash.exe -c "ip -4 addr show eth0 | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}'" $found = $remoteport -match '\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}'; if( $found ){ $remoteport = $matches\[0\]; } else{ echo "The Script Exited...

Feb 14, 2023 · 1 min read · blog.ahmadullah.in  
Read the article

-   [#wsl](https://hashnode.com/tag/wsl)
-   [#wsl2](https://hashnode.com/tag/wsl2)
-   [#tips-and-tricks](https://hashnode.com/tag/tips-and-tricks)
-   [#tips](https://hashnode.com/tag/tips)

## Written by

[Ahmadullah Mirza](https://hashnode.com/@aumirza)

@aumirza · India

  
[View profile](https://hashnode.com/@aumirza)

Frontend developer, discovering the web.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
