treeherder/docs
Ed Morley 4735e9d434 Bug 1362443 - Vagrant: Replace varnish with iptables rule
By default webservers like Django's runserver, gunicorn or the
Webpack devserver only bind to the loopback adapter (127.0.0.1) and
so are not accessible from outside the Vagrant / virtualbox VM,
since port forwarding only forwards traffic to the non-loopback
adapters.

Previously varnish (which listened on `0.0.0.0`) was reverse
proxying traffic to runserver/gunicorn, however we need to now do so
for webpack-dev-server on another port too. Doing both with varnish
adds complexity, and we don't actually need any of varnish's other
features, so ideally want to stop using it.

Rather than having to override each webserver to bind to all
adapters (using the IP `0.0.0.0`), it's possible to forward traffic
to the loopback adapter using iptables NAT PREROUTING rules. This
is still secure so long as the Vagrantfile port forwarding uses a
`host_ip` of `127.0.0.1`. To prevent this "Martian packet" traffic
from being blocked, `route_localnet` must also be set to `1`. See:
https://unix.stackexchange.com/questions/111433/iptables-redirect-outside-requests-to-127-0-0-1

By default neither sysctl or iptables settings are persisted across
reboots, and fixing that requires more complexity (eg installing the
iptables-persistent package and handling config changes during
provision). As such, it's just easier to re-run the commands on each
login since they take <30ms.
2017-05-06 17:32:41 +01:00
..
ui Bug 1168117 - Remove support for defining the API URL via local.conf.js 2017-04-28 00:44:24 +01:00
Makefile Add autobuild target for docs makefile 2016-05-31 15:34:26 -04:00
admin.rst Bug 1345220 - Docs: Update read-only replica GRANTs for new tables 2017-03-07 19:58:55 +00:00
code_style.rst Bug 1348375 - Stop using a wildcard import in treeherder.client 2017-03-20 13:18:20 +00:00
common_tasks.rst Bug 1168117 - Remove support for defining the API URL via local.conf.js 2017-04-28 00:44:24 +01:00
conf.py Bug 1339157 - Remove the RTD copyright year 2017-02-15 10:14:04 +00:00
data_validation.rst Docs: Fixes for code example in data validation section (#1684) 2016-07-13 15:45:06 -04:00
dataload.rst Revert "Bug 1333079 - Switch to new style Celery setting names" 2017-02-01 16:28:55 +00:00
deployment.rst Bug 1336556 - Replace grunt build system with neutrino/webpack 2017-03-29 22:07:24 +01:00
index.rst Bug 1306709 - Add SETA to Treeherder 2017-01-05 14:33:55 -05:00
installation.rst Moved the methods of submitting data beneath the top level heading (#2327) 2017-04-07 09:18:26 -07:00
list_of_services.rst Bug 1362443 - Vagrant: Replace varnish with iptables rule 2017-05-06 17:32:41 +01:00
pulseload.rst Bug 1318021 - Vagrant: Remove support for settings_local.py 2016-11-29 19:18:16 +00:00
rest_api.rst Bug 1318794 - Fix docs User-Agent example (#1987) 2016-11-21 15:42:28 +00:00
retrieving_data.rst Bug 1279213 - Python client: Combine host and protocol into server_url 2016-06-23 09:47:46 +01:00
seta.rst Bug 1306709 - Add SETA to Treeherder 2017-01-05 14:33:55 -05:00
submitting_data.rst Bug 1306844 - Remove support for submitting pushes via the REST API 2017-04-24 10:50:31 +01:00
testcases.rst Bug 1273034 - Transition to Taskcluster Auth from Persona (#1922) 2016-11-18 10:54:48 -08:00
troubleshooting.rst Bug 1353807 - Remove celerybeat-schedule during provision 2017-04-19 00:49:15 +01:00