View Issue Details

IDProjectCategoryView StatusLast Update
0000499XdebugStep Debuggingpublic2020-03-12 16:57
Reporterrovangju Assigned Toderick  
Status resolvedResolutionno change required 
Product Version2.0.0dev 
Summary0000499: Remote_host and firewalls
DescriptionThere's a fundamental issue with how remote_host works.
In order to trigger the debugger, the scripts must be accessed from that ip.
For networks with firewalls, etc.

It may be prudent to provide a means to provide something to override that behavior to allow redirection to something like an SSH tunnel.
Additional InformationIf you make a tunnel from IDE machine to xdebug server - xdebug must send it's communication through the tunnel and back to the client.

No way to specify without some fancy iptables stuff.
TagsNo tags attached.
Operating SystemAll
PHP Version5.3.0



2009-12-22 00:37

administrator   ~0001201

I am pretty sure that you can do this with just an SSH tunnel:

1. from your local machine: ssh -R 9000:localhost:9000 xdebug-machine
2. configure xdebug on the xdebug-machine as "remote_host=localhost".
3. configure your IDE on your local machine to listen to port 9000 (which should be the default).


2009-12-22 03:48

reporter   ~0001204

Last edited: 2009-12-22 03:51

If you have remote_host=localhost - and have xdebug setup to interact with the ide if you load the page via browser, it won't do that unless you have the actual ip. The tunnel might reach the client, but the session won't get fired off because it's looking for localhost. Inverse, if you have remote_host=<my_ip>, it attmpts to start the debugging session from the browser, but won't connect to the client because it's not tunneled.

best way to explain it would be variables like:
listen_host - listen for a particular ip e.g.
return_host - which could be set to localhost (for the port 9000 communication)


2009-12-22 09:44

administrator   ~0001205

What you say is not true; I just tested this with the following setup:

1. local machine has Komodo running, and listening for debug connections on port 9000
2. ssh -R 9000:localhost:9000
3. in that opened shell:

   export XDEBUG_CONFIG="idekey=dr"
   echo '<?php function foo() { $a = 52; } foo(); echo strlen( "basdfadsf" );?>' > test8234234.php

   php test8234234.php

And I get this connection popping up in Komodo. If there is anything that prevents this from working, it's your IDE.

Issue History

Date Modified Username Field Change
2009-12-16 18:19 rovangju New Issue
2009-12-16 18:19 rovangju Operating System => All
2009-12-16 18:19 rovangju PHP Version => 5.3.0
2009-12-16 18:19 rovangju Xdebug Version => 2.0.5
2009-12-22 00:37 derick Note Added: 0001201
2009-12-22 00:37 derick Status new => feedback
2009-12-22 03:48 rovangju Note Added: 0001204
2009-12-22 03:51 rovangju Note Edited: 0001204
2009-12-22 09:44 derick Note Added: 0001205
2009-12-22 09:44 derick Status feedback => resolved
2009-12-22 09:44 derick Resolution open => no change required
2009-12-22 09:44 derick Assigned To => derick
2020-03-12 16:57 derick Category Feature/Change request => Step Debugging