Friday, February 16, 2018

Azure VPN Gateway with Cisco ASA using Routing

When we configure the Azure VPN Gateway with Cisco ASA there will be issue realted to routing type so we need to enable UsePolicyBasedTrafficSelectors in the Azure Connection to Solve the issue .



$RG1          = "****************"
$Connection16 = "****************"

$connection6  = Get-AzureRmVirtualNetworkGatewayConnection -Name $Connection16 -ResourceGroupName $RG1

$newpolicy6   = New-AzureRmIpsecPolicy -IkeEncryption AES256 -IkeIntegrity SHA384 -DhGroup DHGroup24 -IpsecEncryption AES256 -IpsecIntegrity SHA1 -PfsGroup PFS24 -SALifeTimeSeconds 28800 -SADataSizeKilobytes 4608000


Set-AzureRmVirtualNetworkGatewayConnection -VirtualNetworkGatewayConnection $connection6 -IpsecPolicies $newpolicy6



Set-AzureRmVirtualNetworkGatewayConnection -VirtualNetworkGatewayConnection $connection6 -IpsecPolicies $newpolicy6 -UsePolicyBasedTrafficSelectors $True



PS Azure:\> $connection6.UsePolicyBasedTrafficSelectors

True

Azure:\



PS Azure:\> $connection6.IpsecPolicies

Docker Management using Portainer

mkdir -p /mnt/docker
yum install -y rsync


* * * * * rsync -avzh /mnt/docker/ root@dm01:/mnt/docker/
* * * * * rsync -avzh /mnt/docker/ root@dm02:/mnt/docker/
* * * * * rsync -avzh /mnt/docker/ root@dm03:/mnt/docker/
* * * * * rsync -avzh /mnt/docker/ root@dm04:/mnt/docker/
~                                                          


Install Portainer with a persistent container
Code:
mkdir -p /mnt/docker/portainer/data


docker pull portainer/portainer
docker service create \
    --name portainer \
    --publish 9090:9000 \
    --constraint 'node.role == manager' \
    --mount type=bind,src=/mnt/shared/portainer,dst=/data \
    --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
    portainer/portainer \
   -H unix:///var/run/docker.sock

[root@dm01 ~]#