18 lines
764 B
Bash
18 lines
764 B
Bash
#!/bin/sh
|
|
# Run as root on the host. Installs only the reviewed 1C egress policy.
|
|
set -eu
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
echo "Run this script as root from the VPS provider console." >&2
|
|
exit 1
|
|
fi
|
|
DEPLOY=/home/mikail/dana-medical/deploy
|
|
/bin/sh "$DEPLOY/firewall-1c-egress.sh"
|
|
install -o root -g root -m 0644 "$DEPLOY/dana-1c-egress.service" /etc/systemd/system/dana-1c-egress.service
|
|
systemctl daemon-reload
|
|
systemctl enable --now dana-1c-egress.service
|
|
systemctl is-enabled dana-1c-egress.service
|
|
systemctl is-active dana-1c-egress.service
|
|
iptables -C DOCKER-USER -s 172.20.0.50 -d 10.240.70.70 -p tcp --dport 6003 -j ACCEPT
|
|
iptables -C DOCKER-USER -d 10.240.70.70 -j DROP
|
|
echo '1C firewall and systemd persistence installed. Run the egress probes next.'
|