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

Re: [nslu2-general] Ssh tunnel

Expand Messages
  • Mike (mwester)
    You ll need to make sure that you are using openssh on the slug. Everthing else that you need to do to make this work is generic SSH stuff -- check your SSH
    Message 1 of 7 , Jul 21, 2007
    • 0 Attachment
      You'll need to make sure that you are using openssh on the slug.

      Everthing else that you need to do to make this work is generic SSH stuff --
      check your SSH client's documentation for how to set it up, or google for
      ssh tunnels.

      Mike (mwester)

      ----- Original Message -----
      From: "bty597733" <j.wolves@...>
      To: <nslu2-general@yahoogroups.com>
      Sent: Saturday, July 21, 2007 3:36 PM
      Subject: [nslu2-general] Ssh tunnel


      I have one last request of my slug. my web site is now running on my
      slug, and I can access it from the outside world and my router uses
      dyndns to forward port 80 to my nslu2. However, on my network I also
      have a linksys WVC200 wireless ip camera. 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 (primarily as
      all other ports are blocked from my security obsessed workplace).

      I understand that ssh (already install on my slug) could achieve this
      via tunnelling. Is this so? My nslu2 is on 192.168.0.3 on my networks,
      while the camera is on 192.168.0.5. I need to be able to reference the
      web page served from the camera via the web pages on my slug?

      Any idea on how I achieve this?

      Many thanks, Jason.
    • 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 2 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 3 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 4 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 5 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 6 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.