Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch butterfly server with nginx (reverse proxy conf) #156

Open
SuperB69 opened this issue Oct 30, 2017 · 4 comments
Open

Launch butterfly server with nginx (reverse proxy conf) #156

SuperB69 opened this issue Oct 30, 2017 · 4 comments

Comments

@SuperB69
Copy link

Hi all,

we can read the wiki to launch butterfly.server.py on a server with nginx conf.
But the butterfly service will be launch in --unsecure.
The only security is the .htpasswd but i have this message: "/!\ This session is UNSECURE everyone can access you terminal at: [URL_HERE]"
My question is: how to launch the butterfly server in secure mode with nginx conf?
nano /etc/systemd/system/butterfly.service
at line:
ExecStart=/var/www/rmarron/www/subdomains/butterfly/venv/bin/butterfly.server.py --unsecure --host=127.0.0.1 --login=true
if delete the --unsecure param, the server is inaccessible.

Thx for your help.

@osmarks
Copy link

osmarks commented Oct 30, 2017

There's some parameter like --i-hereby-declare-i-want-no-security-whatsoever.

@SuperB69
Copy link
Author

Yes but it's only to hide the warning message.
But finally it's not secure. If i follow the link for the session, i have access to the session.
The only security is the htpasswd (and it's not enough).

Resume: htpasswd password + link = total control on the terminal and it's bad.

@paradoxxxzero
Copy link
Owner

butterfly in secure mode (default) relies on client certificate authentication (by user) and handle ssl for you.
If you decide to let nginx handle the ssl part you have to run butterfly in unsecure mode (http and no authentication) and yes it's unsecure.

Maybe there's a way to proxy ssl client auth with nginx, I don't know but I'll merge any good PR that fixes this problem and welcome any edits in the wiki that offer a more secure way to use butterfly (which btw has not be made for that) as a ssh server .

#153 should probably also be fixed.

@brtgh
Copy link

brtgh commented Nov 25, 2019

If you decide to let nginx handle the ssl part you have to run butterfly in unsecure mode (http and no authentication) and yes it's unsecure.

In my case its apache instead of nginx.

But why is it considered less secure if apache (or nginx) handles the ssl part?
In the end it's encrypted right?

Working Apache config by kg4iae: #165

And here how I start butterfly behind Apache:
#butterfly.server.py --unsecure --login --i-hereby-declare-i-dont-want-any-security-whatsoever
[W 191125 23:55:45 butterfly.server:384] Butterfly is ready, open your browser to: http://localhost:57575/

For the 'sharing session' feature, is it possible to disable that (apart from just change the motd cosmetically)? Doesn't it imply a dangerous way of being compromised?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants