How to – One dynamic portal for whitelisting and sync across all clusters
Step 1 – Generate a SSH key
type “ssh-keygen” and just press enter for all default values with no password
Step 2 – copy the ssh key to the other servers you need it synced to
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.21 (replace IP with the servers Ip’s as you do each one)
Type yes and then enter the servers root password, do these steps for each server in your cluster
Step 3 – rsync the Dynamic IP firewall list to the other servers
Replace the IP’s with each one in your cluster and repeat this step for each
- Vicibox9 users use this command: /usr/bin/rsync -a -e “ssh” /tmp/VB-DYNAMIC-tmp root@192.168.1.21:/tmp/
- Vicibox10 users use this one: /usr/bin/rsync -a -e “ssh” /tmp/dynamiclist-add-tmp root@192.168.1.22:/tmp/
Deb 11
/usr/bin/rsync -a /tmp/*-tmp root@192.168.1.22:/tmp
Step 4 – Now add a cronjob to have this done every minute with one line for each server as shown below
- ###Dynportal Sync
- * * * * * /usr/bin/rsync -a /tmp/*-tmp root@192.168.1.20:/tmp
- * * * * * /usr/bin/rsync -a /tmp/*-tmp root@192.168.1.21:/tmp
- * * * * * /usr/bin/rsync -a /tmp/*-tmp root@192.168.1.22:/tmp
Comments
Post a Comment