xdebug не может соединиться с VSCode

Привет? я с новым вопросом)) Нужно настроить коннект xdebug с VScode. В xdebug конфиги такие (он не в docker):

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.start_with_request = yes
xdebug.discover_client_host = true
xdebug.client_host = 127.0.0.1
xdebug.client_port = 9000
xdebug.idekey = vsc
xdebug.mode = debug
xdebug.trace_output_name = trace.%s.%u
xdebug.profiler_output_name = cachegrind.out.%R.%u
xdebug.output_dir = /tmp
xdebug.log = /var/log/xdebug.log
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.output_dir = /var/www/.xdebug
xdebug.cli_color=1

в VSCode в launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "remote XDebug",
            "type": "php",
            "request": "launch",
            "hostname": "127.0.0.1",
            "port": 9000,
            "pathMappings": {
              "/var/www/crm.itscript.local": "${workspaceRoot}"
            }
        },
    ]
}

В логах ошибка - что не удалось соединится с клиентом, не могу понять почему, если они на одном хосте, что клиент что xdebug!

ERR: Could not connect to debugging client. Tried: 127.0.0.1:9000 (fallback through xdebug.client_host/xdebug.client_port).


Ответы (1 шт):

Автор решения: toorr2p

Решилось добавлением правила в iptables

sudo iptables -I INPUT -p tcp -m tcp --sport 9000 -j ACCEPT
→ Ссылка