From: Kristof Provost Date: Sun, 14 Apr 2024 14:15:17 +0000 (+0200) Subject: Set HTTP forwarding ports X-Git-Url: https://git.sigsegv.be/?a=commitdiff_plain;h=379fc0236d43ed5fb78fa950df42a2cb950cccb6;p=pennestraat-domotica Set HTTP forwarding ports Open a port for HTTP forwarding, so kosmos can terminate https traffic and forward things to the appropriate devices. --- diff --git a/ansible/inventory.yaml b/ansible/inventory.yaml index 7c1dcfe..37855e5 100644 --- a/ansible/inventory.yaml +++ b/ansible/inventory.yaml @@ -3,18 +3,22 @@ domoticamachines: qemu: control_port: 2400 ansible_port: 2400 + http_port: 2480 ansible_host: kosmos.sigsegv.be pennestraat20: control_port: 2401 ansible_port: 2401 + http_port: 2481 ansible_host: kosmos.sigsegv.be pennestraat22: control_port: 2402 ansible_port: 2402 + http_port: 2482 ansible_host: kosmos.sigsegv.be pennestraat22a: control_port: 2403 ansible_port: 2403 + http_port: 2483 ansible_host: kosmos.sigsegv.be initial: diff --git a/ansible/playbook-pull.yaml b/ansible/playbook-pull.yaml index 32606f0..7ce3aa3 100644 --- a/ansible/playbook-pull.yaml +++ b/ansible/playbook-pull.yaml @@ -12,6 +12,10 @@ community.general.sysrc: name: control_port value: "{{ control_port }}" + - name: http port + community.general.sysrc: + name: http_port + value: "{{ http_port }}" - name: Install nginx community.general.pkgng: name: nginx diff --git a/image/overlay/domotica/etc/rc.d/autossh b/image/overlay/domotica/etc/rc.d/autossh index 479e4d2..cb550a0 100755 --- a/image/overlay/domotica/etc/rc.d/autossh +++ b/image/overlay/domotica/etc/rc.d/autossh @@ -19,6 +19,7 @@ autossh_start() /usr/local/bin/sudo -u kp \ /usr/local/bin/tmux new-session -d \ "autossh -M 0 -p 2207 -N -R ${control_port}:localhost:22 \ + -R ${http_port}:localhost:80 \ -o ExitOnForwardFailure=yes \ domotica@kosmos.sigsegv.be" }