How to – use one dynamic portal for whitelisting and have it sync across an entire cluster

How to – use one dynamic portal for whitelisting and have it sync across an entire cluster

Dynamic Portal

How to – use one dynamic portal for whitelisting and have it sync across an entire cluster

This article will go over a method I have recently come up with in order to have your agents sign in through one dynamic portal and have their IP validated across all servers in the cluster.

Step 1 – Generate a SSH key

In your linux cli simply type “ssh-keygen” and just press enter for all default values with no password as shown below

ssh-keygen
ssh-keygen

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.80.121 (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

ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.80.121

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.80.121:/tmp/
  • Vicibox10 users use this one: /usr/bin/rsync -a -e “ssh” /tmp/dynamiclist-add-tmp root@192.168.80.121:/tmp/
/usr/bin/rsync -a -e “ssh” /tmp/dynamiclist-add-tmp root@192.168.80.121:/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 -e “ssh” /tmp/dynamiclist-add-tmp root@192.168.80.120:/tmp/
  • * * * * * /usr/bin/rsync -a -e “ssh” /tmp/dynamiclist-add-tmp root@192.168.80.121:/tmp/

That’s all there is to it, now you can have your agents login through a single dynamic portal and sync it through to all servers in your cluster.

I hope this helps

Chris aka carpenox

Leave a Reply