Nginx shellinabox proxy_pass

  • Hello,


    I am trying to get nginx to work with shellinabox. I guess what I am really having trouble with is proxy_pass, such that when I enter the URL;

    Code
    http://mydomain/shell


    It loads the shellinabox page from port 4200. I used to have this working with Apache but cannot figure it out with Nginx.


    At present I have created a server block which I have been playing around with, but I havent been able to get any response from it;


    The reason I need this is because my office blocks port 6789 . . . . so I need to access it through the /shell sub URL if I want to access my CLI from work - which I don sometimes if things go wrong.


    Does anyone have a solution for this?


    C

  • Thanks for the response. I had seen, read and played around with the ideas in your post but without success. I just had a bit of a play around again with to dig into the problem a bit further.


    I can specify 1 x server block, for example, shellinabox and get this to work. When I then specify another, for example, nzbget then nzbget will work but shellinabox will not. Looking at the logs leads me to believe that the server blocks Im specifying are conflicting with each other. I see error messages like;

    Code
    2014/10/12 16:31:59 [error] 4808#0: *4 open() "/var/www/shell" failed (2: No such file or directory), client: 192.168.2.3, server: rutorrent, request: "GET /shell HTTP$l HTTP/1.1", host: "192.168.2.20"


    Which shows that the rutorrent server block is trying to resolve for http://mydomain/shell (i.e. shellinabox)???


    Here is the rutorrent server block (which is working) is there something I cant see in it that is specifying it to be a default for other server blocks?



    In my sites-enabled I have the following files; default, openmediavault-webgui, rutorrent, shell, nzbget. I can only get one of rutorrent, shell, nzbget to go at any given time. . . . i.e. I need to un-symlink rutorrent and nzbget to get shell to work etc.


    Very confused.


    C

  • Reverse Proxy Pass hmmm.... He wants remote access. You think this is best idea on port 80 for something that should be secure like Shellinabox. I think this is really bad idea. Use one of the openvpn plugins to get in his home network and then access shellinabox normally or with a nginx redirect.

    • Offizieller Beitrag

    Didn't see that. Usually mydomain for me is OMV hostname lan :)
    @tekkb is right, you better secure that, don't leave that login without key authentication. If you have high port filtering firewall at work, set the ssh access to OMV through the dport 80 or 443 (if you're not using it) in your router and fwd it to 22 in OMV. You can try also dport 90 110(pop mail if I remember) or any of the other standard ones.

  • Accessing shellinabox via Port 80 from the Internet? We got a badass over here...


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!