Re: [Tails-dev] [review] Run a HTTP server as an Hidden Serv…

Poista viesti

Vastaa
Lähettäjä: sajolida
Päiväys:  
Vastaanottaja: The Tails public development discussion list
Aihe: Re: [Tails-dev] [review] Run a HTTP server as an Hidden Service insideTails.
matsa:
> Tails can be used to run a HTTP server, nginx, as an Hidden Service.
>
> The documentation is available here:
> http://repo.or.cz/w/tails/matsa.git/blob/refs/heads/7879-http-server-with-nginx:/wiki/src/doc/advanced_topics/http_server_with_nginx.mdwn
>
> And the Redmine ticket is there:
> https://labs.riseup.net/code/issues/7879#change-31403
>
> Feedback is welcome!


Thanks for working on this.

I tried to improve your instructions and based my work on lighttpd.

I managed to reduce the lines of code from 43 down to 12.

The tricks are:

- Use the default configuration of lighttpd.
- Add lighttpd to live-additional-software.conf.
- Store the hidden service folder in persistence.
- Store the files in the Persistent folder.

What do you think?

To create the hidden service
============================

echo "lighttpd" >>
/live/persistence/TailsData_unlocked/live-additional-software.conf
echo "/var/www source=Persistent/www" >>
/live/persistence/TailsData_unlocked/persistence.conf
echo "/var/lib/tor/lighttpd source=tor/lighttpd" >>
/live/persistence/TailsData_unlocked/persistence.conf

Reboot and wait for the additional software notification.

chown debian-tor:debian-tor /var/lib/tor/lighttpd
chown amnesia:amnesia /home/amnesia/Persistent/www
chmod 755 /home/amnesia/Persistent/www
echo "HiddenServiceDir /var/lib/tor/lighttpd/" >> /etc/tor/torrc
echo "HiddenServicePort 80" >> /etc/tor/torrc
service tor restart
cat /var/lib/tor/lighttpd/hostname

To reboot
=========

echo "HiddenServiceDir /var/lib/tor/lighttpd/" >> /etc/tor/torrc
echo "HiddenServicePort 80" >> /etc/tor/torrc
service tor restart