You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default ports for the gateway application to serve an HTTP server on (configured in config/default.js) are 8080 and 4443, but when the current Raspbian-based image is built IP tables are configured to forward port 80 to 8080 and port 43 to 443. This is so the gateway application doesn't need to run as root in order to bind to ports 80 and 443.
In the snap package a simple daemon runs as root anyway, so we could just directly bind to port 80 and 443, but the snap needs to be told to do this.
We could either do this by:
Changing the default ports when building the snap package, so it takes effect for everyone who installs the snap
Implement a snap configuration so that a user can set the ports using snap set, and then set a different default using a gadget snap when generating a custom Ubuntu Core OS image
The text was updated successfully, but these errors were encountered:
Have you considered simply doing the same raspbian does, ship a script as oneshot daemon in your snap, that configures iptables the same way as in raspian ? the firewall-control interface should provid all access you need and you'd only need to ship the respective userspace tools (i.e. iptables itself) in your snap ... that way you'd not need to battle with extra patches and the configuration would stay where it is (and be manageable through the existing tools that are already in use for this).
@ogra1 How would I go about shipping the iptables binary and a "one shot daemon" as part of my snap? Do you have an example of something like that?
It might actually be nice for this to be configurable via snap set though, in case someone is installing the snap alongside other web apps which may have conflicting ports. E.g. like the nextcloud snap does.
IIRC the current mechanism to configure the ports the gateway binds to is a configuration file inside the config/ folder in the source directory, which would be immutable inside the built snap.
The default ports for the gateway application to serve an HTTP server on (configured in config/default.js) are 8080 and 4443, but when the current Raspbian-based image is built IP tables are configured to forward port 80 to 8080 and port 43 to 443. This is so the gateway application doesn't need to run as root in order to bind to ports 80 and 443.
In the snap package a simple daemon runs as root anyway, so we could just directly bind to port 80 and 443, but the snap needs to be told to do this.
We could either do this by:
snap set
, and then set a different default using a gadget snap when generating a custom Ubuntu Core OS imageThe text was updated successfully, but these errors were encountered: