You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.3 KiB

../install/usr/share/swarmlab.io/sec/swarmlab-sec up size=5
../install/usr/share/swarmlab.io/sec/swarmlab-sec login
/*ssh local forwarding*/
{
sudo apt install lynx -y (προγραμμα για link σε ένα host port)
sudo apt install apache2 -y (κατεβασμα apache στον worker που θα κάνει forward)
apache2ctl start (εκκίνηση apache server)
lynx localhost
netstat -antlupe|grep 80
ssh docker@workerforw -L 5000:workerforw:80 (σύνδεση στην υπηρεσία από οποιοδήποτε container)
lynx http://localhost:5000
}
/*ssh remote forwarding*/
{
ssh -R 5000:localhost:80 docker@remotehost (execute at container with service on port 80)
lynx localhost:5000 (execute at remotehost)
}
{
inventory.yml
run.sh
test.yml
} after all clusters' ips are in inventory, we go:
chmod +x ./run.sh
./run.sh
/*shut down cluster*/
../install/usr/share/swarmlab.io/sec/swarmlab-sec down
#in case docker images are full
docker rmi -f $(docker images -a -q)
docker rm -f $(docker container -a -q)
/*fail2ban config*/
{
filter (fail2ban looks for the sshd service)
logpath (stores all authentication attempts made)
maxretry (bans IP after 4 wrong passwords)
bantime (86400 = 1 day)
ignoreip (type sys admin ip here)
}