65 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
f2a4ffe394 firewall: Make default zone as 'external'
Set the default firewall zone.  When network connections are configured
outside of FreedomBox/Plinth, they will not be able to serve the Plinth
web interface.  This is because all such interfaces will fall in the
default firewall zone and that is, by default, 'public'.  On 'public'
zone we don't allow Plinth web interface as this zone is not managed.

Configuration of network connections happen outside for
FreedomBox/Plinth for various reasons:

 - Existing network connections before installation of freedombox-setup

 - Connections configured in /etc/network/interfaces

 - Connections manually configured using nmtui

 - Connections created using GUI environments such as GNOME

Rather then clearing out /etc/network/interfaces during setup and
expecting the connections not to be created outside of Plinth, setting
the default firewall zone is a better approach.  This default zone
selection fits with the main purpose of FreedomBox to be a router which
is also reflected by the fact that only 'external'
2015-12-03 18:25:37 -05:00
Joel Valleroy
eca36e6f96 add power module with reboot and shut down 2015-11-26 16:29:38 -05:00
James Valleroy
e0bfd1401f Name Services module 2015-11-25 15:22:27 +01:00
James Valleroy
903a11824e Merge pull request #265 from fonfon/restore
Added reStore module/application
2015-11-04 08:00:55 -05:00
Sunil Mohan Adapa
646763ff3c openvpn: New module VPN into FreedomBox
- Authentication using client certificates.  Extra password based
  authentication for later.

- Auto setup of CA, server and client certificates.

- Provides a .ovpn profile for each user for easy setup.

- Use 4096 bit Diffie-Hellman parameters for better security.  If this
  takes to much time, reduce it to 2048 or 1024, at least during
  debugging.
2015-11-03 20:24:40 -05:00
fonfon
125cb88336 Removed cfg.product_name entry and tests
The name 'Plinth' (cfg.product_name) is not used anymore after my previous
commits.
Reason for the complete removal: I do not think that users should know or have
to care about the internal name of the web interface of the FreedomBox.
2015-10-28 19:52:14 -04:00
fonfon
be325f8879 added reStore module 2015-10-21 11:54:34 +00:00
Sean Alexandre
e6f7e6020f Adds Service Discovery module
Resolves issue https://github.com/freedombox/Plinth/issues/231
"Option to disable avahi-daemon"
2015-10-07 01:10:53 +05:30
Sean Alexandre
1f183bf997 Changes Apache conf files to use new mod_authz_host syntax instead of Allow/Deny
Resolves Issue https://github.com/freedombox/Plinth/issues/171
"Update Apache auth config directives"
2015-09-29 19:28:50 -04:00
Sunil Mohan Adapa
b63ec9bffc Update the main config file too for danube_edition 2015-09-29 22:38:25 +05:30
James Valleroy
cdda77b3b4 Apply workaround to SSL config for mod_gnutls
HTTPS environmental variable is not set properly by mod_gnutls.
2015-09-20 12:09:09 +05:30
Sunil Mohan Adapa
1c046d0ece firewall: Remove assigning zones to interfaces
This is now properly handled by freedombox-setup network scripts.  There
is no need to set it up here.  Also there is chance they might by
configured wrong.
2015-09-02 19:48:35 -04:00
Sunil Mohan Adapa
100f8392e3 Fix issue with Apache configuration
I faced a situation that on my localhost resolved to an IPv6 address and
Apache was unable to connect to Plinth as Plinth does not yet listen on
IPv6 address.  It is best to change this to an explict local IP address
at least until Plinth listens on IPv6 address.
2015-09-02 19:40:54 -04:00
Sunil Mohan Adapa
28f84ad0b1 datetime: New module for date & time operations
- Enable/disable ntpd from this module.  Since ntpd has implications on
  anonymity.

- Implement NTP diagonstics from freedombox-setup.

- Eventually provide ability to set date & time of the system.

- Eventually move timezone configuration to this module.
2015-08-29 10:32:14 -04:00
James Valleroy
4458a6537d Add Bookmarks (Shaarli) module. 2015-08-23 16:43:13 +05:30
Sunil Mohan Adapa
05ef2921db package: Remove package module
- It does not work on all the modules available.

- It does not reload Plinth after changes.

- As of now, there is not strong case for disabling modules in Plinth
  making it unnecessary UI complication.

- Split into multiple small Debian packages is not yet implemented for
  Plinth.  The module expects to work on the Debian modules.  When
  smaller Debian packages are available perhaps we should consider using
  packages.py library instead.
2015-07-28 16:51:19 +05:30
Sunil Mohan Adapa
8c155bfafb ikiwiki: Update LDAP auth configuration
- Make the configuration work for new style user/group structure.
2015-07-26 16:33:06 -04:00
Sunil Mohan Adapa
02269a93cc ikiwiki: Update the LDAP login prompt message 2015-07-18 17:14:05 +05:30
James Valleroy
2c5b829fb0 ikiwiki: Authorize users from admin or wiki group. 2015-07-13 19:50:58 +05:30
James Valleroy
70e0c4f61a ikiwiki: Enable HTTP auth using LDAP. 2015-07-13 19:50:58 +05:30
James Valleroy
7d80c95048 ikiwiki: Fix indentation in setup automators. 2015-07-13 19:50:58 +05:30
James Valleroy
9c717246ee deluge: Install apache conf file during Plinth install. 2015-06-26 17:34:37 +05:30
James Valleroy
be14b49c83 ikiwiki: Install conf files during Plinth install. 2015-06-26 17:34:37 +05:30
Sunil Mohan Adapa
19301e541e roundcube: New app for web based email client 2015-06-07 17:41:51 -04:00
Sunil Mohan Adapa
56c732ab10 privoxy: New web proxy application 2015-05-27 22:46:57 +05:30
James Valleroy
128aa42873 xmpp: Enable jwchat apache conf after install. 2015-05-24 17:25:54 +05:30
James Valleroy
1055787be2 Merge remote-tracking branch 'sunil/network-manager-glib' 2015-05-16 13:18:20 -04:00
James Valleroy
44b045fef7 Merge remote-tracking branch 'fonfon/pagekite-augeas-new' 2015-05-16 10:35:58 -04:00
Sunil Mohan Adapa
51e6aa3df6 deluge: Rename from bittorrent to deluge
- There could be multiple applications for the same functions.  Although
  in the interface we should we show generic names like 'BitTorrent', we
  could use specific names in the backend.

- There is already a bittorrent client: Transmission.
2015-05-10 10:08:06 +05:30
James Valleroy
55a8b445ad Add BitTorrent module (deluge-web). 2015-05-07 19:37:58 +05:30
Sunil Mohan Adapa
ef17bd8306 networks: Use libnm instead of python-networkmanager 2015-05-05 16:00:25 +05:30
fonfon
cf96797040 pagekite action: Use augeas pagekite lens
And allow setting any server as pagekite frontend.
2015-05-03 09:44:45 +02:00
Sunil Mohan Adapa
69adf1cfc5 transmission: Run from behind Apache
- Introduce Apache configuration for plinth.

- Remove Transmission service file for firewalld.

- Enable transmission on install.

- Enable/disable Apache configuration on Transmission on enable/disable.

- Remove IP address whilelisting as 127.0.0.1 is the default setting and
  is sufficient for Apache to reverse proxy.

- Update UI URL.
2015-05-01 19:00:56 +05:30
Sunil Mohan Adapa
f94d0d5414 transmission: New module for BitTorrent downloads 2015-05-01 18:52:17 +05:30
James Valleroy
fbce204180 Add ikiwiki module with initial setup and option to enable site. 2015-04-13 20:43:07 +05:30
Sunil Mohan Adapa
e09018fe9a Fix issues with configuration/parameters loading
- Change default server directory from plinth/ to /plinth as the program
  expects.

- First load the values from configuration file and then override them
  with command line parameters.

- Show default values on the command line help.

- Use configuration file values as default values to command line
  parameters.

- Log the value of script prefix (server_dir) for easy debugging.

- Make sure the server_dir is properly loaded from configuration files.
2015-04-07 22:43:25 +05:30
Sunil Mohan Adapa
2a83f29b8b Add systemd service file
- When running in an environment without systemd, the changes are completely
  ignored.

- When running under systemd, the patch introduces a systemd native service
  file to take advantages of nice feature provided by systemd.

- One of the feature currently taken advantage of is the ability to restart the
  service automatically if it ever crashes or exits with error.

- Another feature is that when we wish to kill Plinth all the processes under
  the cgroup are killed as well.
2015-04-07 22:43:25 +05:30
Sunil Mohan Adapa
6a605f777c network: Disable networks module until python3-networkmanager is available 2015-04-06 22:21:29 +05:30
James Valleroy
9b201a2daf Rename network module to networks.
Move networkmanager helper functions into a new file.
Add some network tests.
2015-04-06 22:21:28 +05:30
James Valleroy
6ad1fb9ce7 Network connection list and delete 2015-04-06 22:21:28 +05:30
Sunil Mohan Adapa
2028a63deb mumble: Add new module for installing, enabling/disabling 2015-03-28 16:02:39 -04:00
James Valleroy
af94194b7a Merge remote-tracking branch 'steglicd/dynamicdns' 2015-03-26 16:02:07 -04:00
James Valleroy
80eff7fd6e Add upgrades module that can run unattended-upgrades. 2015-01-28 19:50:26 +00:00
Daniel Steglich
0f66b22a4a refactored naming from dynamicDNS to lowercase dynamicdns 2015-01-04 18:53:39 +00:00
Daniel Steglich
56208e007d added a module and a action script to manage ez-ipupdate tool, which provides dynamic IP updates to a gnudip dynamic DNS Server 2015-01-04 12:14:23 +00:00
Sunil Mohan Adapa
90203986f2 Remove modules 'expert_mode' and 'lib'.
The login/logout URLs are now in the 'users' module.
2014-12-14 17:26:05 +05:30
Sunil Mohan Adapa
9d6e17660d For SSL redirection, use 301 permanent 2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
e2ca5e0f12 Rewrite Apache configuration files
- Don't hijack the entire SSL site for sake of Plinth.

- Serve both HTTP and HTTPS sites with default configuration.

- plinth-ssl configuration only make SSL compulsory.

- Document modules required for configuration to work properly.

- Don't disable default site during FreedomBox setup run.  This is no
  longer required.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
1b6969a8a6 Rethink how proxied headers are handled
- Request Apache to send X-Forwarded-Proto header.

- Use X-Forwarded-Proto header to understand original protocol
  requested.

- Use X-Forwarded-Host header to understand original host requested.

- Allow any incoming host header so that FreedomBox can have any
  hostname and when user requests for Plint with that hostname, it
  works.

- Don't depend on Apache to rewrite the Location: header.  Instead use
  the original host and original scheme to set proper Location: header.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
eec249d006 Don't preserve Host header during Apache proxying
When Apache proxy forwards a request it usually makes the request to the
backend server with a new Host: header but sends the original host
information using a special header X-FORWARDED-HOST: header.  It is a
common practise.  The backend can be make the choice of which header to
use based on the knowledge that it is running behind a proxy server.

Since hostname of a FreedomBox machine could be anyting and it could
change during the operation of Plinth, having a list of incoming Host:
header values is not going to be easy in Plinth.  If Apache were not to
force override this header, managing list of Host: header values will
become easiler in Plinth.  If Plinth indeed wants to know the original
host name by which user refferred to it, it can use the
X-FORWARDED-HOST: header which is the norm in these situtations.
2014-11-30 15:11:50 +05:30