FDSN Client query through ssh tunnel

Hi All,

Somewhat of a strange query. I have access to an FDSNWS running behind a firewall. I have ssh access to an ssh gateway, which can see this server, which is running a normal instance of a seiscomp fdsnws.

I’m trying to figure out if I can get myself (and more importantly my python scripts) access to this fdsnws while at home. For instance, if I was to create an SSH tunnel from my machine at home to the gateway assign this to a specific port, can I then direct python to make the obspy http query using this port instead of the default?

Not sure that this is really possible, but wanted to check anyway. I don’t have admin rights on the gateway machine.

Cheers,
Andrew

Hi Andrew,

I did not try this but SSH port forwarding should just work, e.g.
connecting with

ssh -L 1234:address_of_fdsn_server:80 USER@HOST

Should forward port 80 of the fdsnws server to port 1234 on our local
machine and you can then use it with

c = Client("http://localhost:1234")

Hope this helps!

Lion

Thanks Lion,

I’ll give this a try, thank you. Some permutation should hopefully work, depending on our local firewall settings.

Best!
Andrew

Just to follow, that indeed did work.

Thank you!!!

A