protected static $_farmServers = [
['name' => 'amadeus', 'host' => 'amadeus.cubedesigners.com', 'weight' => 4, 'region' => Region::EUROPE, 'local' => false],
+ ['name' => 'benhur', 'host' => 'amadeus.cubedesigners.com', 'weight' => 8, 'region' => Region::EUROPE, 'local' => false],
['name' => 'cloudatlas', 'host' => 'cloudatlas.cubedesigners.com', 'weight' => 2, 'region' => Region::EUROPE, 'local' => false],
['name' => 'dobermann', 'host' => 'dobermann.cubedesigners.com', 'weight' => 6, 'region' => Region::EUROPE, 'local' => false],
['name' => 'elephantman', 'host' => 'paris.cubedesigners.com', 'weight' => 2, 'region' => Region::EUROPE, 'local' => false],
$blacklist = Text::explodeNewLines($this->blacklist);
$clients = Text::explodeNewLines($this->clients);
$ip = Text::explodeNewLines($this->ip);
- $forceContainers = Text::explodeNewLines($this->docker);
- $excludeContainers = array_merge(['portainer', 'monit'], Text::explodeNewLines($this->docker_restricted));
- $excludeContainers = array_diff($excludeContainers, $forceContainers);
$sshports = [22, 22022, 22822, 22222];
foreach ($servers as $sid => $server) {
+ $forceContainers = Text::explodeNewLines($server['docker']);
+ $excludeContainers = array_merge(['portainer', 'monit'], Text::explodeNewLines($server['docker_restricted']));
+ $excludeContainers = array_diff($excludeContainers, $forceContainers);
+
$fw = '#!/bin/bash' . "\n\n";
$fw .= 'export DEBIAN_FRONTEND=noninteractive' . "\n";
$fw .= '
-skip_containers=(';
+restricted_containers=(';
foreach ($excludeContainers as $excludeContainer) {
$fw .= '"' . $excludeContainer . '" ';
}
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi
ufw deny out 22222
-skip_containers=("portainer" "monit" )
+restricted_containers=("portainer" "monit" )
sudo wget -O /usr/local/bin/ufw-docker https://raw.githubusercontent.com/EnhydraV/ufw-docker/refs/heads/master/ufw-docker
sudo chmod +x /usr/local/bin/ufw-docker
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi
ufw deny out 22222
-skip_containers=("portainer" "monit" )
+restricted_containers=("portainer" "monit" )
sudo wget -O /usr/local/bin/ufw-docker https://raw.githubusercontent.com/EnhydraV/ufw-docker/refs/heads/master/ufw-docker
sudo chmod +x /usr/local/bin/ufw-docker
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi
ufw deny out 22222
-skip_containers=("portainer" "monit" )
+restricted_containers=("portainer" "monit" "satis" "git-daemon" "gitolite" "gitserver-http" )
sudo wget -O /usr/local/bin/ufw-docker https://raw.githubusercontent.com/EnhydraV/ufw-docker/refs/heads/master/ufw-docker
sudo chmod +x /usr/local/bin/ufw-docker
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi
ufw deny out 22222
-skip_containers=("portainer" "monit" )
+restricted_containers=("portainer" "monit" )
sudo wget -O /usr/local/bin/ufw-docker https://raw.githubusercontent.com/EnhydraV/ufw-docker/refs/heads/master/ufw-docker
sudo chmod +x /usr/local/bin/ufw-docker
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi
ufw deny out 22222
-skip_containers=("portainer" "monit" )
+restricted_containers=("portainer" "monit" )
sudo wget -O /usr/local/bin/ufw-docker https://raw.githubusercontent.com/EnhydraV/ufw-docker/refs/heads/master/ufw-docker
sudo chmod +x /usr/local/bin/ufw-docker
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi
ufw deny out 22222
-skip_containers=("portainer" "monit" )
+restricted_containers=("portainer" "monit" )
sudo wget -O /usr/local/bin/ufw-docker https://raw.githubusercontent.com/EnhydraV/ufw-docker/refs/heads/master/ufw-docker
sudo chmod +x /usr/local/bin/ufw-docker
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi
ufw deny out 22222
-skip_containers=("portainer" "monit" )
+restricted_containers=("portainer" "monit" )
sudo wget -O /usr/local/bin/ufw-docker https://raw.githubusercontent.com/EnhydraV/ufw-docker/refs/heads/master/ufw-docker
sudo chmod +x /usr/local/bin/ufw-docker
docker ps --filter publish=1-65535 --filter status=running --format "table {{.Names}}" | tail -n +2 | while read container; do
# Check if the current line is in the skip_lines array
skip=false
- for skip_container in "${skip_containers[@]}"; do
- if [[ "$container" == "$skip_container" ]]; then
+ for restricted_container in "${restricted_containers[@]}"; do
+ if [[ "$container" == "$restricted_container" ]]; then
skip=true
break
fi