Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-general] Ssh tunnel

Expand Messages
  • Marcel Nijenhof
    ... Not the way you want it. ... There is more then one way to do this. It really depends on the software which is running on the slug. 1) Reverse proxy with
    Message 1 of 7 , Jul 22, 2007
    • 0 Attachment
      On Sat, 2007-07-21 at 20:36 +0000, bty597733 wrote:

      > I can access this via the outside world on another port, but I would
      > really like to have the camera's picture seen on my website, hosted
      > on the slug.
      >
      > ...
      >
      > I understand that ssh (already install on my slug) could achieve this
      > via tunnelling. Is this so?

      Not the way you want it.

      > Any idea on how I achieve this?

      There is more then one way to do this.

      It really depends on the software which is running on the slug.

      1) Reverse proxy with apache

      ProxyRequests Off

      <Proxy *>
      Order deny,allow
      Allow from all
      </Proxy>

      ProxyPass /ipcam http://ipcam
      ProxyPassReverse /ipcam http://ipcam

      http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

      2) Using a small php script which accepts the request and
      makes the same request to the camera. The core off such
      a script is something like:
      <?php
      $url = fopen("<url>", "r");
      fpassthru ($url);
      ?>

      3) A dedicated reverse proxy.

      --
      marceln
    • bty597733
      Thanks for the advise. I do have openssh installed, and my web site is running from the built in web server thttpd. Looking through the wiki, could I acheive
      Message 2 of 7 , Jul 22, 2007
      • 0 Attachment
        Thanks for the advise. I do have openssh installed, and my web site
        is running from the built in web server thttpd.

        Looking through the wiki, could I acheive what I'm looking by
        installing nginx, and adding the following lines
        to /opt/nginx/conf/nginx.conf http server section:

        location /camera/ {
        proxy_pass http://192.168.0.5/;
        proxy_redirect default;
        }

        I assume the address http://mywebsite.com/camera would then point to
        the web pages served from the camera on my network. However, would
        this conflict with my current web server?

        With thanks, Jason.

        --- In nslu2-general@yahoogroups.com, Marcel Nijenhof <nslu2@...>
        wrote:
        >
        > On Sat, 2007-07-21 at 20:36 +0000, bty597733 wrote:
        >
        > > I can access this via the outside world on another port, but I
        would
        > > really like to have the camera's picture seen on my website,
        hosted
        > > on the slug.
        > >
        > > ...
        > >
        > > I understand that ssh (already install on my slug) could achieve
        this
        > > via tunnelling. Is this so?
        >
        > Not the way you want it.
        >
        > > Any idea on how I achieve this?
        >
        > There is more then one way to do this.
        >
        > It really depends on the software which is running on the slug.
        >
        > 1) Reverse proxy with apache
        >
        > ProxyRequests Off
        >
        > <Proxy *>
        > Order deny,allow
        > Allow from all
        > </Proxy>
        >
        > ProxyPass /ipcam http://ipcam
        > ProxyPassReverse /ipcam http://ipcam
        >
        > http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
        >
        > 2) Using a small php script which accepts the request and
        > makes the same request to the camera. The core off such
        > a script is something like:
        > <?php
        > $url = fopen("<url>", "r");
        > fpassthru ($url);
        > ?>
        >
        > 3) A dedicated reverse proxy.
        >
        > --
        > marceln
        >
      • Marcel Nijenhof
        ... Yes. That s the dedicated reverse proxy solution. ... Yes. Only one process can listen on a certain port. But you can solve this if you change the port of
        Message 3 of 7 , Jul 22, 2007
        • 0 Attachment
          On Sun, 2007-07-22 at 10:56 +0000, bty597733 wrote:

          > Looking through the wiki, could I acheive what I'm looking by
          > installing nginx, and adding the following lines
          > to /opt/nginx/conf/nginx.conf http server section:
          >
          > location /camera/ {
          > proxy_pass http://192.168.0.5/;
          > proxy_redirect default;
          > }
          >
          > I assume the address http://mywebsite.com/camera would then point to
          > the web pages served from the camera on my network.

          Yes. That's the dedicated reverse proxy solution.

          > However, would this conflict with my current web server?

          Yes. Only one process can listen on a certain port. But you
          can solve this if you change the port of the webserver and
          use the reverse proxy for this webserver as well.

          --
          marceln
        • bty597733
          Thanks for the advise marceln. I see what you mean, I could keep the linksys admin pages running on thttpd on port 8080 (for instance) and have my site runinng
          Message 4 of 7 , Jul 24, 2007
          • 0 Attachment
            Thanks for the advise marceln. I see what you mean, I could keep the
            linksys admin pages running on thttpd on port 8080 (for instance)
            and have my site runinng on nginx onm port 80, and use the reverse
            proxy features to still provide access to the linksys admin pages,
            and my camera.

            A nice solution, but I want to keep the load on my slug to a
            minimum. Is this the only solution, if so is nginx the best option
            to achieve this?

            With thanks, Jason.


            --- In nslu2-general@yahoogroups.com, Marcel Nijenhof <nslu2@...>
            wrote:
            >
            > On Sun, 2007-07-22 at 10:56 +0000, bty597733 wrote:
            >
            > > Looking through the wiki, could I acheive what I'm looking by
            > > installing nginx, and adding the following lines
            > > to /opt/nginx/conf/nginx.conf http server section:
            > >
            > > location /camera/ {
            > > proxy_pass http://192.168.0.5/;
            > > proxy_redirect default;
            > > }
            > >
            > > I assume the address http://mywebsite.com/camera would then
            point to
            > > the web pages served from the camera on my network.
            >
            > Yes. That's the dedicated reverse proxy solution.
            >
            > > However, would this conflict with my current web server?
            >
            > Yes. Only one process can listen on a certain port. But you
            > can solve this if you change the port of the webserver and
            > use the reverse proxy for this webserver as well.
            >
            > --
            > marceln
            >
          • Marcel Nijenhof
            ... Why? I would require it to be fast enough but i really don t care if it would take a few milliseconds extra. The other side is that i don t like to spend a
            Message 5 of 7 , Jul 25, 2007
            • 0 Attachment
              On Tue, 2007-07-24 at 19:16 +0000, bty597733 wrote:

              > A nice solution, but I want to keep the load on my slug to a
              > minimum.

              Why?

              I would require it to be fast enough but i really don't care
              if it would take a few milliseconds extra.

              The other side is that i don't like to spend a few hours
              work on a slug which performs a few milliseconds faster.

              But i really don't know the performance impact for this solution.

              > Is this the only solution,

              No. There are many sollutions.

              A other solution is a cgi script which grabs the
              picture from the webcam and shows it. This is also
              a simple solution with the advantage that you don't
              need to change anything to the webserver.

              The this advantages are:
              - You don't have the direct control to the webcam
              - Access to the webcam will be slower

              > if so is nginx the best option to achieve this?

              I don't know.

              It really depends on lots of factors including
              the expected access to the web pages.

              --
              marceln
            Your message has been successfully submitted and would be delivered to recipients shortly.