Possible to pass an already opened socket-instance to firefox?

Ajay Garg ajaygargnsit at gmail.com
Sat Mar 25 13:52:55 UTC 2017


https://superuser.com/questions/588591/how-to-make-ssh-tunnel-open-to-public
did it !!!


Sorry for the trouble.
Bigggggggg Thanks for all the help !!


Thanks and Regards,
Ajay

On Sat, Mar 25, 2017 at 7:12 PM, Ajay Garg <ajaygargnsit at gmail.com> wrote:

> Update ::
>
> Seems some issue at the level of ssh-tunneling itself.
>
>
> On Machine-1, following works (as already stated) ::
>          wget localhost:9001/1.txt
>
> but following does not ::
>          wget 1.2.3.4:9001/1.txt
>
>
>
> Also, doing netstat -an on Machine-1 shows the following ::
>
> root at proxy:~# netstat -an | grep LISTEN
> tcp        0      0 127.0.0.1:9001          0.0.0.0:*
> LISTEN
> tcp        0      0 0.0.0.0:22              0.0.0.0:*
> LISTEN
> tcp6       0      0 ::1:9001                :::*
> LISTEN
> tcp6       0      0 :::22                   :::*                    LISTEN
>
>
> Seems ssh-reverse-tunnelling just allows tunnelling on the
> localhost-loopback :(
>
> Investigating ....
>
> On Sat, Mar 25, 2017 at 6:53 PM, Ajay Garg <ajaygargnsit at gmail.com> wrote:
>
>> Thanks Eric for the help ... SSH (reverse-)tunnelling is indeed the way
>> to go.
>> However, I am stuck at the last mile (at FIrefox level it seems).
>>
>>
>> Following is what I have done.
>>
>> Architecture is
>>
>>     Machine-1 <==> Machine-2 <==> Machine-3.
>>
>> * Let Machine-1 public-IP be 1.2.3.4
>> * Let Machine-3 local IP be 5.6.7.8
>> * Machine-1 and Machine-3 are both accessible from Machine-2.
>>
>>
>> a)
>> Machine-3 has a local http-server running, with a resource
>> localhost/1.txt accessible.
>>
>> b)
>> I did the following on Machine-2 ::
>>
>>          ssh -R 9001:5.6.7.8:80 1.2.3.4
>>
>> c)
>> Thereafter, following works perfect on Machine-1 ::
>>
>>          wget localhost:9001/1.txt
>>
>> with the resource 1.txt being identical with the one in step a)
>>
>>
>>
>> However, if I use a machine say Machine-4, and enter the URL ::
>>
>>          1.2.3.4:9001/1.txt
>>
>> it says failed to connect.
>>
>>
>> I am guessing something needs to be done in about:config of firefox on
>> Machine-4.
>> Am I correct? If yes, what exactly needs to be changed in the config?
>>
>>
>> Thanks already for your help, will be great to receive some advice on
>> this last issue.
>>
>>
>> Thanks and Regards,
>> Ajay
>>
>>
>>
>>
>> On Sat, Mar 25, 2017 at 3:22 AM, Eric Rescorla <ekr at rtfm.com> wrote:
>>
>>> To the best of my knowledge, there is no way to do this.
>>>
>>> Generally, if you want to do something like this, you set up an SSH
>>> tunnel or the like.
>>>
>>> -Ekr
>>>
>>>
>>> On Fri, Mar 24, 2017 at 12:53 AM, Ajay Garg <ajaygargnsit at gmail.com>
>>> wrote:
>>>
>>>> Hi All.
>>>>
>>>> I am wishing to communicate between Machine-1 and Machine-2.
>>>>
>>>> Machine-1 has a public-IP, whereas Machine-2 does not.
>>>> Machine-1 is the client, while Machine-2 runs a web-server.
>>>>
>>>> So, a normal http://Machine-2/path/to/stuff cannot be used from a
>>>> browser in Machine-1, because Machine-2 does not have a public-IP.
>>>> But, a normal TCP socket can be created *from* Machine-2, using
>>>> Machine-1's public IP.
>>>>
>>>> So, can this socket be somehow passed to firefox on Machine-1?
>>>> This way, firefox DOES NOT create the initiating TCP-connection
>>>> (instead using the passed socket), and thereafter begins passing/receiving
>>>> the HTTP requests/responses as usual.
>>>>
>>>>
>>>> Do I make sense in my query?
>>>> If yes, is it possible of what we desire?
>>>>
>>>>
>>>> Will be great to listen back from the experts !!
>>>>
>>>>
>>>> Thanks and Regards,
>>>> Ajay
>>>>
>>>> _______________________________________________
>>>> firefox-dev mailing list
>>>> firefox-dev at mozilla.org
>>>> https://mail.mozilla.org/listinfo/firefox-dev
>>>>
>>>>
>>>
>>
>>
>> --
>> Regards,
>> Ajay
>>
>
>
>
> --
> Regards,
> Ajay
>



-- 
Regards,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20170325/bd0003d3/attachment.html>


More information about the firefox-dev mailing list