Jump to content

proximagr

Moderators
  • Posts

    2468
  • Joined

  • Last visited

  • Days Won

    12

Blog Entries posted by proximagr

  1. proximagr
    <div class="text geshifilter-text">this is something very common lately and always I follow this post: <a href="http://windowsitpro.com/windows-server-2003-end-support/migrating-dhcp-server-2003-server-2012-r2">http://windowsitpro.com/windows-server-2003-end-support/migrating-dhcp-server-2003-server-2012-r2</a></div>
    <div class="text geshifilter-text"></div>
    <div class="geshifilter">
    <div class="text geshifilter-text">Netsh<br />DHCP<br />Server \<DHCP_2003_Server_IP_Address><br />Export c:export2k3dhcp-database all</div>
    </div>
    <p>Performing this task will create a file in the c:export folder named 2k3dhcp-database</p>
    <p>Copy this file to the computer running Windows Server 2012 R2 that will function as the new DHCP server. You’ll need to install the DHCP server role on this computer and authorize the DHCP server in Active Directory before performing the following actions.</p>
    <p>Open an elevated command prompt and run the following commands (this assumes you’ve copied the file to a folder named c:import)</p>
    <div class="geshifilter">
    <div class="text geshifilter-text">Net stop DHCPserver<br />Del c:windowssystem32DHCPDHCP.mdb<br />Net start DHCPserver<br />Netsh<br />DHCP<br />Server \<DHCP_2012R2_Server_IP_Address><br />Import c:import2k3dhcp-database<br />Exit<br />Net stop DHCPserver<br />Net start DHCPserver</div>
    </div>
    <div class="text geshifilter-text">source: <a href="http://windowsitpro.com/windows-server-2003-end-support/migrating-dhcp-server-2003-server-2012-r2">http://windowsitpro.com/windows-server-2003-end-support/migrating-dhcp-server-2003-server-2012-r2</a></div>
    <p><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fwww.e-apostolidis.gr%2Fmicrosoft%2Fmigrating-dhcp-server-2003-server-2012-r2%2F&linkname=Migrating%20DHCP%20from%20Server%202003%20to%20Server%202012%20R2"title="Email" rel="nofollow" target="_blank"><img src="http://www.e-apostolidis.gr/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_button_print" href="http://www.addtoany.com/add_to/print?linkurl=http%3A%2F%2Fwww.e-apostolidis.gr%2Fmicrosoft%2Fmigrating-dhcp-server-2003-server-2012-r2%2F&linkname=Migrating%20DHCP%20from%20Server%202003%20to%20Server%202012%20R2" title="Print" rel="nofollow" target="_blank"><img src="http://www.e-apostolidis.gr/wp-content/plugins/add-to-any/icons/print.png" width="16" height="16" alt="Print"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share#url=http%3A%2F%2Fwww.e-apostolidis.gr%2Fmicrosoft%2Fmigrating-dhcp-server-2003-server-2012-r2%2F&title=Migrating%20DHCP%20from%20Server%202003%20to%20Server%202012%20R2" id="wpa2a_2"><img src="http://www.e-apostolidis.gr/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>The post <a rel="nofollow" href="http://www.e-apostolidis.gr/microsoft/migrating-dhcp-server-2003-server-2012-r2/">Migrating DHCP from Server 2003 to Server 2012 R2</a> appeared first on <a rel="nofollow" href="http://www.e-apostolidis.gr">Proxima's IT Corner</a>.</p>


    <a href="http://www.e-apostolidis.gr/microsoft/migrating-dhcp-server-2003-server-2012-r2/"class='bbc_url' rel='nofollow external'>Source</a>
  2. proximagr
    Monitor & Alert for your Azure VM
    Lets see how easy it is to monitor and create an alert, in order to be notified when your VMs are restarted, when they start, stop, get high CPU usage, memory and much more.
    First navigate to the Azure Portal https://portal.azure.com, and then click the Monitor button.

    You will be navigated to the Monitor blade. At the center of the screen you will see three mail buttons, each starts a wizard.

    Click the “Create Alert” under the Explore monitoring essentials, the first of the three buttons.

    The create rule wizard will start. First you need to Select target.

    Select the subscription, at the Filter resource type select Virtual machines and select the VM from the Resource list.

    Once you press the target VM you will see a preview of the selection and the available signals.

    After the alert target, select the criteria

    At the configure signal login blade, select the signal from the list. I have selected the Restart Virtual Machine.

    Once you select the signal you can select the severity level and also you will see the preview of the condition.

    After that give a name and a description for the alert. Also select the resource group where the alert will be saved and if you want the alert to be enabled upon creation.

    The next step is to create an action group. The action group is the list of accounts to get the notifications when the alert is triggered. The notification can be email, SMS, Push Notifications and Voice call. You can add many action groups and many action in each group.


    Now the alert is ready. Once the alert is triggered you will be notified. At this example I added an email alert and once the VM restarted I received the following email:

    More Microsoft Azure guides at Apostolidis IT Corner
  3. proximagr
    Monitor & Alert for your Azure VM
    Lets see how easy it is to monitor and create an alert, in order to be notified when your VMs are restarted, when they start, stop, get high CPU usage, memory and much more.
    First navigate to the Azure Portal https://portal.azure.com, and then click the Monitor button.

    You will be navigated to the Monitor blade. At the center of the screen you will see three mail buttons, each starts a wizard.

    Click the “Create Alert” under the Explore monitoring essentials, the first of the three buttons.

    The create rule wizard will start. First you need to Select target.

    Select the subscription, at the Filter resource type select Virtual machines and select the VM from the Resource list.

    Once you press the target VM you will see a preview of the selection and the available signals.

    After the alert target, select the criteria

    At the configure signal login blade, select the signal from the list. I have selected the Restart Virtual Machine.

    Once you select the signal you can select the severity level and also you will see the preview of the condition.

    After that give a name and a description for the alert. Also select the resource group where the alert will be saved and if you want the alert to be enabled upon creation.

    The next step is to create an action group. The action group is the list of accounts to get the notifications when the alert is triggered. The notification can be email, SMS, Push Notifications and Voice call. You can add many action groups and many action in each group.


    Now the alert is ready. Once the alert is triggered you will be notified. At this example I added an email alert and once the VM restarted I received the following email:

    More Microsoft Azure guides at Apostolidis IT Corner
     
    [/url]
    The post Monitor & Alert for your Azure VM appeared first on Apostolidis IT Corner.


    Source
  4. proximagr
    To move a mailbox to Exchange Online from Exchange 2013 first connect Windows PowerShell to Exchange Online with a Global Administrator:
     
    $UserCredential = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/-Credential $UserCredential -Authentication Basic -AllowRedirection
    Import-PSSession $Session
    Provide the on-premise administrator credential
     
    Then connect to the local Exchange 2013:
     
    Run $RemoteCredential= Get-Credential
    Start the move request
     
    Finally initiate the move:
     
    New-MoveRequest -Identity “useralias” -Remote -RemoteHostName “mail.mydomain.com” -TargetDeliveryDomain mydomain.mail.onmicrosoft.com -BadItemLimit 10000 -AcceptLargeDataLoss -RemoteCredential $RemoteCredential
     
    source: http://www.e-apostolidis.gr/microsoft/exchange-2013-online-grand-full-access-to-mailboxes/
  5. proximagr
    Μόλις έλαβα το πρώτο μου Microsoft Azure MVP award!
    Νοιώθω χαρούμενος και περήφανος που η προσπάθεια και η προσφορά μου στην κοινότητα ανταμείβεται. Πιστεύω στην κοινότητα και στον διαμοιρασμό της γνώσης και αυτό με έχει βοηθήσει πολύ στην ζωή μου και και εγώ με τη σειρά μου προσπαθώ να βοηθήσω στο μέγιστο.
    Όλα ξεκινάνε με αυτό το υπέροχο email Congratulations! We are extremely pleased to present you with the 2018-2019 Microsoft Most Valuable Professional (MVP) Award! This award is given to exceptional technical community leaders who share their remarkable passion, real-world knowledge, and technical expertise with others through demonstration of exemplary commitment. We appreciate your outstanding contributions in the Microsoft Azure technical communities during the past year.

    [/url]
    The post My First Microsoft Azure MVP award! appeared first on Apostolidis IT Corner.


    Source
  6. proximagr
    Protect your Web App using Azure Application Gateway Web Application Firewall
    Web Application Firewall was always a big investment for a small or growing company as most of the top branded companies are charging a lot of money A Web Application Firewall protects your application from common web vulnerabilities and exploits like SQL Injection or Cross site scripting. Azure provides enterprise grade Web Application Firewall through the Application Gateway. It comes in two pricing models, Medium and Large. More about sizes and instances you can find here, and more about pricing here
    We can add the Application Gateway Web Application Firewall to protect our Azure Web App (PaaS) and our Web Application inside a VMs web server (IaaS). At this post we will see how to protect them both.

    One difference in order to fully protect the Azure Web App (PaaS) is to create an App Service Environment with internal VIP to host the Web App in order to hide it inside a VNET. First things first, create a VNET with one subnet for the Application Gateway WAF.App Service Environment
    After the VNET create the App Service Environment, from the Azure Portal, New –> App Service Environment and select VIP Type “Internal”. Add it to the VNET created before and create a subnet for the ASE. You need to be patient here because the deploy will take more than an hour, almost two.
    Web App
    As soon as the App Service Environment is ready we can create our Web App. Create a Web App from Azure Portal with one difference, on the App Service Plan location instead of selecting a Region select he App Service Environment.

    As you realize, the Web App resides at the internal VNET with no access from the internet. So, in order to access the application at this point we need a VM ( a small one just to test and deploy our application ). Create a small VM and add it to this VNET. One small detail, in order to be able to browse to the site’s URL we need to enter the FQDN, in our case papwaf3app.funniest.gr. In order to do this we need an entry at the VM’s host file. This way we can access the new born Web App.
    Web Application Firewall
    Lets create the Secure public entry point for our Web App. Create an application gateway, select WAF Tier, select the required SKU, add it to the WAF subnet we created before, select Public IP configuration and WAF enabled.


    When the Application gateway is ready we need to do some configuration. First at the Backend pools, open the default created backend pool add the Internal Load Balancer IP address of the ASE as target.

    Then add a health probe. For host add the FQDN of the Web App.

    at the HTTP settings check the “Use custom probe” and select the previously created probe.

    And that’s all. Now we can try our Web App from the Internet. In order to do so we need to browse to the Web App’s URL, that is now published by the Application Gateway, from the Internet. So, we need to create a Public DNS record to point the FQDN to the Application Gateway’s FQDN. In this case we need to crate a CNAME papwaf3app.funniest.gr to point to the 8b0510c1-47e9-4b94-a0ff-af92e4455840.cloudapp.net. In order to test the app right now we can just add a host file to our computer pointing to the Public IP Address of the application gateway and we can access the Web App behind the WAF.

    Logging
    In order to be able to see the Application Gateway and Web Application Firewall logs we need to turn on diagnostics. The easiest way to see the logs is by sending them to Log Analytics (OMS).



    With the Firewall at “Detection” mode, if we try an SQL Injection (?id=10||UTL_INADDR.GET_HOST_NAME( (SELECT user FROM DUAL) )–), the Web App still servers the landing page.

    By switching the Firewall to “Prevention” mode, the same SQL injection attach stops by the WAF before accessing our Web App.
    Protect an IaaS Web Application
    To add a Web Application that runs inside a VM behind the Application Gateway Web Application Firewall, first add the VM as a Back End Pool. Create a new Backend Pool and select “Virtual Machine”. Select the Virtual Machine that runs the Web Application.

    Then create a new probe adding the URL of the Web Application
    next add HTTP settings and add custom probe the new created probe “vmsite”

    Next step is to create two multi-site listeners, one for each host name

    After the listener, add a Basic rule using the Listener, Backend Pool and HTTP settings we created for the VM Web Application,

    Finally one extra step is to change the default rule1 to listen to the WeB App listener

    Finally the Application Gateway Web Application Firewall provides secure access to both the Web App (PaaS) and the VM Web Application (IaaS)

    [/url]
    The post Protect your Web App using Azure Application Gateway Web Application Firewall appeared first on Apostolidis IT Corner.


    Source
  7. proximagr
    Protect your Web App using Azure Application Gateway Web Application Firewall
    Web Application Firewall was always a big investment for a small or growing company as most of the top branded companies are charging a lot of money A Web Application Firewall protects your application from common web vulnerabilities and exploits like SQL Injection or Cross site scripting. Azure provides enterprise grade Web Application Firewall through the Application Gateway. It comes in two pricing models, Medium and Large. More about sizes and instances you can find here, and more about pricing here
    We can add the Application Gateway Web Application Firewall to protect our Azure Web App (PaaS) and our Web Application inside a VMs web server (IaaS). At this post we will see how to protect them both.

    One difference in order to fully protect the Azure Web App (PaaS) is to create an App Service Environment with internal VIP to host the Web App in order to hide it inside a VNET. First things first, create a VNET with one subnet for the Application Gateway WAF. App Service Environment
    After the VNET create the App Service Environment, from the Azure Portal, New –> App Service Environment and select VIP Type “Internal”. Add it to the VNET created before and create a subnet for the ASE. You need to be patient here because the deploy will take more than an hour, almost two.
    Web App
    As soon as the App Service Environment is ready we can create our Web App. Create a Web App from Azure Portal with one difference, on the App Service Plan location instead of selecting a Region select he App Service Environment.

    As you realize, the Web App resides at the internal VNET with no access from the internet. So, in order to access the application at this point we need a VM ( a small one just to test and deploy our application ). Create a small VM and add it to this VNET. One small detail, in order to be able to browse to the site’s URL we need to enter the FQDN, in our case papwaf3app.funniest.gr. In order to do this we need an entry at the VM’s host file. This way we can access the new born Web App.
    Web Application Firewall
    Lets create the Secure public entry point for our Web App. Create an application gateway, select WAF Tier, select the required SKU, add it to the WAF subnet we created before, select Public IP configuration and WAF enabled.


    When the Application gateway is ready we need to do some configuration. First at the Backend pools, open the default created backend pool add the Internal Load Balancer IP address of the ASE as target.

    Then add a health probe. For host add the FQDN of the Web App.

    at the HTTP settings check the “Use custom probe” and select the previously created probe.

    And that’s all. Now we can try our Web App from the Internet. In order to do so we need to browse to the Web App’s URL, that is now published by the Application Gateway, from the Internet. So, we need to create a Public DNS record to point the FQDN to the Application Gateway’s FQDN. In this case we need to crate a CNAME papwaf3app.funniest.gr to point to the 8b0510c1-47e9-4b94-a0ff-af92e4455840.cloudapp.net. In order to test the app right now we can just add a host file to our computer pointing to the Public IP Address of the application gateway and we can access the Web App behind the WAF.

    Logging
    In order to be able to see the Application Gateway and Web Application Firewall logs we need to turn on diagnostics. The easiest way to see the logs is by sending them to Log Analytics (OMS).



    With the Firewall at “Detection” mode, if we try an SQL Injection (?id=10||UTL_INADDR.GET_HOST_NAME( (SELECT user FROM DUAL) )–), the Web App still servers the landing page.

    By switching the Firewall to “Prevention” mode, the same SQL injection attach stops by the WAF before accessing our Web App.
    Protect an IaaS Web Application
    To add a Web Application that runs inside a VM behind the Application Gateway Web Application Firewall, first add the VM as a Back End Pool. Create a new Backend Pool and select “Virtual Machine”. Select the Virtual Machine that runs the Web Application.

    Then create a new probe adding the URL of the Web Application
    next add HTTP settings and add custom probe the new created probe “vmsite”

    Next step is to create two multi-site listeners, one for each host name

    After the listener, add a Basic rule using the Listener, Backend Pool and HTTP settings we created for the VM Web Application,

    Finally one extra step is to change the default rule1 to listen to the WeB App listener

    Finally the Application Gateway Web Application Firewall provides secure access to both the Web App (PaaS) and the VM Web Application (IaaS)

  8. proximagr
    Puppet On Azure Επειδή η τεχνολογία είναι ένα ποτάμι που ποτέ δεν σταματάει… και το μικρόβιο μας δεν έχει θεραπεία, ο Παντελής Αποστολίδης (IT Pro) από την Office Line και ο Μάνος Πέπης (DEV) από την Innovative Ideas με αρκετά χρόνια εμπειρίας στην αγορά και αρκετές πιστοποιήσεις σε τεχνολογίες Microsoft, Cisco, Azure, κλπ. σκεφτήκαμε να […]
    The post Puppet On Azure | Βήμα 1, Προετοιμασία Azure appeared first on Proxima's IT Corner.


    Source
  9. proximagr
    Επειδή η τεχνολογία είναι ένα ποτάμι που ποτέ δεν σταματάει… και το μικρόβιό μας δεν έχει θεραπεία, ο Παντελής Αποστολίδης (IT Pro) από την Office Line και ο Μάνος Πέπης (DEV) από την Innovative Ideas με αρκετά χρόνια εμπειρίας στην αγορά και αρκετές πιστοποιήσεις σε τεχνολογίες Microsoft, Cisco, Azure, κλπ. σκεφτήκαμε να μοιραστούμε ένα οδηγό για DevOps στο Azure! Παρουσιάζοντας το Puppet, το πώς στήνετε στο Azure καθώς και μερικές από τις δυνατότητές του.
    Έτσι το Lab μας στο Azure έτρεχε με 1000 και το αποτέλεσμα παρακάτω…
     
    Τι είναι το Puppet και πως μπορούμε να το εκμεταλλευτούμε στο Azure
     
    Αυτοματοποιούμε τις διαδικασίες. Κινούμαστε γρήγορα. Αυξάνουμε της αξιοπιστίας και την ασφάλεια.
    Ο όγκος και η πολυπλοκότητα των υποδομών σε μια δομημένη μηχανογραφημένη εταιρεία ολοένα και αυξάνετε και γίνεται ποιο “smart”. Οι απαιτήσεις για ταχύτητα, αξιοπιστία, σταθερότητα, ασφάλεια ολοένα και αυξάνονται.
    Πώς μπορούμε να επιτύχουμε αυτή την ισορροπία; Σκοπός μας είναι να κάνουμε περισσότερα σε λιγότερο χρόνο! Και αυτό μπορούμε να το επιτύχουμε με DevOps…
    Η Υποδομή του Microsoft Azure προσφέρει ότι ακριβώς χρειαζόμαστε για να χτίσουμε όσα απαιτεί η επιχείρησή μας. Παρακάτω θα δούμε πως μπορούμε να ελέγχουμε και να κάνουμε Manage την υποδομή μας στο Azure με την χρήση του Puppet.
    To Puppet είναι μια Cross Platform ανοιχτού κώδικα (Open Source) που υποστηρίζει λειτουργικά Linux (CentOS, Debian, Fedora, Mandriva, Oracle Linux, RHEL, Scientific Linux, SUSE and Ubuntu), όπως επίσης multiple Unix systems (Solaris, BSD, Mac OS X, AIX, HP-UX), Mac OS X, καθώς και τα λειτουργικά της Microsoft.
    To Puppet αποτελείται από τα παρακάτω:


    1) Puppet Master – Ο κεντρικός server όπου διαχειρίζεται τα Puppet nodes (agents)
    2) Puppet Agent - o client που τρέχει στα managed Puppet nodes και επικοινωνεί – συγχρονίζει με τον Puppet master
    3) Foreman - ένα web περιβάλουν που απεικονίζει τα reports και ελέγχει τα resources της υποδομής μας  

    Προετοιμασία Azure Βήμα 1 Azure network
    Δημιουργούμε ένα Virtual Network. Αυτό μας δίνει τρία πλεονεκτήματα, ένα είναι το isolation, δεύτερον είναι οι Local στατικές IP και τρίτον είναι η δυνατότητα για Site-2-Site & Point-2-Site VPN.
    Για να δημιουργήσουμε ένα Virtual network, από το Azure Management Portal πατάμε New, διαλέγουμε Networking, Virtual Network, δίνουμε όνομα, Location και πατάμε create a virtual network

    Βήμα 2 Azure Cloud service
    Δημιουργούμε ένα Cloud Service, από το Azure Management Portal πατάμε New, διαλέγουμε Compute, Cloud Service και πατάμε Quick Create

     
    Δίνουμε όνομα στο URL και διαλέγουμε το Region ίδιο με του Virtual Network
     
    Βήμα 3 Azure Storage account
    Δημιουργούμε ένα Storage account, από το Azure Management portal πατάμε New, Storage και πατάμε Quick Create
    Δίνουμε όνομα, στην συγκεκριμένη περίπτωση openpuppetlab, διαλέγουμε το location που είναι και το Virtual Network, τέλος διαλέγουμε redundancy και πατάμε Create Storage Account .

    Βήμα 4 Azure VM | Puppet Master
    Δημιουργούμε ένα Virtual Machine, από το Azure Management Portal πάμε στα Virtual Machines και πατάμε New
    Και πατάμε «From Gallery”

    Για το Puppet 3.8 διαλέγουμε το Ubuntu Server 14.04 LTS και πατάμε το βελάκι δεξιά

    Δίνουμε όνομα, για Size ένας Puppet Muster θέλει τουλάχιστον ένα A2 (2 cores, 3.5 GB memory), δίνουμε username και επιλέγουμε το πεδίο “Provide a password” και δίνουμε password και πατάμε το βελάκι δεξιά

    Στην επόμενη εικόνα διαλέγουμε το cloud service, το Virtual Network Που δημιουργήσαμε στο Βήμα 1 (στο πεδίο Region/Affinity group/Virtual network) και το storage account που δημιουργήσαμε στα προηγούμενα βήματα. Στο Endpoint αλλάζουμε την Public πόρτα του SSH, για λόγους ασφάλειας, και πατάμε το βελάκι δεξιά
     

    Στην επόμενη εικόνα πατάμε το check για να δημιουργηθεί το VM.
    Βήμα 5 Στατική IP
    Για να δώσουμε στατική IP πρέπει να μεταβούμε στο νέο Azure Portal
    Πηγαίνουμε στο “Virtual Machines (classic)” και επιλέγουμε το VM

    Στην καρτέλα Settings πατάμε IP Addresses

    αλλάζουμε το IP address assignment κάτω από το Private IP address σε Static, δίνουμε την στατική IP που θέλουμε και πατάμε save

    Βήμα 5 Azure VM | Puppet Slaves
     
    Για τις ανάγκες του Lab θα δημιουργήσουμε δύο ακόμα Ubuntu Server 14.04 LTS αλλά θα χρησιμοποιήσουμε μικρότερου μεγέθους Virtual Machine.
    Ακολουθούμε την ίδια διαδικασία όπως στο βήμα 4 μόνο που στην οθόνη 2 του “Virtual machine configuration” δίνουμε όνομα “ puppetslave01” και διαλέγουμε ένα A0 (shared core, 768 memory)
     
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mop11.jpg
     
    Στην επόμενη οθόνη, δίνουμε τα ίδια για cloud service, virtual network & storage account, αλλά στο Endpoint πρέπει να δώσουμε διαφορετικό Public Port διότι η εξωτερική IP είναι ίδια. Για το lab δίνουμε την πόρτα 30022
     
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mop07.jpg
     
    Κάνουμε την ίδια διαδικασία και για να φτιάξουμε και δεύτερο Puppet Slave, αλλάζοντας μόνο το όνομα και το Public Port. Για το Lab έφτιαξα το puppetslave02 με πόρτα 30023
    Αφού δημιουργηθούν τα VMs ακολουθούμε το Βήμα 5 για να δώσουμε στατικές IP, στο Lab έδωσα 10.0.0.5 & 10.0.0.6 αντίστοιχα
     
    SOURCE: http://www.e-apostolidis.gr/%CE%B5%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC/puppet-on-azure-step1-azure-preparation/
  10. proximagr
    Puppet On Azure Εγκατάσταση Open Source Puppet Βήμα 1 Σύνδεση στο Ubuntu ανοίγουμε έναν SSH client, στην προκειμένη περίπτωση PuTTY και δίνουμε για Host Name το Public όνομα του Cloud Service, στην προκειμένη περίπτωση openpuppetlab.cloudapp.net, δίνουμε την πόρτα 30021 που έχουμε ορίσει για το puppetmaster και πατάμε Open Κάνουμε login με το username & password […]
    The post Puppet On Azure | Βήμα 2, Εγκατάσταση Open Source Puppet appeared first on Proxima's IT Corner.


    Source
  11. proximagr
    Puppet On Azure
     
    Εγκατάσταση Open Source Puppet
     
    Βήμα 1 Σύνδεση στο Ubuntu
     
    ανοίγουμε έναν SSH client, στην προκειμένη περίπτωση PuTTY και δίνουμε για Host Name το Public όνομα του Cloud Service, στην προκειμένη περίπτωση openpuppetlab.cloudapp.net, δίνουμε την πόρτα 30021 που έχουμε ορίσει για το puppetmaster και πατάμε Open

    Κάνουμε login με το username & password που ορίσαμε στην δημιουργία του VΜ. Για να μην βάζουμε “sudo” σε κάθε εντολή, τρέχουμε “sudo su –“ και ενεργοποιούμε το root mode μέχρι να κάνουμε “exit”
     
    Βήμα 2 Προαπαιτούμενα
     
    Στατική IP
    Το Puppet χρειάζεται στατική IP & σταθερό hostname. Τη στατική IP την έχουμε ήδη ορίσει στο Azure, οπότε τρέχουμε ένα “ifconfig” για να δούμε ότι όντος το Ubuntu έχει αυτήν την IP

     
    Hostname
    Μετά ανοίγουμε το hosts file για να δώσουμε hostnames. Για τις ανάγκες του Lab θα χρησιμοποιήσω για domain name το puppet.lab. Η ίδια διαδικασία πρέπει να γίνει στο Master & στα Slaves με τις ίδιες εγγραφές.

    Αφού τελειώσουμε με τις εγγραφές πατάμε Ctrl-X, απαντάμε Y για να σώσει τις αλλαγές και Enter για έξοδο.
     
    Time Sync
    Το Puppet Master & τα Slaves πρέπει να έχουν συγχρονισμένη ώρα. Για να γίνει αυτό τρέχουμε την παρακάτω εντολή σε όλα τα μηχανήματα.
    ntpdate pool.ntp.org ; apt-get update && sudo apt-get -y install ntp ; service ntp restart

     
    Βήμα 3 Εγκατάσταση Puppet Master
    Ενεργοποιούμε το Puppet Laps repository και κάνουμε την εγκατάσταση με τις παρακάτω εντολές
    wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
    dpkg -i puppetlabs-release-trusty.deb
    apt-get update
    apt-get install puppetmaster

    Τέλος τρέχουμε “puppet –V” για να σιγουρευτούμε ότι το Puppet τρέχει και τι version έχει εγκατασταθεί

    Είναι καλό σε αυτό το σημείο να κλειδώσουμε το Puppet Auto Update γιατί σε περίπτωση automatic update θα χαλάσει το configuration. Για να γίνει αυτό δημιουργούμε ένα αρχείο μέσα στο apt/preferences.d με όνομα 00-puppet.pref και βάζουμε τα παρακάτω δεδομένα:
    Δημιουργία αρχείου:
    # /etc/apt/preferences.d/00-puppet.pref
    nano /etc/apt/preferences.d/00-puppet.pref
    Δεδομένα:
    Package: puppet puppet-common puppetmaster-passenger
    Pin: version 3.8*
    Pin-Priority: 501
    Αφού τελειώσουμε με τις εγγραφές πατάμε Ctrl-X, απαντάμε Y για να σώσει τις αλλαγές και Enter για έξοδο.
    Ανοίγουμε με nano το αρχείο /etc/puppet/puppet.conf
    nano /etc/puppet/puppet.conf
    Και βάζουμε comment στο templatedir

    Αν δεν το κάνουμε αυτό θα πάρουμε αργότερα μήνυμα ότι το templatedir is deprecated

    Κάνουμε restart το pupetmaster service και είναι έτοιμο
    service puppetmaster restart
     
    Βήμα 4 Εγκατάσταση Puppet Slave
    ανοίγουμε έναν SSH client, στην προκειμένη περίπτωση PuTTY και δίνουμε για Host Name το Public όνομα του Cloud Service, στην προκειμένη περίπτωση openpuppetlab.cloudapp.net, δίνουμε την πόρτα 30022 που έχουμε ορίσει για το puppetslave01 και πατάμε Open

    Κάνουμε login με το username & password που ορίσαμε στην δημιουργία του VΜ
    Τρέχουμε τα προαπαιτούμενα από το Βήμα2
    Ενεργοποιούμε το Puppet Laps repository και κάνουμε την εγκατάσταση με τις παρακάτω εντολές
    cd /tmp
    wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
    dpkg -i puppetlabs-release-trusty.deb
    apt-get update
    apt-get install puppet
    Τέλος τρέχουμε “puppet –V” για να σιγουρευτούμε ότι το Puppet τρέχει και τι version έχει εγκατασταθεί και ότι είναι ίδια με το version του Puppet Master

    κλειδώνουμε το Puppet Auto Update γιατί σε περίπτωση automatic update θα χαλάσει το configuration. Για να γίνει αυτό δημιουργούμε ένα αρχείο μέσα στο apt/preferences.d με όνομα 00-puppet.pref και βάζουμε τα παρακάτω δεδομένα:
    Δημιουργία αρχείου:
    nano /etc/apt/preferences.d/00-puppet.pref
    Δεδομένα:
    Package: puppet puppet-common puppetmaster-passenger
    Pin: version 3.8*
    Pin-Priority: 501
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mopb11.jpg
    Αφού τελειώσουμε με τις εγγραφές πατάμε Ctrl-X, απαντάμε Y για να σώσει τις αλλαγές και Enter για έξοδο
    Το επόμενο βήμα για τους Slaves είναι να αλλάξουμε το configuration
    Ανοίγουμε με nano το αρχείο /etc/puppet/puppet.conf
    nano /etc/puppet/puppet.conf
    Και αλλάζουμε ως εξής:
    Βάζουμε comment στο templatedir & σε όλο το [master] section και δημιουργούμε ένα [agent] section όπου ορίζουμε τον Puppet Master server
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mopb12.jpg
    Τέλος ενεργοποιούμε το Puppet Agent να ξεκινάει σαν service
    nano /etc/default/puppet
    και αλλάζουμε το START=no σε yes
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mopb13.jpg
    Και ξεκινάμε το service με
    service puppet start
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mopb14.jpg
     
    Βήμα 5 Certificates
    Σε αυτό το βήμα ήδη οι agents έχουν αρχίσει να ψάχνουν τον Puppet Master και του ζητάνε certificate exchange για να ξεκινήσουν να δέχονται οδηγίες. Οπότε το επόμενο βήμα είναι να κάνουμε sign τα certificates που έχουν έρθει από τους agents.
    Τρέχουμε στον Puppet Master το command “puppet cert list” για να δούμε τα certificates που έχουν έρθει για να γίνουν sign.
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mopb15.jpg?w=625
    Βλέπουμε ότι οι δύο Puppet Slaves έχουν εμφανιστεί και ζητάνε για certificate sign. Για να κάνει ο Puppet Master sign τα certificates τρέχουμε:
    puppet cert sign puppetslave01.puppet.lab & puppet cert sign puppetslave02.puppet.lab
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mopb16.jpg?w=625
    Τώρα αν ξανατρέξουμε το “puppet cert list” πρέπει να μην φέρνει κανένα request
    Και τρέχοντας το “puppet cert list -all” θα πρέπει να φέρει το certificate του Master και τα 2 certificates των slaves και το + μπροστά από την κάθε εγγραφή υποδεικνύει ότι έχει γίνει sign επιτυχώς και είναι ενεργό.
    http://www.e-apostolidis.gr/wp-content/uploads/2015/10/mopb17.jpg?w=625
    Εδώ τελειώνει η βασική εγκατάσταση & παραμετροποίηση Puppet Master & 2 Slaves
     
    source: http://www.e-apostolidis.gr/%CE%B5%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC/puppet-on-azure-step2-open-source-puppet-setup/
  12. proximagr
    Puppet On Azure Προσθήκη Windows Agent Βήμα 1 Δημιουργία Windows VM Δημιουργούμε ένα Virtual Machine, από το Azure Management Portal πάμε στα Virtual Machines, πατάμε New και πατάμε «From Gallery” Διαλέγουμε Windows Server 2012 R2 Datacenter Δίνουμε όνομα, για το Lab: “puppetslave03”, size ένα A0, username & password Στην επόμενη οθόνη επιλέγουμε το ίδιο Cloud […]
    The post Puppet On Azure | Βήμα 3, Προσθήκη Windows Agent appeared first on Proxima's IT Corner.


    Source
  13. proximagr
    Puppet On Azure Προσθήκη Windows Agent Βήμα 1 Δημιουργία Windows VM
    Δημιουργούμε ένα Virtual Machine, από το Azure Management Portal πάμε στα Virtual Machines, πατάμε New και πατάμε «From Gallery”

    Διαλέγουμε Windows Server 2012 R2 Datacenter

    Δίνουμε όνομα, για το Lab: “puppetslave03”, size ένα A0, username & password

    Στην επόμενη οθόνη επιλέγουμε το ίδιο Cloud Service, Virtual Network & Storage Account, τέλος αλλάζουμε τις public Ports του RDP & PowerShell (για ασφάλεια) και πατάμε το βελάκι δεξιά

    Στην επόμενη οθόνη αφήνουμε μόνο το “Install VM Agent” και πατάμε το check για να δημιουργήσουμε το VM. Βήμα 2 Private IP
    Αφού δημιουργηθεί το VM δίνουμε Private IP από νέο Azure Portal
    Πηγαίνουμε στο “Virtual Machines (classic)” και επιλέγουμε το VM

    Στην καρτέλα Settings πατάμε IP Addresses

    αλλάζουμε το IP address assignment κάτω από το Private IP address σε Static, δίνουμε την στατική IP που θέλουμε και πατάμε save
    Βήμα 3 Puppet Agent
    Ανοίγουμε το Remote Desktop Connection και για Computer βάζουμε το Public Address του VM και την πόρτα που ορίσαμε. Στην συγκεκριμένη περίπτωση “openpuppetlab.cloudapp.net:33389”

    Δίνουμε το username & το Password που ορίσαμε κατά την δημιουργία του VM και συνδεόμαστε Firewall
    Ο Puppet Agent επικοινωνεί στην πόρτα 8140 οπότε πρέπει πρώτα να την ανοίξουμε στο Windows Firewall. Από το Server Manager πάμε στο Local Server και πατάμε στο Windows Firewall για να ανοίξει η καρτέλα του Windows Firewall. Εκεί πατάμε “Advanced settings”

    Στην καρτέλα του Windows Firewall with Advanced Security πατάμε New Rule και ανοίγει ο New Inbound Rule Wizard

    Στην πρώτη καρτέλα διαλέγουμε το Port και πατάμε Next

    Στην επόμενη καρτέλα διαλέγουμε το Specific local ports και βάζουμε την 8140 και πατάμε Next

    Στην επόμενη καρτέλα αφήνουμε το Allow the connection και πατάμε Next

    Στην επόμενη καρτέλα αφήνουμε τα apply rules όπως είναι και πατάμε Next

    Και τέλος δίνουμε ένα όνομα, π.χ. Puppet Agent, και πατάμε Finish για να δημιουργηθεί ο κανόνας. Host File
    Ο Agent πρέπει να επικοινωνεί με τον Master στο FQDN που ορίσαμε στον Master. Οπότε εφόσον δεν έχουμε DNS πρέπει να παραμετροποιήσουμε το host file του Windows Server.
    Ανοίγουμε ένα Notepad με Administrator Rights

    Πάμε στο file/open και ανοίγουμε το αρχείο “ C:WindowsSystem32driversetchosts”
    Προσθέτουμε στο τέλος το entry με τα στοιχεία του Master
    10.0.0.4 puppetmaster.puppet.lab

    Και κάνουμε save και κλείνουμε το Notepad
    Ανοίγουμε ένα Command Prompt και κάνουμε ένα ping στο FQDN του Master για να δούμε ότι απαντάει
    Hostname
    Πρέπει το certificate που θα εκδοθεί να είναι της μορφής puppetmaster.puppet.lab οπότε πρέπει να πούμε στον server να έχει αυτό το FQDN. Εφόσον ο Server δεν είναι σε Domain πρέπει να δώσουμε το DNS suffix χειροκίνητα.
    Ανοίγουμε τα properties της κάρτας δικτύου και πατάμε Properties

    Επιλέγουμε το IPv4 και πατάμε Properties

    Πατάμε Advanced

    Και στο πεδίο DNS Suffix δίνουμε το puppet.lab

    Πατάμε ΟΚ σε όλες τις καρτέλες μέχρι να κλείσουν. Σε αυτό το σημείο θα χάσουμε το RDP για 2-3 λεπτά. Μετά μπορούμε να ξανασνδεθούμε. Εγκατάσταση Puppet Agent
    Για να μας αφήσει ο Server να κατεβάσουμε τον agent πρέπει πρώτα να κλείσουμε το IE Enhanced Security Configuration. Από το Server Manager πάμε στο Local Server και πατάμε στο IE Enhanced Security Configuration και το κάνουμε Off μόνο για τους Administrators.

    Ανοίγουμε Internet Explorer και πάμε στη διεύθυνση https://downloads.puppetlabs.com/windowsκαι κατεβάσουμε το “puppet-3.8.3-x64.msi”. Σε περίπτωση 32bit λειτουργικού κατεβάζουμε το “ puppet-3.8.3.msi”
    Αφού κατέβει τρέχουμε το msi, ανοίγει ο Wizard και πατάμε Next

    Αποδεχόμαστε το agreement και πατάμε Next

    Στην επόμενη καρτέλα διαλέγουμε το path όπου θα εγκατασταθεί το Puppet Agent και δίνουμε το FQDN του Puppet Master

    Στην επόμενη καρτέλα πατάμε install για να ξεκινήσει η εγκατάσταση

    Αφού τελείωσε η εγκατάσταση πατάμε Finish

    Ανοίγουμε τα Services και ελέγχουμε ότι το Puppet Agent service είναι Running και Automatic

    Τώρα πηγαίνουμε στον Puppet Master για να δούμε αν ο Agent έχει κάνει certificate request ώστε να το κάνουμε sign. Τρέχουμε στον Puppet Master το command “puppet cert list”
    Ελέγχουμε να μας έχει φέρει certificate με όνομα “puppetslave03.puppet.lab”

    Και κάνουμε sign με puppet cert sign puppetslave03.puppet.lab
    Τέλος πηγαίνουμε στον Windows Server και κάνουμε restart το Puppet Agent service
    Για να δούμε ότι ο Agent μιλάει και δέχεται εντολές από τον Master ανοίγουμε το “Start Command Prompt with Puppet”

    Και τρέχουμε την εντολή “puppet agent –test”

    Εφόσον φέρει σε πράσινο τα Cashing certificate είναι ΟΚ
  14. proximagr
    Puppet On Azure Puppet Automation – Δημιουργία αρχείου στους Servers που κάνουμε Manage Έχουμε εγκαταστήσει το Puppet και τους Agents, τώρα είναι η ώρα να δούμε ένα test automation. Παράδειγμα «Δημιουργία αρχείου» Στον Puppet Master τρέχουμε: nano /etc/puppet/manifests/site.pp και δίνουμε όνομα του αρχείου και το path το security “mode” και το περιεχόμενο του αρχείου ”content” […]
    The post Puppet On Azure | Βήμα 4, Puppet Automation appeared first on Proxima's IT Corner.


    Source
  15. proximagr
    Puppet On Azure
    Puppet Automation – Δημιουργία αρχείου στους Servers που κάνουμε Manage
    Έχουμε εγκαταστήσει το Puppet και τους Agents, τώρα είναι η ώρα να δούμε ένα test automation.
    Παράδειγμα «Δημιουργία αρχείου»
    Στον Puppet Master τρέχουμε:
    nano /etc/puppet/manifests/site.pp
    και δίνουμε όνομα του αρχείου και το path
    το security “mode”
    και το περιεχόμενο του αρχείου ”content”

    Και το σώζουμε
    Τώρα πάμε στον Slave να δούμε το αρχείο. Μπορούμε να περιμένουμε μισή ώρα μέχρι να κάνει request ο agent στο master ή να τρέξουμε “puppet agent –test” για να το επισπεύσουμε

    Και με “nano /tmp/puppet-test” βλέπουμε το περιεχόμενο

    Τώρα για να δημιουργήσουμε το αρχείο και στα Linux αλλά και σε Windows παραμετροποιούμε το site.pp το παρακάτω:
    if $osfamily == 'windows' {file { 'c:/temp/pupet-test.txt': ensure =&gt; file, mode=&gt;'0644',content =&gt; "this is the first puppet test file.n" }}else {file{'/tmp/puppet-test':ensure =&gt; "present",mode =&gt; 0644,content =&gt; "this is the first puppet test file.n",}}

    source: http://www.e-apostolidis.gr/%CE%B5%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC/puppet-on-azure-%CE%B2%CE%AE%CE%BC%CE%B1-4-puppet-automation/
  16. proximagr
    Puppet On Azure Εγκατάσταση & Παραμετροποίηση του FOREMAN για να έχουμε γραφικό περιβάλλον μέσω WEB Το Open Puppet δεν έχει γραφικό περιβάλλον στην βασική του εγκατάσταση. Υπάρχουν μερικά open source προγράμματα τα οποία μπορούν να προτεθούν στο Puppet Master και να μας προσφέρουν γραφικό περιβάλλον. Ένα από τα καλύτερα είναι το Foreman. Με το Foreman […]
    The post Puppet On Azure | Βήμα 5, FOREMAN appeared first on Proxima's IT Corner.


    Source
  17. proximagr
    Puppet On Azure Εγκατάσταση & Παραμετροποίηση του FOREMAN για να έχουμε γραφικό περιβάλλον μέσω WEB
    Το Open Puppet δεν έχει γραφικό περιβάλλον στην βασική του εγκατάσταση. Υπάρχουν μερικά open source προγράμματα τα οποία μπορούν να προτεθούν στο Puppet Master και να μας προσφέρουν γραφικό περιβάλλον. Ένα από τα καλύτερα είναι το Foreman. Με το Foreman μπορούμε να διαχειριστούμε το Puppet πλήρως.
    Το Dashboard του Foreman:

    Εγκατάσταση:
    Συνδεόμαστε στο Puppet Master με SSH, κάνουμε login και τρέχουμε την εντολή “sudo su -“ για να γυρίσουμε σε root
    Ενεργοποιούμε τα repositories για το Foreman
    echo “deb http://deb.theforeman.org/trusty 1.9” > /etc/apt/sources.list.d/foreman.list echo “deb http://deb.theforeman.org/ plugins 1.9” >> /etc/apt/sources.list.d/foreman.list wget -q http://deb.theforeman.org/pubkey.gpg -O- | apt-key add – Τρέχουμε την εγκατάσταση με foreman-installer
    Μόλις τελειώσει η εγκατάσταση μας ενημερώνει για το link του Web interface και τα credentials.
    Μπορούμε να ανοίξουμε την πόρτα 443 από το Endpoint του Azure ώστε να έχουμε την κονσόλα και απ’ έξω.
    Από το Azure Management Portal διαλέγουμε το VM του Master Puppet και πηγαίνουμε στα Endpoints

    Στη συνέχεια πατάμε ADD και διαλέγουμε “Add a stand-alone endpoint”


    Στο πεδίο Name διαλέγουμε από το Drop down menu το HTTPS
    pΒλέπουμε στα Endpoints έχει προστεθεί το HTTPS

    και πλέον μπορούμε να κάνουμε browse στο link του Cloud Service Ανοίγουμε τον browser και κάνουμε login στο Foreman από την public διεύθυνση, στα certificate prompts πατάμε και στα δύο cancel.
    Μπαίνουμε στο Dashboard
    Πάμε στο Hosts και πατάμε All Hosts για να δούμε το Status των Agents
    Πατώντας στο όνομα ενός host μπορούμε να δούμε περισσότερα στοιχεία
    Statistics


  18. proximagr
    Microsoft offers for free it’s antimalware service. When you create a new VM you have the option to enable it. This will install the System Center Endpoint Protection client to the VM managed by Azure. If you have added this but now you want to remove it and add some other antivirus/antimalware solution you cannot do it by just uninstalling the client from the VM. The client will auto re-insalled by Azure. There are two ways to completely uninstall the program and remove it from Azure. One is using the new Portal and one using PowerShell.
     
    Using the Portal
    Go to https://portal.azure.com/ Browse the VM Go to the Configuration section and click on Extensions Click the Microsoft.Azure.Security extension You can delete it using he Delete button At any time you can re-add it, by clicking the Add button at the Extensions window


     
    Using PowerShell
     
    First connect PowerShell to your Azure subscription, as described to this post and then:
     
    # First check the Antimalware Service Status, you need to select the Azure VM and then get the status:
    $servicename = "myVMservice"
    $vmname = "myVMname"
    $vm = Get-AzureVM –ServiceName $servicename –Name $vmname
    Get-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -Version 1.* -VM $vm
     
    #First remove the service from Azure
    Remove-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -VM $vm
     
    # Then uninstall the Antimalware Client from the VM
    Get-AzureVM -ServiceName $servicename -Name $vmname | Set-AzureVMExtension -Publisher Microsoft.Azure.Security -ExtensionName IaaSAntimalware -Version 1.* -Uninstall | Update-AzureVM
     
    source: http://www.e-apostolidis.gr/microsoft/remove-microsoft-antimalware-service-from-a-vm/
  19. proximagr
    When we create a VM on Azure, at the same time we create a Cloud Service. Later we can create more VMs on the same cloud service. Each cloud service has a unique Public IP. For as long the Cloud Service has at least one VS running this Public IP remains the same. If all VMs of a Cloud Service are off then the Public IP is released and next time the VM is powered on it will take a new Public IP.
     
    Using PowerShell we can reserve a Public IP for as long as the Cloud Service exists, with or without VMs.
     
    First we need to create a Virtual Network from the portal. Go to “Networks” and create a new Virtual Network. We can use the “Quick Create”.
     
    Second we need the Azure PowerShell installed, it can be found here: http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/ and we connect using the username/password method, the command is Add-AzureAccount

    #Create the Public IP Reservation:$reservedIP = "reserved ip name"$location = "West Europe"New-AzureReservedIP -ReservedIPName $reservedIP -Location $location #Collect the configuration settings for the new VM:$serviceName = "azure service name for VM"$adminUser = "VM admin user name"$password = "VM admin password"$location = "West Europe"$reservedIP = "reserved ip name"$vmName = "VM name" #Choose the size of the VM. Use this list: https://msdn.microsoft.com/en-us/library/dn168976%28v=nav.70%29.aspx#$vmSize = "Medium" #Provide the Operating System. Use this post to get a list of the available images: https://msdn.microsoft.com/en-us/library/azure/jj157191.aspx?f=255&MSPPError=-2147217396$imageFamily = "Windows Server 2012 R2 Datacenter"$imageName = Get-AzureVMImage | where { $_.ImageFamily -eq $imageFamily } | sort PublishedDate -Descending | select -ExpandProperty ImageName -First 1 #Add the configuration settings for the new VM to a variable:$vm1 = New-AzureVMConfig -Name $vmName -InstanceSize $vmSize -imagename $imagename | Add-AzureProvisioningConfig -Windows -AdminUsername $adminUser -Password $password | set-azuresubnet subnet-1 #Create the VM and the Cloud Service with the Reserved Public IPNew-AzureVM -Location $location -VMs $vm1 -vnetname testnet2 -servicename $servicename -reservedipname $reservedipname Δίνουμε την εντολή για να ξεκινήσει η δημιουργία.
  20. proximagr
    Save 40% on Windows Azure VM made easy
    creating a new Windows Azure VM you will notice a new selection at the Basics step. It is the Hybrid Use Benefit. Using this benefit you can save up to 40% on a Windows Azure VM cost using your own license with software assurance. You just need to have a Windows Server Standard or Datacenter license with Software Assurance, and it is not restricted to any specific licensing program, it is available to all licenses with Software Assurance.
    At the final step, the Summary, you will see a notification about the Hybrid Use Benefit, explaining the limitations of the benefit, saying:
    “Each Windows Server with Software Assurance (either via each 16-Core license or two-processor license) is entitled to two instances of up to 8 cores, or one instance of up to 16 cores. Please always refer to your Windows Server license count with Software Assurance, your Hybrid Use Benefit entitlements, and your Hybrid Use Benefit deployments to use this benefit while maintaining compliance.“


    once the Azure VM is ready and login you will notice that the Operating System is not activated

    so you need to press Activate Windows and add your key to activate the Azure VM

    for more details visit the official page at https://azure.microsoft.com/en-us/pricing/hybrid-use-benefit/
  21. proximagr
    Secure your Azure SQL locally inside your vnet using service endpoints
    For many companies, a throwback of using Azure SQL was the Public Access. After the latest Azure updates you can use the service endpoints to Secure your Azure SQL locally inside your vnet! For the time, the feature is available only at the West Central US, West US 2, and East US regions but soon more will follow.
    So, lets secure your Azure SQL locally inside your vnet! At the VNET creation blade, select the Microsoft.Sql service endpoint from the list of the available service endpoints.

    Then create an SQL Database at the same region,

     
    Next, go to the SQL server firewall settings and turn Off the “Allow access to Azure services”. By doing this you disable the access to the SQL Server using the Public IP.

    Click the “Add existing virtual network” and create an access rule, in order to be able to access the SQL Server from your Virtual Network using the service endpoints.

    Now lets test. A fast way to test your SQL connectivity from a Virtual Machine on the VNET, without having the SQL management tools, is to open the “ODBC Data Source Administrator” and create a new connection. Add the Azure SQL Server IP

    at the next screen enter the username and password of your SQL Server and finally click the “Test Data Source”

    Of course we can also connect with the SMSS. Add the SQL Server FQDN, the username and the password

    and you are connected, fast and securely!

     
    You cannot yet add your SQL to a subnet, but you secure it’s access inside your VNET! all public access is denied.
    [/url]
    The post Secure your Azure SQL locally inside your vnet using service endpoints appeared first on Apostolidis IT Corner.


    Source
  22. proximagr
    Secure your Azure SQL locally inside your vnet using service endpoints
    For many companies, a throwback of using Azure SQL was the Public Access. After the latest Azure updates you can use the service endpoints to Secure your Azure SQL locally inside your vnet! For the time, the feature is available only at the West Central US, West US 2, and East US regions but soon more will follow.
    So, lets secure your Azure SQL locally inside your vnet! At the VNET creation blade, select the Microsoft.Sql service endpoint from the list of the available service endpoints.

    Then create an SQL Database at the same region,

     
    Next, go to the SQL server firewall settings and turn Off the “Allow access to Azure services”. By doing this you disable the access to the SQL Server using the Public IP.

    Click the “Add existing virtual network” and create an access rule, in order to be able to access the SQL Server from your Virtual Network using the service endpoints.

    Now lets test. A fast way to test your SQL connectivity from a Virtual Machine on the VNET, without having the SQL management tools, is to open the “ODBC Data Source Administrator” and create a new connection. Add the Azure SQL Server IP

    at the next screen enter the username and password of your SQL Server and finally click the “Test Data Source”

    Of course we can also connect with the SMSS. Add the SQL Server FQDN, the username and the password

    and you are connected, fast and securely!

     
    You cannot yet add your SQL to a subnet, but you secure it’s access inside your VNET! all public access is denied.
    [/url]
    The post Secure your Azure SQL locally inside your vnet using service endpoints appeared first on Apostolidis IT Corner.


    Source
  23. proximagr
    Securely scale your Web Apps with Azure Front Door
    There is a big buzz out there about Azure Front Door.  Is it a Load Balancer? A CDN? A Traffic Manager? A Web Application Firewall ? A Reverse Proxy? An Application Gateway?
    So, what is Azure Front Door?
    Azure Front Door actually is all the above and more. It is a global service, that routes web traffic based on performance and availability. A Layer 7 multi-region load balancer with Web Application Firewall (WAF) capabilities, DDoS protection & CDN.
    Azure Front Door is the entry point, the edge, of all Microsoft’s WAN. All Microsoft services, like Office 365 & Bing, are using Azure Front Door.
    The services that Azure Front door provides are:
    Accelerate application performance Increase application availability with smart health probes URL-based routing Multi-site hosting URL redirection Session affinity SSL termination Custom Domain & certificate management Security via custom WAF rules DDoS protection URL rewrite IPv6 and HTTP/2 support At Azure Front Door documentation there is a paragraph that can help to understand the difference between Azure Front Door and other publishing / load balancing Azure solutions and where to use each.
    For pricing information, see Front Door Pricing.
    How to scale your web apps with Front Door
    Create two simple Azure Web apps. Check this guide for a simple guide on how to create Azure App Service: https://www.e-apostolidis.gr/microsoft/azure/azure-start-point-your-first-web-app/
    One at West Europe:

    and one at North Europe:

    Using FTP, I deployed an one-page html site at both regions. I change the text of both site to say “This Web Site is located at North Europe Azure Datacenter”

    and “West Europe” to the other.

    Then create a Front Door. Search for Front Door at Azure marketplace and Create one.

    This is a high level diagram of the Front Door with two Web Apps design that we will create

    The “create a Front Door” wizard will start and we can configure it step by step. First we will create a Frontend host by clicking the + at the Step 1

    At the frontend host we will create the URL that our apps will be available. I added the papostolidis.azurefd.net. of course later you can add your custom domain and add a CNAME to route the traffic to the Front Door.

    Then, at the Backend pools (Step 2), press the + to add the web apps. add a name for the backend pool, like “myapps” and press + ADD a backend to add the apps.

    Select host type, you can add app service, cloud service, storage and custom host (URL). I selected the app service.

    Select the subscription and the app service and add the correct ports for http and https traffic.
    The priority defines if the traffic will be routed to the host with the lower priority number (e.g. 1) and if that host fails will route to the next host with bigger priority number (e.g. 2). If you add the same priority to more than one host then it will follow the weight number.
    The weight number defines the percentage of requests that will be routed to each host.

    The same way add the second web app

    Finally select a path, protocol and interval for the probe that will do health checks to the app to define if it is active or not.

    The third step is to add the routing rules. At the routing rules you can specify:
    The accepted protocol, http or https. the frontend host for this rule the patterns that the route will accept, like www.e-apostolidis.gr/mysite/* or just /* ro root. Route type forward or redirect. The backend pool that this rule will direct the traffic The protocol that the traffic will be forwarded. Here we define the SSL Offload if we select HTTPs for frontend accepted protocol and HTTP for backend. URL Rewrite rules Caching, for static content caching like CDN.
    Once all steps are completed we can move on and create the Front Door

    When the Front Door is ready, we can see the URL at the Overview.

    And browse our web app using the Front Door URL:

    How to protect your web apps with Front Door
    Right now we scaled our web apps. If we use each app’s URL we can still access the app. The first security step is to lock the web apps to be accessed only through the Front Door URL.
    Checking the Azure Front Door FAQ page, https://docs.microsoft.com/en-us/azure/frontdoor/front-door-faq it lists the Front Door’s address rance.
    Front Door’s IPv4 backend IP space: 147.243.0.0/16
    Go to the App Service, at the Networking section, select “Configure Access Restrictions”

    Add an allow access restriction with the IP range of the Front Door.

    Automatically a Deny rule will be created for everything else.

    Add the rule to both web apps and then try to access the apps with their direct links.

    Now on, we can access the apps only by using the Front Door URL:

    This is a high level diagram after the restrictions

    At the next article, we will see how to add Web Application Firewall (WAF) Rules to Front Door, Stay Tuned!! 

    The post Securely scale your Web Apps with Azure Front Door appeared first on Apostolidis IT Corner.


  24. proximagr
    At this post, we will create a Logic App that will query the Log Analytics workspace for the WAF logs of the last 24 hours and send the results in an email, using a free SendGrid account.
    A Web Application Firewall protects your application from common web vulnerabilities. Azure provides enterprise grade Web Application Firewall through the Application Gateway. You can read more at my previous post: https://www.e-apostolidis.gr/microsoft/azure/protect-your-web-application-with-azure-application-gateway-waf/ Use Log Analytics to Query the WAF Logs
    The Application Gateway WAF sends its logs to the Log Analytics workspace. You can see them using a typical query like the below, that will list all events at the past 24 hours.
    AzureDiagnostics | where Resource == “PROWAF” and OperationName == “ApplicationGatewayFirewall” | where TimeGenerated > ago(24h) | summarize count() by TimeGenerated, clientIp_s , TimeGenerated , ruleId_s , Message , details_message_s , requestUri_s, details_file_s , hostname_s
    You can save the query by clicking the Save button and give it a name and a Category.
    We can send those logs as email by using an Azure Logic App and a SendGrid account. You can see how to create a SendGrid free account at my previous post: https://www.e-apostolidis.gr/microsoft/azure/azure-free-smtp-relay-using-sendgrid/ Create a Logic App
    From the portal.azure.com, Create a resource and write “logic app”, click the “Logic App”and press “Create”
    At the Logic App creation wizard add Name, subscription, resource group, location and press Create
    Next the Logic App will be created. Open it and from the Logics App Designer select the “Recurrence” common trigger.
    Change the Recurrence Interval to “1” and the Frequency to “Day” and press the “+ New step”
    search for “log analytics” and select the “Run query and visualize results”
    I will proceed with “Sign in”, you can also use a Service Principal but we will cover this to another post.
    After you login select the Subscription, Resource Group and the Log Analytics Workspace. Next, add the query, for Chart Type select “Html Table” and add a “Next Step”

    search for “sendgrid” and select the “Send email (V2)”
    Add a name for the connection and the API key that you created at the SendGrid creation post and press create. https://www.e-apostolidis.gr/microsoft/azure/azure-free-smtp-relay-using-sendgrid/
    Fill the From address, To address and Subject. At the email body, add dynamic content and select the blocs of the previous set result.
    Press Save to save the Flow and Run to test it.
    The result at my email:

  25. proximagr
    Connect two or more Azure Virtual Networks using one VPN Gateway
    Peering is a feature that allows to connect two or more virtual networks and act as one bigger network. At this post we will see how we can connect two Azure Virtual Networks, using peering and access the whole network using one VPN Gateway. We can connect Virtual Networks despite if they are in the same Subscription or not.
    I have created a diagram to help understand the topology.

    We have a Virtual Network with Site-2-Site VPN wto On Premises. It can also have Point-2-Site connection configured. The VNET A. We have another Virtual Network at the Same Subscription that we want to connect each other. The VNET B. Also we can have a third Virtual Network at a different subscription. The VNET C.

    In sort we need those peerings with the specific settings:
    At the VNETA Peering VNETA to VNETB with “Allow Gateway transit” At the VNETA Peering VNETA to VNET At the VNETB Peering VNETB to VNETA with “Use Remote Gateway” At the VNETB Peering VNETB to VNETC At the VNETC Peering VNETC to VNETA with “Use Remote Gateway” At the VNETC Peering VNETC to VNETB

    In order to be able to connect all those networks and also access them using the VPN Connection there are four requirements:
    The account that will be used to create the peering must have the “Network Contributor” Role. The Address Space must be different on each other and not overlap. All other Virtual Networks, except the one that has the VPN Connection must NOT have a VPN Gateway deployed. Of course at the local VPN device (router) we need to add the address spaces of all the Virtual Networks that we need to access.
    Lets lab it:
    HQ 192.168.0.0/16 –> The on-premises network VNET A 10.1.0.0/16 –> The Virtual Network that has the VPN Gateway (At my lab is named “devvn”) VNET B 10.229.128.0/24 –> THe virtual network at a different subscription of the Gateway (At my lab is named “Network prtg-rsg-vnet”) VNET C 172.16.1.0/24 –> The virtual network at the same subscription as the Gateway Network (At my lab is named “provsevnet)

    The on-premises network is connected with Site-to-site (IPsec) VPN to the VNETA

    Now we need to connect VNETA and VNETB using Vnet Peering. in order to have a Peering connection we need to create a connection from VNETA to VNETB and one from VNETB to VNETA.
    Open the VNETA Virtual Network, go to the Peerings setting and press +ADD
    Select the VNETB and check the “Allow Gateway transit” to allow the peer virtual network to use your virtual network gateway


    Then go to the VNETB, go to the Peerings setting and click +ADD.
    Select the VNETA Virtual Network and check the “Use Remote Gateway” to use the peer’s virtual network gateway. This way the VNETB will use the VNETA’s Gateway.


    Now we can contact the VNETB network from our on-premises network
    a multi-ping screenshot:
    From 10.229.128.5 (VNETB) to 192.168.0.4 (on-premises) & the opposite From 10..1.2.4 (VNETA) to 10.229.128.5 (VNETB) & to 192.168.0.4 (on-premises)

    The next step is to create a cross-subscription peering VNETA with VNETC
    Open the VNETA and create a peering by selecting the VNETC from the other Subscription and check the “allow gateway transit”

    Then go to the VNETC and create a peer with the VNETA and check the “use remote gaeway”

    With the two above connections we have connectivity between the on-premises network and the VNETC.
    The final step, to enable the connectivity between VNETB & VNETC. To accomplish this just create one peer from the VNETB to VNETC and one from VNETC to VNETB.
    Ping inception:

    In order to have client VPN connectivity to the whole network, create a Point-2-Site VPN at the VNETA. You can follow this guide: Azure Start Point | Point-to-Site VPN
×
×
  • Create New...