<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by İlham Bayramov on Medium]]></title>
        <description><![CDATA[Stories by İlham Bayramov on Medium]]></description>
        <link>https://medium.com/@azsecured?source=rss-3187f9377f90------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WJBmHUXcWI_8OjlYPnhAzA.jpeg</url>
            <title>Stories by İlham Bayramov on Medium</title>
            <link>https://medium.com/@azsecured?source=rss-3187f9377f90------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 02:29:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@azsecured/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Integrating HashiCorp Consul with Keycloak for SSO]]></title>
            <link>https://medium.com/@azsecured/integrating-hashicorp-consul-with-keycloak-for-sso-c9d84c2973b5?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9d84c2973b5</guid>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Fri, 22 Nov 2024 14:48:37 GMT</pubDate>
            <atom:updated>2024-11-22T14:48:37.885Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_YtRb-m-uaiBwHYmo100A.png" /></figure><p>Hashicorp Consul version: v1.17.1+ent <br>Keycloak version: 21.0.1</p><ol><li>First, need to create the realm on Keycloak named consul.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MWLn-keBCInd30cHOpxreA.png" /></figure><p>2. Switch to new realm and Clients page. Create a new Client named consul.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E6iKMB9V8Yc6cUtyD53kOw.png" /></figure><p>Turn on Client authentication on the next page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*58YqjhesK-2F4gc5lLoqdQ.png" /></figure><p>Write Root URL and Valid redirect URLs and Save the page.<br>Note: If you using Consul with IP, you must write URLs with IP. Example: <a href="http://10.0.60.10:8500/">http://10.0.60.10:8500</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VsB3NvAbKjoBpmsn-x1u5w.png" /></figure><p>3. Then switch to the Client scopes page and create a new one named groups. Also, change the type to the Default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rKQ5SJ_tF8o7gxSQquK2OQ.png" /></figure><p>After Save this configuration, need to switch the Mappers page and create two Mappers. <br><strong>First:</strong> <em>Client scopes &gt; groups &gt; Mappers &gt; Configure a new mapper &gt; User Attribute</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qoc42R1CnJUHBduHEAzoug.png" /></figure><p><strong>Second:</strong> <em>Client scopes &gt; groups &gt; Mappers &gt; Add mapper &gt; By configuration &gt; Group Membership</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7sGSZ_NxM9CVW5pkh1YLaA.png" /></figure><p>4. Create local group named admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gIZm74-Hzmo4TfPI975Npg.png" /></figure><p>5. Create a local user named test and join the group admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VdtH_Oo2aMzIZjNvZmkonw.png" /></figure><p>6. Set password for test user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zdjNlf2sbsAv0dB4THKGZg.png" /></figure><p>7. Let’s prepare the config for the import Licensed Enterprise Consul.</p><p>OIDCClientID — is the client name on Keycloak.<br>OIDCClientSecret — is the Client secret on Keycloak.</p><pre>vi /root/keycloak.conf<br><br>{<br>  &quot;OIDCDiscoveryURL&quot;: &quot;https://keycloak.yourbusiness.com/realms/consul&quot;,<br>  &quot;OIDCClientID&quot;: &quot;consul&quot;,<br>  &quot;OIDCClientSecret&quot;: &quot;hL53U3cfTT7JHVGsvBDJpatXs67wvzsK&quot;,<br>  &quot;AllowedRedirectURIs&quot;: [<br>    &quot;https://consul.yourbusiness.com/ui/oidc/callback&quot;<br>  ],<br>  &quot;ListClaimMappings&quot;: {<br>    &quot;roles&quot;: &quot;roles&quot;,<br>    &quot;groups&quot;: &quot;groups&quot;<br>  }<br>}</pre><p>8. Get OIDCClientSecret from Keycloak.<br> <em>Clients &gt; consul &gt; Credentials &gt; Client secret</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q0e5Km174VvgEmfxUiZ-vw.png" /></figure><p>9. After preparing the configuration file, must import it into HashiCorp Consul.</p><pre>export CONSUL_HTTP_TOKEN=&quot;&lt; Bootstrap Token &gt;&quot;<br><br>consul acl auth-method create -type oidc -name keycloak -max-token-ttl=5m -config=@/root/keycloak.conf</pre><p>10. Create readonly policy for admin group.</p><pre>consul acl policy create -name admin-ro -rules=&#39;key_prefix &quot;&quot; { policy = &quot;read&quot; }&#39;</pre><p>11. Create role and bind policy.</p><pre>consul acl role create -name admin-ro -policy-name admin-ro</pre><p>12. Create bind rule.<br><em>Note: admin is a Keycloak group within the quotation marks of the selector.</em></p><pre>consul acl binding-rule create -method=keycloak -bind-type=role -bind-name=admin-ro -selector=&#39;admin in list.groups&#39;  </pre><p>13. You can now log in to Consul using Keycloak SSO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7NgHWXIG1oqKK-ZxqSWmDg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9d84c2973b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Kafdrop with Helm and connect to SASL_PLAINTEXT Kafka (ACL)]]></title>
            <link>https://medium.com/@azsecured/install-kafdrop-with-helm-and-connect-to-sasl-plaintext-kafka-acl-4110f3e4647c?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/4110f3e4647c</guid>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Fri, 28 Jul 2023 07:31:29 GMT</pubDate>
            <atom:updated>2023-07-28T08:10:49.002Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QUi5GJC9gg91ftep.png" /></figure><p>You also should read my previous post for install Kafka with SASL_PLAIN and ACL: <a href="https://medium.com/@azsecured/install-kafka-cluster-kraft-with-sasl-plaintext-and-acl-configs-ae01a1e0040d">https://medium.com/@azsecured/install-kafka-cluster-kraft-with-sasl-plaintext-and-acl-configs-ae01a1e0040d</a></p><p>First, we must create a read-only Kafdrop user for all topics.</p><pre>bash /opt/kafka/bin/kafka-acls.sh --bootstrap-server serverip:9092 --command-config /opt/kafka/config/kraft/admin.config --add --allow-principal User:kafdrop --operation Read --topic &#39;*&#39;</pre><pre>git clone https://github.com/obsidiandynamics/kafdrop &amp;&amp; cd kafdrop</pre><p>Create a kafka.properties file with Kafka credentials:</p><pre>cat &lt;&lt; EOF &gt; kafka.properties<br>sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username=&quot;kafdrop&quot; password=&quot;kafdrop&quot;;<br>security.protocol=SASL_PLAINTEXT<br>sasl.mechanism=PLAIN<br>EOF</pre><p>Install Kafdrop:</p><pre>helm install -f values.yaml kafkadrop . --set kafka.properties=&quot;$(cat kafka.properties | base64)&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*9nxrm9obo9DlrojE" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4110f3e4647c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Kafka Cluster(Kraft) with SASL_PLAINTEXT and ACL configs]]></title>
            <link>https://medium.com/@azsecured/install-kafka-cluster-kraft-with-sasl-plaintext-and-acl-configs-ae01a1e0040d?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae01a1e0040d</guid>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Thu, 27 Jul 2023 14:37:43 GMT</pubDate>
            <atom:updated>2023-07-28T07:39:03.754Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wmGvvcskcdgNNRYM.png" /></figure><p>Kafka version: 3.5.1<br>OS: Rhel 8</p><p>Update OS and Install Java 11:</p><pre>yum update<br>yum install java-11-openjdk.x86_64</pre><p>Download and move to permanent folder Kafka:</p><pre>wget https://downloads.apache.org/kafka/3.5.1/kafka_2.13-3.5.1.tgz<br>tar -xvf kafka_2.13–3.5.1.tgz<br>mv kafka_2.13–3.5.1 kafka<br>mv kafka /opt</pre><p>Configure Kafka with Kraft:</p><pre>sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config<br><br>setenforce 0<br><br>systemctl disable — now firewalld<br><br>mkdir /opt/kafka/data<br><br>mkdir /opt/kafka/logs_metadata<br><br>cd /opt/kafka/config/kraft/<br><br>mv server.properties server.properties.org<br><br>vim server.properties <br><br># Warning. node.id will be different. Example: node.id=1 on the server1, node.id=2 on the server 2 etc.<br>#########################<br> <br>node.id=1<br>num.network.threads=3<br>num.io.threads=8<br>log.dirs=/opt/kafka/data<br>metadata.log.dir=/opt/kafka/logs_metadata<br> <br> <br>process.roles=broker,controller<br>listeners=BROKER://serverip:9092,CONTROLLER://serverip:9093<br>advertised.listeners=BROKER://serverip:9092<br>listener.security.protocol.map=BROKER:SASL_PLAINTEXT,CONTROLLER:SASL_PLAINTEXT<br>controller.quorum.voters=1@server1ip:9093,2@server2ip:9093,3@server3ip:9093<br> <br>inter.broker.listener.name=BROKER<br>controller.listener.names=CONTROLLER<br> <br>sasl.enabled.mechanisms=PLAIN<br>sasl.mechanism.controller.protocol=PLAIN<br>sasl.mechanism.inter.broker.protocol=PLAIN<br> <br>authorizer.class.name=org.apache.kafka.metadata.authorizer.StandardAuthorizer<br>allow.everyone.if.no.acl.found=false<br>super.users=User:admin<br> <br>delete.topic.enable=true<br>socket.send.buffer.bytes=1048576<br>socket.receive.buffer.bytes=1048576<br>socket.request.max.bytes=104857600<br> <br>num.partitions=3<br>default.replication.factor=2<br>min.insync.replicas=2<br>log.retention.hours=168<br>log.segment.bytes=1073741824<br>log.retention.check.interval.ms=300000<br>auto.create.topics.enable=true<br>unclean.leader.election.enable=false<br> <br>############################</pre><p>Generate Kafka cluster ID:</p><pre>bash /opt/kafka/bin/kafka-storage.sh random-uuid</pre><p>Use the same Kafka cluster ID on each node:</p><pre>bash /opt/kafka/bin/kafka-storage.sh format -t GeneratedUUID -c /opt/kafka/config/kraft/server.properties</pre><p>Configure JAAS file. This file is for cluster authentication. Also, users will be configured on this file:</p><pre>vim /opt/kafka/config/kraft/jaas.config<br> <br>KafkaServer {<br> org.apache.kafka.common.security.plain.PlainLoginModule required<br> username=&quot;admin&quot;<br> password=&quot;admin&quot;<br> user_admin=&quot;admin&quot;<br> user_usera=&quot;usera&quot;<br> user_userb=&quot;userb&quot;;<br>};</pre><p>Create a config file for maintenance Kafka brokers. Because also server admins cannot do anything without authentication: (Create new topic,ACL etc..)</p><pre>vi /opt/kafka/config/kraft/admin.config<br> <br>sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username=&quot;admin&quot; password=&quot;admin&quot;;<br>security.protocol=SASL_PLAINTEXT<br>sasl.mechanism=PLAIN</pre><p>Create Kafka service:</p><pre>vim /etc/systemd/system/kafka.service<br> <br>[Unit]<br>Description=kafka Service<br>After=network-online.target<br>Requires=network-online.target<br> <br>[Service]<br> <br>Type=simple<br>Restart=on-failure<br><br>User=root<br>Group=root<br>SyslogIdentifier=kafka<br>Environment=&quot;KAFKA_HEAP_OPTS=-Xms1G -Xmx1G&quot;<br>Environment=&quot;KAFKA_OPTS=-Djava.security.auth.login.config=/opt/kafka/config/kraft/jaas.config&quot;<br> <br>ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/kraft/server.properties<br>ExecStop=/opt/kafka/bin/kafka-server-stop.sh /opt/kafka/config/kraft/server.properties<br>WorkingDirectory=/opt/kafka<br> <br>[Install]<br>WantedBy=multi-user.target</pre><p>Start and enable Kafka service:</p><pre>systemctl daemon-reload<br> <br>systemctl enable --now kafka</pre><p>Create Kafka Topic:</p><pre>bash /opt/kafka/bin/kafka-topics.sh — bootstrap-server serverip:9092 — create — topic newtopic — partitions 2 — replication-factor 2 — command-config /opt/kafka/config/kraft/admin.config</pre><p>Grant access to user for topic: (Operation can be: All,Read,Write etc..)</p><pre>bash /opt/kafka/bin/kafka-acls.sh — bootstrap-server serverip:9092 — command-config /opt/kafka/config/kraft/admin.config — add — allow-principal User:usera — operation All — topic newtopic</pre><p>Remove access of user from topic:</p><pre>bash /opt/kafka/bin/kafka-acls.sh — bootstrap-server serverip:9092 — command-config /opt/kafka/config/kraft/admin.config — remove — allow-principal User:usera — operation Write — topic newtopic</pre><p>Grant access to user for read from consumer group:</p><pre>bash /opt/kafka/bin/kafka-acls.sh — bootstrap-server serverip:9092 — command-config /opt/kafka/config/kraft/admin.config — add — allow-principal User:admin — operation All— topic newtopic — group &#39;consumergroupname&#39;</pre><p>Create Consumer Group for topic:</p><pre>bash /opt/kafka/bin/kafka-console-consumer.sh — bootstrap-server serverip:9092 — topic newtopic — from-beginning — group consumergroupname — consumer.config /opt/kafka/config/kraft/admin.config</pre><p>List all ACLs:</p><pre>bash /opt/kafka/bin/kafka-acls.sh — bootstrap-server serverip:9092 — list — command-config /opt/kafka/config/kraft/admin.config</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae01a1e0040d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Change token time-to-live (TTL) on Hashicorp Vault]]></title>
            <link>https://medium.com/@azsecured/change-token-time-to-live-ttl-on-hashicorp-vault-52f1bef6ca62?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/52f1bef6ca62</guid>
            <category><![CDATA[hashicorp]]></category>
            <category><![CDATA[vault]]></category>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Thu, 09 Apr 2020 12:53:03 GMT</pubDate>
            <atom:updated>2020-04-09T12:53:03.150Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*AzqaobgjEWW9QsK4jzyAdg.png" /></figure><p>Vault version: v1.3.0</p><blockquote>Create token for test policy:</blockquote><pre>vault token create --policy=test</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*ZJnXfCgyREBOm6S3n-6iiQ.png" /></figure><p>token_duration is 768h.</p><blockquote>Show default <strong><em>default_lease_ttl</em></strong> and <strong><em>max_lease_ttl</em></strong><em> values.</em></blockquote><pre>vault read sys/auth/token/tune</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*jl2QolSar5EuJPA8UNDYPw.png" /></figure><blockquote>Change default values.</blockquote><p><em>*9000h for 1 year</em></p><pre>vault write sys/auth/token/tune max_lease_ttl=9000h<br>vault write sys/auth/token/tune default_lease_ttl=9000h</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*eRCB0fRkc836Kl9fXLbqoQ.png" /></figure><blockquote>Now again create token for test policy:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*Rh1h_3syqNk5ieJnkYLXsA.png" /></figure><p>token_duration is changed.</p><blockquote>Also can set custom TTL for token with period parameter:</blockquote><pre>vault token create --policy=test -period=5000h</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*dNmWXRWuTYa108cxx9JLRw.png" /></figure><p>token_duration is 5000h.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52f1bef6ca62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoDB primary failover with Keepalived (with MongoDB cluster)]]></title>
            <link>https://medium.com/@azsecured/mongodb-primary-failover-with-keepalived-with-mongodb-cluster-3462469a9730?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/3462469a9730</guid>
            <category><![CDATA[keepalived]]></category>
            <category><![CDATA[cluster]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Wed, 23 Oct 2019 12:14:26 GMT</pubDate>
            <atom:updated>2019-10-23T12:21:01.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*P1GQuH8fKHegIzLILu-nMA.jpeg" /></figure><p>OS: Centos 7.6<br>MongoDB version: 3.4<br>Keepalived version: 1.3.5<br>Firewalld and Selinux: Disabled</p><p><strong>Topology:</strong></p><p>You will need 3 minimum nodes for cluster.<br>- One node primary<br>- One node secondary<br>- One node arbiter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*eIE7iXcNL6QLnvMMB5O69A.jpeg" /></figure><p><strong>Configure Centos:</strong></p><p><em>*you will need to follow the same procedure in 3 nodes.</em></p><p>Change hostname:</p><blockquote>hostnamectl set-hostname mongo1<br>hostnamectl set-hostname mongo2<br>hostnamectl set-hostname mongo3</blockquote><p>Add hostnames on <strong><em>/etc/hosts</em></strong> file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*_jY2OHL28WSsMC61pWrwpA.png" /></figure><p><strong>Create MongoDB repository:</strong></p><p><em>*you will need to follow the same procedure in 3 nodes.</em></p><p>Create repo file</p><blockquote>vi /etc/yum.repos.d/mongo.repo</blockquote><p>paste here</p><blockquote>[mongodb-org-3.4]<br>name=MongoDB Repository<br>baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/<br>gpgcheck=0<br>enabled=1<br>gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc</blockquote><p>save and exit.</p><p><strong>Install MongoDB server:</strong></p><p><em>*you will need to follow the same procedure in 3 nodes.</em></p><blockquote>yum install -y mongodb-org</blockquote><p><strong>Configure MongoDB server:</strong></p><p><em>*you will need to follow the same procedure in 3 nodes.</em></p><p>Open <em>/etc/mongod.conf</em></p><p><strong>bindIp: 127.0.0.1</strong> replace this line to <strong>bindIp: 0.0.0.0</strong></p><p>Uncomment this line <strong>#replication: </strong>and add this line<strong> replSetName: repname</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*UQkfrQtORYMAe7kBQ8fpZw.png" /></figure><p>Save and exit.</p><p>Restart mongod service.</p><blockquote>systemctl restart mongod<br>systemctl enable mongod</blockquote><p><strong>Configure MongoDB cluster:</strong></p><p>* <strong>This applies to ONLY one node.Select one node and issue the following commands.(mongo1)</strong></p><ul><li>mongo</li><li>rs.initiate()</li><li>rs.add(“mongo2”)</li><li>rs.addArb(“mongo3”)</li><li>rs.config();</li></ul><p>Show cluster status:</p><ul><li>rs.status()</li></ul><p><strong>Install Keepalived and configure service:</strong></p><p><em>*you will need to follow the same procedure in Primary and Secondary nodes.</em></p><blockquote>yum install -y keepalived gcc kernel-headers kernel-devel</blockquote><p>Configure Keepalived:</p><blockquote>mv /etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf.org</blockquote><p>Paste configs on this file /etc/keepalived/keepalived.conf</p><blockquote>vi /etc/keepalived/keepalived.conf</blockquote><p>Set your custom network adapter name and virtual ip on config:</p><blockquote>global_defs {<br> router_id MONGODB_DB-HA<br>}</blockquote><blockquote># Define the script used to check if mongod is running<br>vrrp_script chk_mongod {<br> script “killall -0 mongod”<br> interval 2 # every two seconds<br> weight 2<br>}</blockquote><blockquote># Define the script to see if the local node is the primary<br>vrrp_script chk_mongo_primary {<br> script “/etc/keepalived/ck_mongo_master”<br> interval 2 # every two seconds<br> weight 2<br>}</blockquote><blockquote>vrrp_instance VI_2 {<br> state BACKUP<br> interface <strong>ens33</strong><br> virtual_router_id 50<br> priority 103<br> advert_int 1<br> authentication {<br> auth_type PASS<br> auth_pass pass<br> }<br> virtual_ipaddress {<br> <strong>virtual-ip-here</strong><br> }<br> track_script {<br> chk_mongod<br> chk_mongo_primary<br> }<br>}</blockquote><p>Create file on this location <strong><em>/etc/keepalived/ck_mongo_master</em></strong> for checking MongoDB Primary status:</p><blockquote>vi <em>/etc/keepalived/ck_mongo_master</em></blockquote><p>Paster configs:</p><blockquote>#!/bin/bash</blockquote><blockquote>ISMASTER=$(/usr/bin/mongo -host 127.0.0.1 --quiet --eval ‘db.isMaster().ismaster’)</blockquote><blockquote>if [ $ISMASTER == ‘true’ ]; then<br>exit 0<br>else<br>exit 1<br>fi</blockquote><p>Assign execution permission this file:</p><blockquote>chmod +x <em>/etc/keepalived/ck_mongo_master</em></blockquote><p>Finally restart keepalived service on Primary and Secondary MongoDB nodes:</p><blockquote>systemctl restart keepalived<br>systemctl enable keepalived</blockquote><p><strong>Test failover:</strong></p><p>Connect virutal ip with ssh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*cjmNKg4IO9_bbHzj_ZxdLw.png" /></figure><p>Virtual ip is on <strong><em>mongo1 </em></strong>node and mongo is <strong><em>primary</em></strong></p><p>Now stop mongod service:</p><blockquote>systemctl stop mongod</blockquote><p>Reconnect virtual ip with ssh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*CUKv4ZQmRw6Xol-8VjhYzg.png" /></figure><p>MongoDB node is faliovered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3462469a9730" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Hashicorp Consul agent on Windows server]]></title>
            <link>https://medium.com/@azsecured/install-hashicorp-consul-agent-on-windows-server-cba60bbb4fdd?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/cba60bbb4fdd</guid>
            <category><![CDATA[hashicorp]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[consul]]></category>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Wed, 16 Oct 2019 07:36:13 GMT</pubDate>
            <atom:updated>2019-10-23T10:13:18.068Z</atom:updated>
            <content:encoded><![CDATA[<h3>Install Hashicorp Consul agent on Windows Server</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*13KdMnQ7oE1GjwBGelngcQ.png" /></figure><p>Consul version: 1.5.3<br>Server version: Windows server 2008 R2 Datacenter</p><p><strong>Make directory for Consul:</strong></p><p>Run cmd as Administrator:</p><blockquote>cd c:/<br>mkdir “consul/config”<br>mkdir “consul/data”</blockquote><p>Create <em>config.json</em> file on <em>consul/config</em> folder.</p><blockquote>{<br> “server”: false,<br> “bootstrap”: false,<br> “data_dir”: “c:\\consul\\data\\”,<br> “log_level”: “INFO”,<br> “datacenter”:”<strong>Datacenter name</strong>”,<br> “encrypt”: “<strong>u4+YYqd6FjKqA8CmFFpPcA==</strong>”,<br> “start_join”: [<br> “<strong>Consul server ip</strong>”<br> ]<br>}</blockquote><p>Download Consul for Windows from here: <a href="https://www.consul.io/downloads.html">Download</a></p><p>Unzip consul.exe and move <em>c:/consul</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*bQqrIMf10Vp6LD4Q1GirOQ.png" /></figure><p><strong>Create Consul Service:</strong></p><p>Run cmd as Administrator:</p><blockquote>sc.exe create “Consul-service” binPath= “C:\consul\consul.exe agent -config-dir C:\consul\config” DisplayName= “Consul-service” start= auto</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*uEAFOt0GJCzu1liosbVbbw.png" /></figure><p>Start service:</p><blockquote>sc.exe start “Consul-service”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*E3O965-5cw73Muc_SOrmNw.png" /></figure><p>View Consul members:</p><blockquote>consul.exe members</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*Jm11vlqfwsgvncIiHml_QQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cba60bbb4fdd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use yum for download a package rpms without install]]></title>
            <link>https://medium.com/@azsecured/use-yum-for-download-a-package-rpms-without-install-53b90f2585a1?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/53b90f2585a1</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[red-hat]]></category>
            <category><![CDATA[rpm]]></category>
            <category><![CDATA[package]]></category>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Mon, 03 Jun 2019 13:19:11 GMT</pubDate>
            <atom:updated>2019-06-03T13:19:11.175Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*2dY7jIlQTwEgg1ouxq8pUA.jpeg" /></figure><p>OS: CentOS 7<br>Download required package and dependencies package rpms from yum.Can use this rpms on offline CentOS.<br>Example package is <em>httpd</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*Tz63vwSItI6PhjmV-7-5Og.png" /></figure><p>Install <em>yum-plugin-downloadonly</em> package.</p><blockquote>yum install yum-plugin-downloadonly</blockquote><p>Use <em>--downloadonly </em>option on yum command.</p><blockquote>yum install --downloadonly --downloaddir=&lt;directory&gt; &lt;package&gt;</blockquote><h4>Example:</h4><blockquote>yum install --downloadonly --downloaddir=/tmp/yum httpd</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*QIKumRYuHJGu_OSFyBwsMQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53b90f2585a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup OpenVPN on pFSense]]></title>
            <link>https://medium.com/@azsecured/setup-openvpn-on-pfsense-68cf24aadd3c?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/68cf24aadd3c</guid>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[firewall]]></category>
            <category><![CDATA[pfsense]]></category>
            <category><![CDATA[openvpn]]></category>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Mon, 18 Feb 2019 11:33:01 GMT</pubDate>
            <atom:updated>2019-02-18T11:33:01.529Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Yt5zTEOUbo6i22rTm3wvw.png" /></figure><h4>Setup OpenVPN on pFSense</h4><p>PfSense Wan ip: Static<br>PfSense LAN ip: 192.168.1.1/24<br>OpenVPN tunnel ip: 10.0.8.0/24</p><p>Login PfSense admin page.</p><h4>First create CA certificate.</h4><blockquote>System &gt; Certificate Manager &gt;CAs</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*DVn6bnoGOZAlX7Mj3ZNijg.png" /></figure><p>Click +Add for create for new CA certificate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*pS8-cFXL7Gz_y3vZgW0RIQ.png" /></figure><p>Descriptive name: Name for CA certificate<br>Method: Create an Internal Certificate Authority<br>Key length: Select 2048 for use stronger<br>Digest Algorithm: Select sha512 for use stronger<br>Lifetime: 3650 (Default)<br>Common Name: Write CA certificate name<br>Write Country Code,State or Province etc.. <br>And click to Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*1GmO6scPJtQyiU3DoiEwRA.png" /></figure><h4>Create server certificate:</h4><blockquote>System &gt; Certificate Manager &gt; Certificates</blockquote><p>Method: Create an Internal Certificate Authority<br>Descriptive name: Name for server certificate<br>Digest Algorithm: Select sha512 for use stronger<br>Common name: PfSense url<br>Certificate Type: Server Certificate<br>And click to Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*0lId22ST_9yGeHGWOCn_cQ.png" /></figure><h4>Configure OpenVPN server:</h4><blockquote>VPN &gt; OpenVPN</blockquote><p>Click Wizards for easy setup OpenVPN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*E2PieswPke6q0ZW5zSZpeQ.png" /></figure><p>Select “Local User Access” for authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*7EF3tawnAwlYKN1_9AOBvA.png" /></figure><p>Select CA certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*2v6Oe6-Y0Rr2OnQbWjEMJQ.png" /></figure><p>Select server certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*JWdkGVLbjDxW1quNxc_CAw.png" /></figure><p>Change <em>Auth Digest Algorithm </em>to<em> SHA512.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*8O1Pg0gWK2JrRn14eYKWew.png" /></figure><p>Set ip address for <em>Tunnel Network (eg.:10.0.8.0/24),<br></em>Select <em>Redirect Gateway,<br></em>Write DNS ip<em> </em>into “<em>DNS Server”</em> box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*mbrgptLOxsBGof-SsvWkig.png" /></figure><p>Select “Firewall rule” and “OpenVPN rule” for access from WAN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*Eli4Aa2ED-KBNCgkpec28w.png" /></figure><p>Next and select Finish.Now OpenVPN created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*d_LxIvwWjlJy8mHPJSim3g.png" /></figure><h4>Assignments network card for OpenVPN.</h4><blockquote>Interfaces Interface &gt; Assignments</blockquote><p>Select <em>ovpns1()</em> network card name on <em>“Available network ports” </em>and click<em> +Add.</em>After created <em>OPT1 </em>network card name,click to Save<em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*YH6DYF3hiQnm8yy0sGhS4g.png" /></figure><h4>Create certificate for user.</h4><blockquote>SystemUser &gt; Manager &gt; Users</blockquote><p>Click <em>+Add</em> for add new standart user access to OpenVPN server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0qqvtrQyr3-KMncPKEcgw.png" /></figure><p>Enter user credentials and create user.<br><strong>Note</strong>:Dont select <em>Certificate</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6C0S7561QolFaZrONApJQ.png" /></figure><p>After create user,click edit button for edit user.On User Certificates box click +Add for create user certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*pqBMrSytLS1nLXzoFv5bpg.png" /></figure><p>Descriptive name: user certificate name<br>Digest Algorithm: select SHA512<br>Common Name: PfSense url<br>Certificate type: User certificate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*j91eUOZ3X302xJ6XwDxECw.png" /></figure><p>Save certificate and exit.</p><h4>Install package for export client certificate.</h4><blockquote>System &gt; Package Manager &gt;Available Packages</blockquote><p>Type search box package name <em>“openvpn-client-export”.</em>Find package and click <em>+Install</em> button for install package.</p><p>After installation package follow this path for download user certificate:</p><blockquote>Vpn &gt; OpenVPN &gt; Client Export</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*SDuwqfN0lORQ-6mwp13ctw.png" /></figure><p>Go to page down and download user certificate.</p><p>Note:Select <em>Archive </em>from <em>“Bundled Configurations”</em> for Windows clients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*1-cdgSIoDzKqD4yxbYgmCA.png" /></figure><p>Now PfSense ready for allow connection from clients.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68cf24aadd3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install MS SQL server on Centos 7]]></title>
            <link>https://medium.com/@azsecured/install-ms-sql-server-on-centos-7-b6d8e3ef9c1?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6d8e3ef9c1</guid>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[mssql]]></category>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Thu, 11 Oct 2018 13:01:45 GMT</pubDate>
            <atom:updated>2018-10-11T13:16:57.959Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*EVjRB_AFhD7KgNIBwt53kQ.png" /></figure><p>Add MS SQL server 2017 repository to repo folder:</p><blockquote>curl <a href="https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo">https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo</a> -o /etc/yum.repos.d/mssql-server-2017.repo<br>curl <a href="https://packages.microsoft.com/config/rhel/7/prod.repo">https://packages.microsoft.com/config/rhel/7/prod.repo</a> &gt; /etc/yum.repos.d/msprod.repo</blockquote><p>Install MS SQL, MS SQL tools and UnixODBC-devel packages:</p><blockquote><a href="https://www.server-world.info/en/command/html/yum.html">yum</a> install mssql-server mssql-tools unixODBC-devel</blockquote><p>Run initial Setup:</p><blockquote>/opt/mssql/bin/mssql-conf setup</blockquote><p>Select your edition,accept the license,enter administrator password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*EnsARo6Adsq6-Ljh0f10Zg.png" /></figure><p>Check MS SQL status:</p><blockquote>systemctl status mssql-server</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*aOLvL_vpkgTCa_mit3A7mA.png" /></figure><p>Add<em> /opt/mssql-tools/bin/</em> to your <strong>PATH</strong> environment variable in a bash shell.</p><blockquote>echo ‘export PATH=”$PATH:/opt/mssql-tools/bin”’ &gt;&gt; ~/.bash_profile<br>echo ‘export PATH=”$PATH:/opt/mssql-tools/bin”’ &gt;&gt; ~/.bashrc<br>source ~/.bashrc</blockquote><p>Connect to local server:</p><blockquote>sqlcmd -S localhost -U username</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*FtxmULLE3ibD7cepswVt4Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6d8e3ef9c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master to Slave and Master to Master replication on MySQL 5.7]]></title>
            <link>https://medium.com/@azsecured/master-to-slave-and-master-to-master-replication-on-mysql-5-7-20e7ed73e158?source=rss-3187f9377f90------2</link>
            <guid isPermaLink="false">https://medium.com/p/20e7ed73e158</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[replication]]></category>
            <category><![CDATA[centos]]></category>
            <dc:creator><![CDATA[İlham Bayramov]]></dc:creator>
            <pubDate>Fri, 28 Sep 2018 14:15:56 GMT</pubDate>
            <atom:updated>2019-03-05T07:15:15.084Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUXBE0jN5rM6NQ5_YsjG7Q.png" /></figure><p>OS version: Centos 7<br>MySQL version: 5.7.23</p><p><strong>Install MySQL:</strong></p><blockquote>wget <a href="https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql57-community-release-el7-10.noarch.rpm">https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql57-community-release-el7-10.noarch.rpm</a><br>rpm -Uvh mysql57-community-release-el7–10.noarch.rpm<br>yum install mysql-server</blockquote><p><strong>Start service:</strong></p><blockquote>systemctl start mysqld<br>systemctl enable mysqld<br>mysql_secure_installation</blockquote><p><strong>Configure Master to Slave replication:</strong></p><p>Master MySQL ip: 192.168.88.130<br>Slave MySQL ip: 192.168.88.131</p><p>First configure master database.</p><p>Create log folder:</p><blockquote>mkdir /var/log/mysql<br>chown mysql:mysql /var/log/mysql</blockquote><p>Add config files undo <em>[mysqld]</em> in <em>/etc/my.cnf</em>.</p><blockquote>server-id = 1<br>log_bin = /var/log/mysql/mysql-bin.log</blockquote><p>Restart service:</p><blockquote>systemctl restart mysqld</blockquote><p>Login to mysql and add <em>slave_user</em> for slave server :</p><pre>1)mysql -u root -p<br>2)CREATE USER &#39;slave_user&#39;@&#39;192.168.88.131&#39; IDENTIFIED BY &#39;password&#39;;<br>3)GRANT REPLICATION SLAVE ON * . * TO &#39;slave_user&#39;@&#39;192.168.88.131&#39;;<br>FLUSH PRIVILEGES;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*b40jD3NvfO-pCUr5wsWejA.png" /><figcaption>Master status.</figcaption></figure><p>Second configure slave database.</p><p>Install MySQL.<br>Create log folder.</p><p>Add config files undo <em>[mysqld]</em> in <em>/etc/my.cnf</em>.</p><blockquote>server-id = 2<br>log_bin = /var/log/mysql/mysql-bin.log</blockquote><p>Restart service:</p><blockquote>systemctl restart mysqld</blockquote><p>Login to mysql and add master server credentials:</p><pre>1)mysql -u root -p<br>2)STOP SLAVE;<br>3)CHANGE MASTER TO MASTER_HOST=&#39;192.168.88.130&#39;,MASTER_USER=&#39;slave_user&#39;, MASTER_PASSWORD=&#39;password&#39;, MASTER_LOG_FILE=&#39;mysql-bin.000001&#39;, MASTER_LOG_POS=155;<br>3)START SLAVE;</pre><p>Finally show slave status:</p><blockquote>SHOW SLAVE STATUS\G;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*BphAJu_ytW4915pCw4muLA.png" /></figure><p><strong>Configure Master to Master replication:</strong></p><p>Master-1 MySQL ip: 192.168.88.132<br>Master-2 MySQL ip: 192.168.88.133</p><p>Configure first master database.<br>Create log folder:</p><blockquote>mkdir /var/log/mysql<br>chown mysql:mysql /var/log/mysql</blockquote><p>Add config files undo <em>[mysqld]</em> in <em>/etc/my.cnf</em>.</p><blockquote>server-id = 1<br>log_bin = /var/log/mysql/mysql-bin.log<br>bind-address=0.0.0.0</blockquote><p>Restart service:</p><blockquote>systemctl restart mysqld</blockquote><p>Login to mysql and add <em>slave_user</em> for second master:</p><pre>1)mysql -u root -p<br>2)CREATE USER &#39;slave_user&#39;@&#39;192.168.88.133&#39; IDENTIFIED BY &#39;password&#39;;<br>3)GRANT REPLICATION SLAVE ON * . * TO &#39;slave_user&#39;@&#39;192.168.88.133&#39;;<br>4)FLUSH PRIVILEGES;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*06paNKpRkEXRHube2d9YIg.png" /></figure><p>Configure second master database.</p><p>Install MySQL.<br>Create log folder.</p><p>Add config files undo <em>[mysqld]</em> in <em>/etc/my.cnf</em>.</p><blockquote>server-id = 2<br>log_bin = /var/log/mysql/mysql-bin.log<br>bind-address=0.0.0.0</blockquote><p>Restart service:</p><blockquote>systemctl restart mysqld</blockquote><p>Login to mysql and add first master server credentials:</p><pre>1)mysql -u root -p<br>2)STOP SLAVE;<br>3)CHANGE MASTER TO MASTER_HOST=&#39;192.168.88.132&#39;,MASTER_USER=&#39;slave_user&#39;, MASTER_PASSWORD=&#39;password&#39;, MASTER_LOG_FILE=&#39;mysql-bin.000001&#39;, MASTER_LOG_POS=155;<br>4)START SLAVE;</pre><p>Finally show second master status:</p><blockquote>SHOW SLAVE STATUS\G;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*FeVr40tQkN3O3kg12DRgLg.png" /></figure><p>Create user for first master on second master server.</p><pre>1)CREATE USER &#39;slave_user&#39;@&#39;192.168.88.132&#39; IDENTIFIED BY &#39;password&#39;;<br>2)GRANT REPLICATION SLAVE ON * . * TO &#39;slave_user&#39;@&#39;192.168.88.132&#39;;<br>3)FLUSH PRIVILEGES;</pre><p>Login to first master and add second master credentials:</p><pre>1)mysql -u root -p<br>2)STOP SLAVE;<br>3)CHANGE MASTER TO MASTER_HOST=&#39;192.168.88.133&#39;,MASTER_USER=&#39;slave_user&#39;, MASTER_PASSWORD=&#39;password&#39;, MASTER_LOG_FILE=&#39;mysql-bin.000001&#39;, MASTER_LOG_POS=155;<br>4)START SLAVE;</pre><p>Finally show first master status:</p><blockquote>SHOW SLAVE STATUS\G;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*FeVr40tQkN3O3kg12DRgLg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20e7ed73e158" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>