stechstudio / laravel-ssh-tunnel

Easy creation & maintenance of an SSH Tunnel for Laravel/Lumen
MIT License
191 stars 46 forks source link

Laravel Sail can't bind address. #47

Closed DougThwaites closed 3 years ago

DougThwaites commented 3 years ago

If anyone is having issues when using Laravel Sail and the web docker container (by default the laravel.test container) and you can't bind the local port then here is a solution.

In your .env file add the TUNNELER_SSH_OPTIONS if you haven't already and add the -4 option to force ipv4.

TUNNELER_SSH_OPTIONS="-4 -o StrictHostKeyChecking=no"

Note: There is probably a more docker'e way of doing this by swaping the sail network for a host network or similar but the above works for me so I left it.