Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 35 additions & 9 deletions utils/install_openrvdas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1657,28 +1657,49 @@ EOF

###########################################################################
###########################################################################
# CentOS/RHEL ONLY - Set up firewall daemon and open relevant ports
function setup_firewall {
# CentOS/RHEL ONLY - Configure SELinux for OpenRVDAS services
function setup_selinux {
if [ $OS_TYPE == 'MacOS' ] || [ $OS_TYPE == 'Ubuntu' ]; then
echo "No firewall setup on $OS_TYPE"
return
fi

# All this is CentOS/RHEL only
yum install -y firewalld
echo "#####################################################################"
echo "Setting SELINUX permissions and firewall ports"
echo "This could take a while..."
echo "Configuring SELinux permissions for OpenRVDAS"

# The old way of enabling things...
# (sed -i -e 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config) || echo UNABLE TO UPDATE SELINUX! Continuing...

# The new way of more selectively enabling things
# Allow the web server process to make outbound network connections (needed
# for uWSGI/FastAPI to reach the CachedDataServer and other services).
setsebool -P nis_enabled 1
setsebool -P use_nfs_home_dirs 1
setsebool -P httpd_can_network_connect 1
semanage permissive -a httpd_t

# Label the CachedDataServer's fixed port so httpd_t can connect to it.
# Port 8766 is the universal CDS port across all OpenRVDAS installations.
semanage port -a -t http_port_t -p tcp 8766 2>/dev/null || \
semanage port -m -t http_port_t -p tcp 8766

echo "Done configuring SELinux permissions"
}


###########################################################################
###########################################################################
# CentOS/RHEL ONLY - Set up firewall daemon and open relevant ports
function setup_firewall {
if [ $OS_TYPE == 'MacOS' ] || [ $OS_TYPE == 'Ubuntu' ]; then
echo "No firewall setup on $OS_TYPE"
return
fi

# All this is CentOS/RHEL only
yum install -y firewalld
echo "#####################################################################"
echo "Setting up firewall ports"
echo "This could take a while..."

# Set up the firewall and open some holes in it
systemctl enable --now firewalld

Expand Down Expand Up @@ -1713,7 +1734,7 @@ function setup_firewall {
fi

firewall-cmd -q --reload > /dev/null
echo "Done setting SELINUX permissions"
echo "Done setting up firewall"
}


Expand Down Expand Up @@ -2293,6 +2314,11 @@ setup_supervisor

#########################################################################
#########################################################################
# CentOS/RHEL: always configure SELinux regardless of firewall choice.
if [ $OS_TYPE == 'CentOS' ]; then
setup_selinux
fi

# If we've been instructed to set up firewall, do so.
if [ $INSTALL_FIREWALLD == 'yes' ]; then
setup_firewall
Expand Down
2 changes: 1 addition & 1 deletion web_backend
Submodule web_backend updated 1 files
+18 −15 app/api/updates.py
2 changes: 1 addition & 1 deletion web_frontend
Loading