This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #RFC 3947 ==> https://datatracker.ietf.org/doc/rfc3947/?include_text=1 | |
| echo -n Please type the Shared Key: | |
| read sharedKey | |
| echo $sharedKey | |
| activeInterface=$(ip route get 8.8.8.8 | awk '{print $5; exit}') | |
| activeSubnet=$(ip route | grep $activeInterface | grep kernel | awk '{print $1; exit}') | |
| leftip=$(ip route | grep $activeInterface | grep kernel | awk '{print $9; exit}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| az network public-ip list --resource-group GW4 | jq -r '.[].ipAddress' | sed /null/d | |
| az network vnet-gateway list --resource-group GW4 | jq -r ".[].id | |
| az network public-ip list --resource-group GW4 | jq 'if (.[].id=="/subscriptions/7638783c-a1ee-47d6-a06e-cba7ffd4d6bb/resourceGroups/GW4/providers/Microsoft.Network/publicIPAddresses/GW4-IP") then .[].ipAddress else null end' | |
| #Get the IP Address from a AZR VPN Gateway | |
| id=$(az network vnet-gateway list --resource-group GW4 | jq -r '.[].ipConfigurations[].publicIpAddress.id') | |
| ip=$(az network public-ip list --resource-group GW4 | jq -r '.[] | select(.id=="'$id'") | .ipAddress') | |
| sed -e "s/right=[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/right=$ip/" ./ipsec.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Adapted from https://gist.github.com/tugberkugurlu/11212976 | |
| #Used in ARM template deployment | |
| configuration MongoDB { | |
| #param ( | |
| # [string[]]$ComputerName = $env:ComputerName | |
| #) | |
| Import-DSCResource -ModuleName xDisk | |
| Import-DSCResource -ModuleName cDisk |
NewerOlder