Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
soletta-dev-app: Add iptables rules to allow access
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bottazzini <[email protected]>
  • Loading branch information
Bruno Bottazzini committed Apr 6, 2016
1 parent a4fe8bf commit 359898b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 5747fcbf6cea42cf53bf4213d8caa40451e09cb6 Mon Sep 17 00:00:00 2001
From: Bruno Bottazzini <[email protected]>
Date: Fri, 18 Mar 2016 10:47:08 -0300
Subject: [PATCH] Add firewall rules to allow access

When running the nodejs server, it needs to allow Soletta Dev-App
to be accessed.

Signed-off-by: Bruno Bottazzini <[email protected]>
---
scripts/units/soletta-dev-app-server.service.in | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/scripts/units/soletta-dev-app-server.service.in b/scripts/units/soletta-dev-app-server.service.in
index b18d1bb..412e618 100644
--- a/scripts/units/soletta-dev-app-server.service.in
+++ b/scripts/units/soletta-dev-app-server.service.in
@@ -3,7 +3,11 @@ Description=Run Soletta Development Application server

[Service]
StandardOutput=null
+ExecStartPre=/usr/sbin/iptables -w -A INPUT -p tcp --dport 80 -j ACCEPT
+ExecStartPre=/usr/sbin/ip6tables -w -A INPUT -p tcp --dport 80 -j ACCEPT
ExecStart=/usr/bin/NODE_BIN_NAME PATH/server/app.js 1> /dev/null 2>&1
+ExecStopPost=/usr/sbin/iptables -w -D INPUT -p tcp --dport 80 -j ACCEPT
+ExecStopPost=/usr/sbin/ip6tables -w -D INPUT -p tcp --dport 80 -j ACCEPT
Environment="NODE_ENV=production"

[Install]
--
2.7.1

6 changes: 6 additions & 0 deletions meta-ostro/recipes-soletta/dev-app/soletta-dev-app_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
# soletta-dev-app-avahi-discover.service.

SYSTEMD_AUTO_ENABLE_${PN} = "disable"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI += " file://0001-Add-firewall-rules-to-allow-access.patch"

RDEPENDS_${PN} += " iptables"

0 comments on commit 359898b

Please sign in to comment.