Skip to content

Instantly share code, notes, and snippets.

@axelitus
Last active May 30, 2022 22:08
Show Gist options
  • Save axelitus/6e2a056ae61a82162639d187b6b931ec to your computer and use it in GitHub Desktop.
Save axelitus/6e2a056ae61a82162639d187b6b931ec to your computer and use it in GitHub Desktop.

Revisions

  1. axelitus revised this gist May 30, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion port-exclusions
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ net stop winnat
    netsh int ipv4 add excludedportrange protocol=tcp startport=50000 numberofports=50 # Docker - extend range as needed

    # Laravel Sail services
    netsh int ipv4 add excludedportrange protocol=tcp startport=80 numberofports=10 # Web server
    netsh int ipv4 add excludedportrange protocol=tcp startport=80 numberofports=1 # Web server
    netsh int ipv4 add excludedportrange protocol=tcp startport=3000 numberofports=10 # BrowserSync
    netsh int ipv4 add excludedportrange protocol=tcp startport=3306 numberofports=1 # MySql
    netsh int ipv4 add excludedportrange protocol=tcp startport=6379 numberofports=1 # Redis
  2. axelitus revised this gist May 30, 2022. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion port-exclusions
    Original file line number Diff line number Diff line change
    @@ -7,12 +7,13 @@ net stop winnat
    netsh int ipv4 add excludedportrange protocol=tcp startport=50000 numberofports=50 # Docker - extend range as needed

    # Laravel Sail services
    netsh int ipv4 add excludedportrange protocol=tcp startport=80 numberofports=10 # Web server
    netsh int ipv4 add excludedportrange protocol=tcp startport=3000 numberofports=10 # BrowserSync
    netsh int ipv4 add excludedportrange protocol=tcp startport=3306 numberofports=1 # MySql
    netsh int ipv4 add excludedportrange protocol=tcp startport=6379 numberofports=1 # Redis
    netsh int ipv4 add excludedportrange protocol=tcp startport=1025 numberofports=1 # Mailhog
    netsh int ipv4 add excludedportrange protocol=tcp startport=8025 numberofports=1 # Mailhog Dashboard
    netsh int ipv4 add excludedportrange protocol=tcp startport=8080 numberofports=1 # Web server
    netsh int ipv4 add excludedportrange protocol=tcp startport=8080 numberofports=1 # HotReloading (HMR)


    # Spatie's Ray
  3. axelitus revised this gist May 30, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions port-exclusions
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,8 @@ netsh int ipv4 add excludedportrange protocol=tcp startport=3306 numberofports=1
    netsh int ipv4 add excludedportrange protocol=tcp startport=6379 numberofports=1 # Redis
    netsh int ipv4 add excludedportrange protocol=tcp startport=1025 numberofports=1 # Mailhog
    netsh int ipv4 add excludedportrange protocol=tcp startport=8025 numberofports=1 # Mailhog Dashboard
    netsh int ipv4 add excludedportrange protocol=tcp startport=8080 numberofports=1 # Web server


    # Spatie's Ray
    netsh int ipv4 add excludedportrange protocol=tcp startport=23517 numberofports=1 # Ray - change as needed
  4. axelitus revised this gist Sep 15, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions port-exclusions
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,10 @@ netsh int ipv4 add excludedportrange protocol=tcp startport=8025 numberofports=1
    # Spatie's Ray
    netsh int ipv4 add excludedportrange protocol=tcp startport=23517 numberofports=1 # Ray - change as needed

    # PhpStorm/xDebug
    netsh int ipv4 add excludedportrange protocol=tcp startport=9000 numberofports=1 # xDebug 2
    netsh int ipv4 add excludedportrange protocol=tcp startport=9003 numberofports=1 # xDebug 3

    # Additional useful ports
    netsh int ipv4 add excludedportrange protocol=tcp startport=6000 numberofports=1 # X11

  5. axelitus revised this gist Aug 6, 2021. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions port-exclusions
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,9 @@ netsh int ipv4 add excludedportrange protocol=tcp startport=6379 numberofports=1
    netsh int ipv4 add excludedportrange protocol=tcp startport=1025 numberofports=1 # Mailhog
    netsh int ipv4 add excludedportrange protocol=tcp startport=8025 numberofports=1 # Mailhog Dashboard

    # Spatie's Ray
    netsh int ipv4 add excludedportrange protocol=tcp startport=23517 numberofports=1 # Ray - change as needed

    # Additional useful ports
    netsh int ipv4 add excludedportrange protocol=tcp startport=6000 numberofports=1 # X11

    @@ -23,4 +26,7 @@ netsh int ipv4 add excludedportrange protocol=tcp startport=6991 numberofports=1
    # Start WinNAT
    net start winnat

    # Show excluded ports
    netsh int ipv4 show excludedportrange tcp

    # Best to do: restart Windows
  6. axelitus renamed this gist Aug 4, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. axelitus created this gist Aug 4, 2021.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    # Run commands in an elevated prompt

    # Stop WinNAT
    net stop winnat

    # Docker
    netsh int ipv4 add excludedportrange protocol=tcp startport=50000 numberofports=50 # Docker - extend range as needed

    # Laravel Sail services
    netsh int ipv4 add excludedportrange protocol=tcp startport=3000 numberofports=10 # BrowserSync
    netsh int ipv4 add excludedportrange protocol=tcp startport=3306 numberofports=1 # MySql
    netsh int ipv4 add excludedportrange protocol=tcp startport=6379 numberofports=1 # Redis
    netsh int ipv4 add excludedportrange protocol=tcp startport=1025 numberofports=1 # Mailhog
    netsh int ipv4 add excludedportrange protocol=tcp startport=8025 numberofports=1 # Mailhog Dashboard

    # Additional useful ports
    netsh int ipv4 add excludedportrange protocol=tcp startport=6000 numberofports=1 # X11

    # Other ports
    netsh int ipv4 add excludedportrange protocol=tcp startport=6379 numberofports=1 #
    netsh int ipv4 add excludedportrange protocol=tcp startport=6991 numberofports=1 #

    # Start WinNAT
    net start winnat

    # Best to do: restart Windows