tag:blogger.com,1999:blog-272469612024-03-14T18:25:26.713+09:00MySeq (#SimplifyCybersecurity #EssentialSecurity)Simplicity is the Ultimate Sophisticationzdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comBlogger972125tag:blogger.com,1999:blog-27246961.post-42926155259877098382022-12-31T12:00:00.010+09:002022-12-31T12:00:00.175+09:00Moving to GitHub<p></p><p>Starting from 2023, this blog is moving to <a href="https://myseq.github.io/">GitHub</a> to continue on my personal web site and blog management. </p><p>Thank you Blogger.com This is a long journey 16 years. Let's continue on <a href="https://myseq.github.io/">https://myseq.github.io/</a><br /></p><p><br /></p>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-70444096836198180152022-12-24T13:01:00.004+09:002023-03-02T13:05:09.884+09:00Cybersecurity Vs Database Engineering<p>What is the difference between Cybersecurity and Database engineering?</p><p></p><blockquote><i><span style="font-size: medium;">Cybersecurity specialists thinks 24 hours, and database engineer thinks end of every quarter.</span></i></blockquote><br /><p></p>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-82195192114658062202022-12-23T12:28:00.019+09:002023-02-20T12:30:03.044+09:00The different between Information security, security resilience and cybersecurity<p>Here is a Venn diagram that shows the difference between Information Security, Security Resilience, and Cybersecurity.</p><p style="text-align: center;"><span style="font-family: Ubuntu Mono;"> _____________<br /> / \<br /> / Cyber- \<br /> | security |<br /> \_____________/<br /> | |<br /> | |<br /> _____________________<br /> | |<br /> | Security Resilience |<br /> |_____________________|<br /> | |<br /> | |<br /> ___________________<br /> | |<br /> | Information Security |<br /> |___________________|</span><br /> </p><p>The diagram shows that Cybersecurity is a subset of Security Resilience,
as Security Resilience encompasses not just Cybersecurity but also
physical security, incident response planning, and business continuity
planning. Similarly, Information Security is a subset of Security
Resilience, as Security Resilience encompasses a broader set of
security-related activities beyond just information security. <br /></p>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-21071753319696808332022-12-22T12:19:00.008+09:002023-02-20T12:20:56.322+09:00Is there a difference between information security and Cybersecurity ? <p>Yes, there is a difference between information security and cybersecurity, although the two terms are often used interchangeably.<br /><br />Information security is a broader term that encompasses the protection of all forms of information, both digital and non-digital, from unauthorized access, use, disclosure, disruption, modification, or destruction. This includes physical security measures, such as locks and access controls, as well as technical and administrative controls, such as encryption and policies and procedures.<br /><br />Cybersecurity, on the other hand, specifically refers to the protection of digital information and systems from cyber threats, such as cyber attacks, hacking, malware, and other forms of unauthorized access, use, or disclosure. It involves the use of technical measures, such as firewalls, intrusion detection systems, and encryption, to secure digital assets.<br /><br />In summary, information security is a broader concept that includes both physical and digital security, while cybersecurity is a specific subset of information security that focuses solely on digital security.<br /></p>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-54573657738268286202022-12-21T19:22:00.004+09:002022-12-21T19:25:00.621+09:00Setup Jekyll<p>Jekyll is one of the most popular generators for static websites and is based on Ruby. To realize the actual website, the generator uses CSS, HTML and Markdown. Jekyll also offers easy migration from WordPress or other systems to the new environment.<br /></p><p>Here the steps I followed to setup Jekyll on Ubuntu.</p><p><br /></p><p>Let's start with installing Ruby and prerequisites.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ sudo apt install ruby-full build-essential zlib1g-dev</span></p><p>Then, setup the gem installation directory in the BASH startup.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc<br />$ echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc<br />$ echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc<br />$ source ~/.bashrc</span></p><p>Next, install Jekyll and Bundler:</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ gem install jekyll bundler</span></p><p>Now, just clone from the GitHub with the theme Chirpy.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ git clone https://github.com/cotes2020/jekyll-theme-chirpy</span></p><p>Last, install the dependencies and run local server.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ cd jekyll-theme-chirpy <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ bundler</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ bundle exec jekyll serve --host 0.0.0.0</span><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkPH_fVj-iLwv48bONymarlDQPPrnRhpPHWmDyhPAOZBUKnU7XL2QnWflcc6gQbsmgDAmhkVOr-M64DwiDh081biEuu1ao36yd8B-nNLVQF9j95GndJKaIIAsOhWpJaXk1m4L-Ys_ZHyHzU2GtOx5z_6B8ByBKpG6h-xz_7qog4JrBIuYb3A/s960/Screenshot%202022-12-21%20182058.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="307" data-original-width="960" height="127" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkPH_fVj-iLwv48bONymarlDQPPrnRhpPHWmDyhPAOZBUKnU7XL2QnWflcc6gQbsmgDAmhkVOr-M64DwiDh081biEuu1ao36yd8B-nNLVQF9j95GndJKaIIAsOhWpJaXk1m4L-Ys_ZHyHzU2GtOx5z_6B8ByBKpG6h-xz_7qog4JrBIuYb3A/w400-h127/Screenshot%202022-12-21%20182058.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">http://0.0.0.0:4000/</td></tr></tbody></table><br /><p><br /></p><p><br /></p>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-81836447008105909962022-12-16T11:58:00.001+09:002022-12-16T12:00:53.827+09:00Vulnerability Scanner for Open Source<p>Finally, Google has released the <a href="https://github.com/google/osv-scanner">OSV-scanner</a> as a free tool that gives opensource developers access to vulnerability information which may relevant to their projects.</p><p>With the new launching <a href="https://osv.dev/">OSV.dev service</a>, it allows all the different opensource ecosystems and vulnerability databases to publish and consume information in one simple, precise, and machine readable format (JSON).</p><p>OSV-scanner is an effort to provide supported fronted to the OSV database (OSV.dev) that connects a project's list of dependencies with vulnerabilities that affect them. </p><p>There are a few ways to use OSV:</p><ul style="text-align: left;"><li> <a href="https://osv.dev/#use-the-api">Use the API</a> </li><li><a href="https://osv.dev//#use-the-cli">Use the command line</a></li><li><a href="https://github.com/ossf/scorecard/blob/main/docs/checks.md#vulnerabilities">Integrate with OpenSSF Scorecard's vulnerability check</a><br /></li></ul><p>So, let's get start <a href="https://osv.dev//#use-the-cli">running the OSV-scanner</a> on your project to find all the dependencies that are being used by analyzing manifests, SBOMs, and commit hashes. The scanner hen connects this information with the centralized OSV database and displays the vulnerabilities relevant to your project. </p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://security.googleblog.com/2022/12/announcing-osv-scanner-vulnerability.html">Announcing OSV-Scanner: Vulnerability Scanner for Open Source</a> - (Dec 13, 2022) <br /></li><li><a href="https://security.googleblog.com/2021/06/announcing-unified-vulnerability-schema.html">Announcing a unified vulnerability schema for open source</a> - (Jun 24, 2021) <br /></li><li><a href="https://security.googleblog.com/2021/02/launching-osv-better-vulnerability.html">Launching OSV - Better vulnerability triage for open source</a> - (Feb 5, 2021)<br /></li><li><a href="https://slsa.dev/">SLSA</a></li><li><a href="https://github.com/ossf/osv-schema">https://github.com/ossf/osv-schema</a></li><li><a href="https://securityscorecards.dev/">OpenSSF Scorecard</a> <br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-42935046487005372142022-12-15T11:59:00.003+09:002022-12-16T12:10:52.471+09:00OpenSSF Scorecard<p>OpenSSF Scorecard is one of the initiative from <a href="https://openssf.org/">Open Source Security Foundation or OpenSSF</a>. It is a tool to provide quick access to opensource projects for any risky practices via automated checks.</p><p>To run the checks, there are 2 ways:</p><ol><li>Run automatically on code you own <b>using the GitHub Action</b></li><li>Run manually on your (or somebody else’s) project <b>via the Command Line <br /></b></li></ol><p></p><p>Scorecard checks for vulnerabilities affecting different parts of the software chain including <b>source code, build, dependencies, testing, and project maintenance</b>.</p><p></p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://securityscorecards.dev/">OpenSSF Scorecard</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-77668692693288080222022-12-13T16:23:00.001+09:002022-12-16T16:31:50.590+09:00Upgrade to Python 3.11 on Ubuntu 22.04 LTS<p>My Ubuntu 22.04 (WSL) comes with Python 3.10.6, and I need to upgrade it to 3.11 for a workshop. (More importantly is, it claims to be 10-60% faster than the previous 3.10. 😎<br /><br />Here are the steps:</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ sudo add-apt-repository ppa:deadsnakes/ppa</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ sudo apt update </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ sudo apt install python3.11-full</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ python3.11 --version<br />Python 3.11.1</span><br /></p><p><br /></p><p>Next. To set Python 3.11 as default.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 110</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 100 <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ sudo update-alternatives --config python3<br /></span></p><p><br /></p>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-69526938584987957702022-12-11T22:48:00.006+09:002022-12-15T21:38:46.126+09:00Python-HTTPX Vs. Python-Requests<p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">#!/usr/bin/evn python3 </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;"># -*- coding: utf-8 -*-<br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">import httpx</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">import requests </span><br /></p><p> </p><p>In general, both the module are similar, Here, I just make a simple comparison on what are the differences between Python HTTPX and Requests module.</p><p> </p>
<table>
<tbody><tr>
<th><br /></th>
<th>Requests</th>
<th>HTTPX</th>
</tr>
<tr>
<td>Sessions</td>
<td><span style="font-family: Ubuntu Mono;">requests.Session()</span></td>
<td><span style="font-family: Ubuntu Mono;">httpx.Client()</span></td>
</tr>
<tr>
<td>Async support<br /></td>
<td>Not supported<br /></td>
<td><span style="font-family: Ubuntu Mono;">httpx.AsyncClient()</span><br /></td>
</tr>
<tr>
<td>HTTP/2 support<br /></td>
<td>Not supported</td>
<td><span style="font-family: Ubuntu Mono;">httpx.Client(http2=True)<br />httpx.AsyncClient(http2=True)</span></td>
</tr>
</tbody></table>
<p><br /></p><p><i>I have started moving over to HTTPX since Dec 2022.</i><br /></p><p><br /></p><p></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://www.python-httpx.org/">Python HTTPX</a></li><li><a href="https://requests.readthedocs.io/en/latest/">Python Requests</a></li><li><a href="https://www.confessionsofadataguy.com/httpx-vs-requests-in-python-performance-and-other-musings/">Httpx vs Requests in Python. Performance and other Musings.</a></li><li><a href="https://web.dev/performance-http2/">Introduction to HTTP/2</a> <br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-2673261493785832462022-12-10T01:52:00.001+09:002022-12-10T01:52:36.945+09:00Security Role Management Best Practices<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="343" src="https://www.youtube.com/embed/5v4v-MPoEOs" width="483" youtube-src-id="5v4v-MPoEOs"></iframe></div><br /><p>Everyone know RBAC is important. And this is one of the best webinar that demonstrate how the best practices in designing RBAC.</p><p></p><p>Notes:</p><ul style="text-align: left;"><li>Complexity is the enemy of security</li><li>Don't let perfect become the enemy of the good. 80/20<br /></li><li>Be flexible and ready to be changed over time.</li><li>Top-down approach design</li><li>Bottom-up approach for role discovery (engineering)<br /></li><li>Business user tier Vs App entitlement tier.</li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-21391523080406582222022-12-08T13:08:00.001+09:002022-12-08T13:08:09.452+09:00CISA KEV Catalog Hits 860 After 13 Months<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgadTsUNO2rOb3we08ofVID2q-4b_5AX4HiBAuwSTCoc05viVXT8SiipVCANPvZoiNO-BjcWfBRV-5vrB0R2STMgEaCalxlgi6-fJmYsV4e4FcOQbE0-vnQVPr1pryhMDAi5k2KIdPXh5RfTJnFUv2bcUhycn8OwpUyBp2q8jPV7VRSuv-xoA/s1304/Screenshot_20221208_114245.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1304" data-original-width="843" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgadTsUNO2rOb3we08ofVID2q-4b_5AX4HiBAuwSTCoc05viVXT8SiipVCANPvZoiNO-BjcWfBRV-5vrB0R2STMgEaCalxlgi6-fJmYsV4e4FcOQbE0-vnQVPr1pryhMDAi5k2KIdPXh5RfTJnFUv2bcUhycn8OwpUyBp2q8jPV7VRSuv-xoA/w259-h400/Screenshot_20221208_114245.png" width="259" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Top 10 vendors and vulnerable products<br /></td></tr></tbody></table><p>CISA starts to share KEV catalog to public back in Nov 3, 2021. There are total of 860 cve been added into KEV catalog after 13 months (849 cve by Nov 3).</p><p>Too many organizations are relying on the Common Vulnerability Scoring System, developed at FIRST.org, to decide when it is time to patch.Vulnerabilities with a Low/Medium CVSS score are often ignored completely or deferred to another time, while a vulnerability with a 7.0 and above generates a hair-on-fire “patch now” event. <br /></p><blockquote><p><i>And this is the reason why patches just don’t get applied in a timely fashion all the time.</i></p></blockquote><p>It is time we reexamine each of our vulnerability management programs to assure we are not letting impactful and known CVEs continue to exist in our networks long past the time that vendor fixes are available. We need to evolve our practices to incorporate capabilities such as KEV into our operational vulnerability analysis decision making. <br /></p><p>The screenshot above shows the top 10 vulnerable products and the vendors within the KEV catalog. And I have shared the <a href="https://myseq.blogspot.com/2022/04/publish-kev-catalog-on-github.html">script at GitHub</a> back in April 2022.</p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://myseq.blogspot.com/2022/03/cisa-known-exploited-vuln-catalog.html">CISA Known Exploited Vuln Catalog</a></li><li><a href="https://www.trellix.com/en-us/about/newsroom/stories/research/ancient-cves-can-cause-you-problems.html">Ancient CVEs Can Cause You Problems</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-14733526469614092842022-12-07T23:21:00.012+09:002022-12-07T23:48:38.950+09:00Make Some CmdLine Fun on ChatGPT<p>Let's make some hacking/cmdline fun on ChatGPT.</p><p>Do you know wha is the OS, how much memory and hard disk size used by ChatGPT? It is running on</p><ul style="text-align: left;"><li>Ubuntu 18.04 LTS </li><li>with 4GB RAM </li><li>and 500GB disk size <br /></li></ul><p style="text-align: center;"><span style="font-size: x-large;">😮 😮 😮 😮 😮 😮 </span></p><p>First login to <a href="https://chat.openai.com/chat" target="_blank">ChatGPT</a> at https://chat.openai.com/chat with Google account.<br /></p><p>Second, enable the terminal by paste into ChatGPT:</p><p style="margin-left: 40px; text-align: left;"></p><blockquote><span style="font-family: Fira Code;">I want you to act as a Linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curly brackets {like this}. My first command is pwd.</span></blockquote><p></p><p style="text-align: left;">Next, we can continue with all cmdline that we are familiar:</p><ul style="text-align: left;"><li><span style="font-family: Ubuntu Mono;">whoami</span></li><li><span style="font-family: Ubuntu Mono;">w</span></li><li><span style="font-family: Ubuntu Mono;">uptime</span></li><li><span style="font-family: Ubuntu Mono;">ip route</span></li><li><span style="font-family: Ubuntu Mono;">ip addr show</span></li><li><span style="font-family: Ubuntu Mono;">free -h </span></li><li><span style="font-family: Ubuntu Mono;">sudo fdisk -l /dev/sda<br /></span></li><li><span style="font-family: Ubuntu Mono;">sudo su - <br /></span></li><li><span style="font-family: Ubuntu Mono;">cat /etc/passwd</span></li><li><span style="font-family: Ubuntu Mono;">cat /etc/shadow</span></li><li><span style="font-family: Ubuntu Mono;">(evil) rm -rf /* &</span></li></ul><p> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhtUdEwJuefV30g7PTck6r4JlFDDkJ21XL3uhmVoRvIw5q1crMeWFOGSYvbvtqpnTRwAUy6gA4ql2b1-Amqtn-aBuwfn9iZNf3QHFZj5IwHP0smWb3bGr41IYcfpTv-1A1ThCanKcghmXxncGRUsVNiVKZDQQi3IptaDrrgIuAGZfP0U9cCfQ" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="386" data-original-width="1001" height="123" src="https://blogger.googleusercontent.com/img/a/AVvXsEhtUdEwJuefV30g7PTck6r4JlFDDkJ21XL3uhmVoRvIw5q1crMeWFOGSYvbvtqpnTRwAUy6gA4ql2b1-Amqtn-aBuwfn9iZNf3QHFZj5IwHP0smWb3bGr41IYcfpTv-1A1ThCanKcghmXxncGRUsVNiVKZDQQi3IptaDrrgIuAGZfP0U9cCfQ" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">lsb_release -a <br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhjyzJ5EQXRLRWAKAUwjsohPydcCV_qlOAnu4D3uk92og2qwC-HBNj9D6G7FsOs40vxz60KxH9v48qsGxvIbw6cLPjn64UcgZFj_Pt1jJb_msEski5DRFt8MjFER8W2FWFBuSDCqbBwQ255hY80pXA2M2un4cRTsw1U8OhvulAzLng-TW31lg" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="345" data-original-width="903" height="122" src="https://blogger.googleusercontent.com/img/a/AVvXsEhjyzJ5EQXRLRWAKAUwjsohPydcCV_qlOAnu4D3uk92og2qwC-HBNj9D6G7FsOs40vxz60KxH9v48qsGxvIbw6cLPjn64UcgZFj_Pt1jJb_msEski5DRFt8MjFER8W2FWFBuSDCqbBwQ255hY80pXA2M2un4cRTsw1U8OhvulAzLng-TW31lg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">free -h</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table></td></tr></tbody></table><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjJ_TmfOkjIDszH6MtPwLxAcJPaCsUn7BnqPkrGLfEG8XqbHWxgX3FNUSgLYlyBpedixegXFAJLz57ds2Wk0Zytm2nN_cBt7gUODI25GIwrU_kYyhi-muFnDSax_VMgKfR1Bp92R9k_XRqzhkxTUTtD7sCtGaZTUuogir2OjuI0zNqjWb6cEQ" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="624" data-original-width="849" height="235" src="https://blogger.googleusercontent.com/img/a/AVvXsEjJ_TmfOkjIDszH6MtPwLxAcJPaCsUn7BnqPkrGLfEG8XqbHWxgX3FNUSgLYlyBpedixegXFAJLz57ds2Wk0Zytm2nN_cBt7gUODI25GIwrU_kYyhi-muFnDSax_VMgKfR1Bp92R9k_XRqzhkxTUTtD7sCtGaZTUuogir2OjuI0zNqjWb6cEQ" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fdisk -l /dev/sda<br /></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjA6Rlezd7FjTbe1XHSl3uLjirtDtpopi6aoAUWCcxcMQ9pyjcdxEATccipR0kHkIdZozX0va07W_pg9inNWeR4ZyQpRRzSKvZ-7fWsPxRkUIK-nhZWcUu4m6a0VMM6jCBKOzo4Y6Z1yFKBfdgR3-Nvvz47F4UHiz6XHB88AiENVsxgtQD-ag" style="margin-left: auto; margin-right: auto;"><img data-original-height="1023" data-original-width="833" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEjA6Rlezd7FjTbe1XHSl3uLjirtDtpopi6aoAUWCcxcMQ9pyjcdxEATccipR0kHkIdZozX0va07W_pg9inNWeR4ZyQpRRzSKvZ-7fWsPxRkUIK-nhZWcUu4m6a0VMM6jCBKOzo4Y6Z1yFKBfdgR3-Nvvz47F4UHiz6XHB88AiENVsxgtQD-ag=w325-h400" width="325" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">cat /etc/passwd<br /></td></tr></tbody></table><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh4nmBPkpQ0Qm4VXRk96gH80OfpNrBrrQLFH4S1HXu4wvaFnbP1ICq4pHKXHkYd7X-BIAJWQZXVKIzoKr72ZZbDHHxWIRiuebIM0oZYGVwFRZ-NyD4sBPMnIfQCDoyUxuY6xFtu01-V0cKuNSMhRbH7k1JkkG-R1y56JnylEPmC47sbcvzZ6w" style="margin-left: auto; margin-right: auto;"><img data-original-height="1003" data-original-width="838" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEh4nmBPkpQ0Qm4VXRk96gH80OfpNrBrrQLFH4S1HXu4wvaFnbP1ICq4pHKXHkYd7X-BIAJWQZXVKIzoKr72ZZbDHHxWIRiuebIM0oZYGVwFRZ-NyD4sBPMnIfQCDoyUxuY6xFtu01-V0cKuNSMhRbH7k1JkkG-R1y56JnylEPmC47sbcvzZ6w=w335-h400" width="335" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">cat /etc/shadow<br /></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjf1hts9ZFv42JPN8FNM8Va0bG8jmYLMzjZ8Gz4DrUqaOgGGMnLxG71fVfR-cYtI4anpTvSPaTZmF9qZuVFcKFOeXyNtTnXZnH1Owf9OlrxTwWX9sfFxn4lAmKIgFiEmW7Ohnx3BJu0jjy7QXTnaBE219ghqpNP69AIu8qjZhdXcRECxqohQg" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="626" data-original-width="1054" height="190" src="https://blogger.googleusercontent.com/img/a/AVvXsEjf1hts9ZFv42JPN8FNM8Va0bG8jmYLMzjZ8Gz4DrUqaOgGGMnLxG71fVfR-cYtI4anpTvSPaTZmF9qZuVFcKFOeXyNtTnXZnH1Owf9OlrxTwWX9sfFxn4lAmKIgFiEmW7Ohnx3BJu0jjy7QXTnaBE219ghqpNP69AIu8qjZhdXcRECxqohQg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">uptime</td></tr></tbody></table><p><br /></p><p>Personally, I don't think the information above is true, but it is fun to see this sometimes. <span style="font-size: x-large;">😇</span><br /></p><p> </p><p></p><p></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://beebom.com/cool-things-chatgpt/">10 Cool Things You Can Do with ChatGPT</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-5299543214061350012022-12-06T22:28:00.001+09:002022-12-07T22:44:36.838+09:00OpenAI ChatGPT<p>ChatGPT is a language model developed by OpenAI. GPT-3 stands for "Generative Pretrained Transformer 3" and is a type of artificial intelligence (AI) that is designed to generate human-like text. </p><p>ChatGPT is specifically designed to be used in chatbot applications, where it can generate natural-sounding responses to user inputs.</p><p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiQdOW4uFdCgMbmiA_QiyRSv4qzLUqmd11fZCk1XTMX6CEBH92EoeGatWNKLuNA78zcHDDVWkkk7bL6sex5j_p_48j-AfDT916z1DXgFqr5Ri2gfhNmLbPMtdyi-x16czb_lGhN0dGHzAHpViLX3MQMdN6U1NAFpQQIwZP2keCCCQdvYmGpVg" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="619" data-original-width="998" height="198" src="https://blogger.googleusercontent.com/img/a/AVvXsEiQdOW4uFdCgMbmiA_QiyRSv4qzLUqmd11fZCk1XTMX6CEBH92EoeGatWNKLuNA78zcHDDVWkkk7bL6sex5j_p_48j-AfDT916z1DXgFqr5Ri2gfhNmLbPMtdyi-x16czb_lGhN0dGHzAHpViLX3MQMdN6U1NAFpQQIwZP2keCCCQdvYmGpVg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">screenshot taken<br /></td></tr></tbody></table></p><p>ChatGPT can remember what we said, and allow for follow up questions. Such as:</p><ul style="text-align: left;"><li>What is HTTP request?</li><li>How do I create it in Python?</li></ul><p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgnXswZiIjwgS8T6LgoI6gUmp0exR4HIX01Ej2iCWsGfxEyF1f1G2xoP6dbPMfzwr1eDoCv0Kcz6wI0v53eYnj7XKOlXnKivjn_flDz64XpYJf4sthicBWThjZMJpE0ZXcQMNlc2r_YiEbqVFCA8q8pdOCpYlspMslWqmvmpyhgYGn6yRalyA" style="margin-left: auto; margin-right: auto;"><img data-original-height="1099" data-original-width="921" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEgnXswZiIjwgS8T6LgoI6gUmp0exR4HIX01Ej2iCWsGfxEyF1f1G2xoP6dbPMfzwr1eDoCv0Kcz6wI0v53eYnj7XKOlXnKivjn_flDz64XpYJf4sthicBWThjZMJpE0ZXcQMNlc2r_YiEbqVFCA8q8pdOCpYlspMslWqmvmpyhgYGn6yRalyA=w335-h400" width="335" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">chatGPT <br /></td></tr></tbody></table><br />ChatGPT can support multiple languages, and even .............</p><p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhQ1P44CKQ8aaClr1zpKiJWEDYKb3U15kvKUVG0EsLpnK233WFPDx72-wSL98YI9RgmgU4Ci4OKx8juedKeXdD7gGTukXOUt8XHEkH7ApTz65B-AREsY-stSqXOIlKTPKVbzeOMIsTDJQSWnFEn_7_F8rMBmQJ51usaMBav16Kl1ngsgUdEIQ" style="margin-left: auto; margin-right: auto;"><img data-original-height="522" data-original-width="479" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEhQ1P44CKQ8aaClr1zpKiJWEDYKb3U15kvKUVG0EsLpnK233WFPDx72-wSL98YI9RgmgU4Ci4OKx8juedKeXdD7gGTukXOUt8XHEkH7ApTz65B-AREsY-stSqXOIlKTPKVbzeOMIsTDJQSWnFEn_7_F8rMBmQJ51usaMBav16Kl1ngsgUdEIQ=w367-h400" width="367" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">秋天的诗</td></tr></tbody></table><br /><br /></p><p>Let's start to get some fun.</p><p> <br /></p><p></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://openai.com/blog/chatgpt/">ChatGPT: Optimizing Language Models for Dialogue</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-27845694138270385992022-12-05T22:04:00.006+09:002022-12-07T22:21:15.455+09:00OpenAI DALL-E 2 <p>OpenAI created a tool to generate AI images and make it available to everyone on Internet. The tool is called DALL-E 2.</p><p>Login to <a href="https://openai.com/dall-e-2/">DALL-E 2</a> at https://openai.com/dall-e-2/ with Google account. And just type in any description to generate image, such as:</p><p><span style="font-family: Fira Code;"></span></p><blockquote><b><span style="font-family: Fira Code;">an old man and a dog walking at beach</span></b></blockquote><p></p><p>We can also add append some keywords to be more specific, such as:</p><p></p><blockquote><span style="font-family: Fira Code;"><b>an old man and a dog walking at beach, line art</b><br /></span></blockquote><p></p><p>Keywords can be:</p><ul style="text-align: left;"><li>ascii art</li><li>line art</li><li>digital art </li><li>oil painting</li><li>one-line drawing</li></ul><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2PFkx118h_i-GH8BkQ9RVH6toXL8MaZA243NQgEKR1bY82Ol0gOUscOpziLgXmg55FZZd0n938ME-kjWjhMhBClduS4XQH5IPNZULgL5O8XqkFypVaARTtpOFZXnE283vshVc-ejOqkIwpVtvZDOakIlTQOwEYYibB1GJUHeAWa81p0tE3g/s1024/DALL%C2%B7E%202022-12-07%2021.18.08%20-%20an%20old%20man%20and%20a%20dog%20walking%20along%20beach,%20oil%20painting.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1024" data-original-width="1024" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2PFkx118h_i-GH8BkQ9RVH6toXL8MaZA243NQgEKR1bY82Ol0gOUscOpziLgXmg55FZZd0n938ME-kjWjhMhBClduS4XQH5IPNZULgL5O8XqkFypVaARTtpOFZXnE283vshVc-ejOqkIwpVtvZDOakIlTQOwEYYibB1GJUHeAWa81p0tE3g/w400-h400/DALL%C2%B7E%202022-12-07%2021.18.08%20-%20an%20old%20man%20and%20a%20dog%20walking%20along%20beach,%20oil%20painting.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">an old man and a dog walking along beach, oil painting</td></tr></tbody></table><br /><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://www.digitaltrends.com/computing/how-to-use-dall-e-2-to-generate-ai-images/">How to use DALL-E 2 to generate AI images</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-43068684264310537212022-12-03T23:56:00.134+09:002022-12-06T00:11:02.436+09:005 Experimental Flags in Microsoft Edge<p>Goto <span style="font-family: Fira Code;"><b>edge://flags</b></span> at URL bar, and <i><b>enable </b></i>the following:</p><p> </p><p>1. Enhance text contrast </p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">edge://flags/#edge-enhance-text-contrast </span></p><p><br /><br />2. Show block option in autoplay settings</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">edge://flags/#edge-autoplay-user-setting-block-option</span></p><p><br /> <br />3. Show Windows 11 visual effects in the title bar and toolbar </p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">edge://flags/#edge-visual-rejuv-mica</span><br /></p><p><br /> <br />4. Assigns the Backspace key to go back a page</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">edge://flags/#edge-backspace-key-navigate-page-back</span><br /></p><p><br /> <br />5. Rounded tabs </p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">edge://flags/#edge-visual-rejuv-rounded-tabs</span></p><p> </p><p>Links:</p><ul style="text-align: left;"><li><a href="https://www.neowin.net/guides/top-5-hidden-microsoft-edge-features-every-user-should-try/">Top 5 hidden Microsoft Edge features every user should try </a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-8354525061269882952022-12-01T07:00:00.002+09:002022-12-01T07:00:00.196+09:00Simulate Linux's SUDO in PowerShell<p>To start a notepad.exe process as normal user:</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">c:\> notepad.exe</span></p><p></p><p>To start a notepad.exe process as normal user with PowerShell:</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> Start-Process notepad</span><br /></p><p><br /></p><p>To open a file as Administrator with PowerShell:</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">Start-Process 'notepad' -Verb runAs -ArgumentList c:\windows\system32\drivers\etc\hosts</span></p><p><br /></p><p>To simulate 'sudo' with PowerShell Cmdlet</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">-----------8<------------------</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">function sudo<br />{<br /> if ($args.Count -gt 0)<br /> {<br /> $lastIndex = $args.Count-1<br /> $programName = $args[0]<br /> if ($args.Count -gt 1)<br /> {<br /> $programArgs = $args[1 .. $lastIndex]<br /> }<br /> Start-Process $programName -Verb runAs -ArgumentList $programArgs<br /> }<br /> else<br /> {<br /> if ($env:WT_SESSION) {<br /> Start-Process "wt.exe" -Verb runAs<br /> }<br /> elseif ($PSVersionTable.PSEdition -eq 'Core')<br /> {<br /> Start-Process "$PSHOME\pwsh.exe" -Verb runAs<br /> }<br /> elseif ($PSVersionTable.PSEdition -eq 'Desktop')<br /> {<br /> Start-Process "$PSHOME\powershell.exe" -Verb runAs<br /> }<br /> }<br />}<br /><br />Set-Alias -Name su -Value sudo</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">-----------8<------------------</span></p><p><br /></p><p>To use the cmdlet:</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> sudo notepad c:\windows\system32\drivers\etc\hosts</span><br /></p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://blog.miniasp.com/post/2022/11/29/Windows-PowerShell-Simulate-sudo-in-Linux">如何在 Windows 的 PowerShell 模擬 Linux 環境下的 sudo 命令</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-948352857127110282022-11-30T22:37:00.002+09:002022-11-30T22:43:44.920+09:00Zero Effort Zero Trust for Blocking Zero Days in Kubernetes<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="319" src="https://www.youtube.com/embed/RsABUEpaQRg" width="481" youtube-src-id="RsABUEpaQRg"></iframe></div><br /><p>Let's learn the zero trust segmentation for network, process, and file access within K8s cluster with Tracy Walker. </p><p><br /></p>
<table>
<tbody><tr>
<th>Threat-Based Controls</th>
<th>Zero-Trust Controls</th>
</tr>
<tr>
<td>CVEs</td>
<td>Automated Learning</td>
</tr>
<tr>
<td>DLP</td>
<td>Network</td>
</tr>
<tr>
<td>Network Attacks</td>
<td>Process</td>
</tr>
<tr>
<td>OWASP Top 10 WAF</td>
<td>File Access</td>
</tr>
<tr>
<td>Admission Control</td>
<td>Security as Code</td>
</tr>
</tbody></table>
<p>
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYI0zb_2AqDanYjTso-14mHwrLESnHnXYOLtufl8AO7562d3jfNtWlrgKmpf95sXTsKFlr5Q0rWQdg1WIK8qr6g-fiVW4m9qD7FVyQanbZ5Uz19Cd2LkvngHLJstIezQLyaa5CyuXXm2GCJMMgdHF7VkylGtoYPlaO1J36taPVHMfUB5AfQ/s1420/cc.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="821" data-original-width="1420" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYI0zb_2AqDanYjTso-14mHwrLESnHnXYOLtufl8AO7562d3jfNtWlrgKmpf95sXTsKFlr5Q0rWQdg1WIK8qr6g-fiVW4m9qD7FVyQanbZ5Uz19Cd2LkvngHLJstIezQLyaa5CyuXXm2GCJMMgdHF7VkylGtoYPlaO1J36taPVHMfUB5AfQ/w400-h231/cc.png" width="400" /></a></div><br /><p></p><p>The Automated Behavioral-based Zero-Trust covers:</p><ul style="text-align: left;"><li>Discover mode - <i>identifies</i> apps behavior (learning mode)</li><li>Monitor mode - <i>alerts </i>to any anomalous app behavior</li><li>Protect mode - <i>denies </i>on any anomalous app behavior</li></ul><p> </p><p>The demo will show how Zero Trust can protect against zero-day attacks as well as exploits such as Log4j and Spring4shell.</p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://github.com/neuvector/neuvector">NeuVector</a></li><li><a href="https://open-docs.neuvector.com/">NeuVector Docs </a></li><li><a href="https://hub.docker.com/_/neuvector">NeuVector Container Security Platform</a> <br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-15693187382609891572022-11-26T20:58:00.170+09:002022-11-26T20:58:00.168+09:00Docker Network 101<p>Learn how the docker/container network works.</p><p>Different Docker Network Types:</p><ol style="text-align: left;"><li>Bridge (default)<br /></li><li>User-defined bridge</li><li>Host</li><li>Mac Vlan</li><li>Mac Vlan (802.1q)</li><li>IP Vlan (L2)</li><li>IP Vlan (L3)</li><li>Overlay</li><li>None <br /></li></ol>
<table>
<tbody><tr>
<th>Interface</th>
<th>Description</th>
</tr>
<tr>
<td>eth0 </td>
<td>VM host network interface </td>
</tr>
<tr>
<td>docker0 </td>
<td>Virtual bridge interface (switch) </td>
</tr>
</tbody></table>
<p>Show the default docker network interface<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker network ls<br />NETWORK ID NAME DRIVER SCOPE<br />e2397b67991e bridge bridge local<br />f6648d670e10 host host local<br />031ec528726f none null local<br />ubuntu@docker:~$</span></p><p>Start the first container () with default bridge driver.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker run -itd --rm --name dnet_bridge busybox<br />e05bdb96427b458d649c0ca8eb6d800a50dde48c6619df34121f3f6c29b36f6f<br />ubuntu@docker:~$ docker ps<br />CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br />e05bdb96427b busybox "sh" 5 seconds ago Up 4 seconds dnet_bridge<br />ubuntu@docker:~$</span></p><p>By default, the bridge network applies NAT masq for accessing to external but never expose the container to external network. We need to expose the port if we need the external network to access to our docker container.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker run -itd --rm -p80:80 --name web01 nginx<br />e83d9abbea4a909f579a0461c9fb04a8247dd42100b7be08cd701cf9740d856c<br />ubuntu@docker:~$ docker ps<br />CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br />e83d9abbea4a nginx "/docker-entrypoint.…" 4 seconds ago Up 4 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp web01<br />13f8d2d6f05f busybox "sh" 4 minutes ago Up 4 minutes dns01<br />e05bdb96427b busybox "sh" 9 minutes ago Up 9 minutes dnet_bridge<br />ubuntu@docker:~$</span><br /></p><p> </p><p>Second. Let's define our own bridge network. This is mainly for segregating (isolation) the containers.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker network create dmz<br />71a335a2c869afde71ff4d6debf5155b319e65894c7c83dcea1b1d6e208eb882<br />ubuntu@docker:~$ docker network ls<br />NETWORK ID NAME DRIVER SCOPE<br />e2397b67991e bridge bridge local<br />71a335a2c869 dmz bridge local<br />f6648d670e10 host host local<br />031ec528726f none null local</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker run -itd --rm --network dmz -p80:80 --name web01 nginx<br />9ddc5bd9c13c884237aa7164a4c4f3c17498a68da64c735879eaf479c397a433<br />ubuntu@docker:~$ docker ps<br />CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br />9ddc5bd9c13c nginx "/docker-entrypoint.…" 9 seconds ago Up 8 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp web01<br />e05bdb96427b busybox "sh" 16 minutes ago Up 16 minutes dnet_bridge<br />ubuntu@docker:~$</span></p><p><br /></p><p>Third. We call it host network. This makes the container runs on the same network as the VM host.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker run -itd --rm --network host --name web02 nginx<br />3022063adc651f94e23edd8755c7c9521f40a7b2df157bfc92c66f21016d3842<br />ubuntu@docker:~$</span></p><p></p><p><br /></p><p>Forth. We call it MAC-VLAN (bridge mode).</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker network create -d macvlan --subnet 172.31.112.0/20 --gateway 172.31.112.1 -o parent=eth0 vlan1<br />373a821c44aefb4030109482f9480008bf87a152ad74a6c714cbeaa57f73e6dc<br />ubuntu@docker:~$ docker network ls<br />NETWORK ID NAME DRIVER SCOPE<br />e2397b67991e bridge bridge local<br />71a335a2c869 dmz bridge local<br />f6648d670e10 host host local<br />031ec528726f none null local<br />373a821c44ae vlan1 macvlan local<br />ubuntu@docker:~$</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ sudo ip link set eth0 promisc on<br />ubuntu@docker:~$</span><br /></p><p></p><p><br /></p><p>Fifth. We call it MAC-VLAN (802.1q mode).<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker network create -d macvlan --subnet 192.168.20.0/24 --gateway 192.168.20.1 -o parent=eth0.20 vlan20<br />3634f36fe849afa8d7dfc65589b71aa0c0902bd6bc1ed294e0d258ffc14e640f<br />ubuntu@docker:~$ docker network ls<br />NETWORK ID NAME DRIVER SCOPE<br />e2397b67991e bridge bridge local<br />71a335a2c869 dmz bridge local<br />f6648d670e10 host host local<br />031ec528726f none null local<br />373a821c44ae vlan1 macvlan local<br />3634f36fe849 vlan20 macvlan local<br />ubuntu@docker:~$</span><br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker run -itd --rm --network vlan3 --ip 192.168.94.7 --name dns01 busybox<br />de504908dc372c0f017a36c4357c70a1f28acd0a7f763bb372642c96e89baef9<br />ubuntu@docker:~$ docker run -itd --rm --network vlan3 --ip 192.168.94.8 --name dns02 busybox<br />2dc61bd9a45f828493fe1b55f8786692740baf5079deeddb5cefebe2468aa583<br />ubuntu@docker:~$ docker run -itd --rm --network vlan3 --ip 192.168.95.9 --name web01 busybox<br />a1d23a1691d0c2fd33b03d023bc03bb0a282e39a8f254bdf54fbab4d3e46a9de<br />ubuntu@docker:~$ docker run -itd --rm --network vlan3 --ip 192.168.95.10 --name web02 busybox<br />9cc2db6492de35f5a2fa230702e5e41ff4bf75bd563eac71bf39d0e7171b0e0f<br />ubuntu@docker:~$ docker ps<br />CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br />9cc2db6492de busybox "sh" 4 seconds ago Up 3 seconds web02<br />a1d23a1691d0 busybox "sh" 13 seconds ago Up 13 seconds web01<br />2dc61bd9a45f busybox "sh" 35 seconds ago Up 35 seconds dns02<br />de504908dc37 busybox "sh" About a minute ago Up About a minute dns01<br />ubuntu@docker:~$</span></p><p> </p><p>Sixth. We call it IP-VLAN (L2) - layer_2. This will share the same mac address with the VM host, and must allow 1 mac addr with 20 IP addresses associated on the network.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker network create -d ipvlan --subnet 172.31.112.0/20 --gateway 172.31.112.1 -o parent=eth0 vlan2<br />40aadb9f60c3dc889c8b9a30e627d5a314226c204ca48f09375447def53b4ad4<br />ubuntu@docker:~$</span><br /></p><p><br /></p><p>Seventh. We call it IP-VLAN (L3) - layer_3. Everything is connecting to host and host is functioning like router. And we have more control on the traffic.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker network create -d ipvlan --subnet 192.168.94.0/24 -o parent=eth0 -o ipvlan_mode=l3 --subnet 192.168.95.0/24 vlan3<br />000b2c4799a4fd62a4435d99eed592ae8fa7ad5b8b797aeb7e06322b477f7ecf<br />ubuntu@docker:~$ docker network ls<br />NETWORK ID NAME DRIVER SCOPE<br />e2397b67991e bridge bridge local<br />71a335a2c869 dmz bridge local<br />f6648d670e10 host host local<br />031ec528726f none null local<br />000b2c4799a4 vlan3 ipvlan local<br />ubuntu@docker:~$</span><br /></p><p><i> * Need to add static route at the router in order for the network to reach back to vlan3.</i><br /></p><p> </p><p>Eighth. We call it Overlay network. And it is used to link up multiple host, create an overlay network, and create rule to allow the containers (at different host) to talk to each other.</p><p>Usually it is used with Docker Swarm.<br /></p><p></p><p> </p><p>Last (9th) is None network.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@docker:~$ docker run -itd --rm --network none --name xnet busybox<br />0c21ccbb87d1937dd7ce18da696a5bd7ca1530969a4198992e5852e3d0593d14<br />ubuntu@docker:~$</span><br /></p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://www.youtube.com/watch?v=bKFMS5C4CG0">Docker networking is CRAZY!! </a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-85877254844607095272022-11-26T00:31:00.001+09:002022-11-26T00:31:00.188+09:00Docker Compose 102<p></p><p>Let's follow the steps to create more complex docker images:</p><ul style="text-align: left;"><li>frontend - wordpress image</li><li>backend - mysql image <br /></li></ul><p><br /></p><p></p><p>First, we just start a docker images with Multipass.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> multipass launch docker -n kiko</span></p><p>Login to docker (kiko) and start creating <span style="font-family: Fira Code;">docker-compose.yaml</span>.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> multipass shell kiko</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ mkdir blog && cd blog<br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/blog$ vi docker.compose.yaml</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">--------------------------------------------------- <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">version: "3"<br />services:<br /> frontend:<br /> image: wordpress<br /> ports:<br /> - "8089:80"<br /> depends_on:<br /> - backend<br /> environment:<br /> WORDPRESS_DB_HOST: backend<br /> WORDPRESS_DB_USER: root<br /> WORDPRESS_DB_PASSWORD: "coffee"<br /> WORDPRESS_DB_NAME: wordpress<br /> networks:<br /> dmz:<br /> ipv4_address: "192.168.33.89"<br /> backend:<br /> image: "mysql:5.7"<br /> environment:<br /> MYSQL_DATABASE: wordpress<br /> MYSQL_ROOT_PASSWORD: "coffee"<br /> volumes:<br /> - ./mysql:/var/lib/mysql<br /> networks:<br /> dmz:<br /> ipv4_address: "192.168.33.90"<br />networks:<br /> dmz:<br /> ipam:<br /> driver: default<br /> config:<br /> - subnet: "192.168.33.0/24"</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">----------------------------------------------------<br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/blog$ docker-compose up -d </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/blog$ docker-compose ps</span></p><p style="margin-left: 40px; text-align: left;"></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/blog$ docker network ls<br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/blog$ docker inspect</span><span style="font-family: Ubuntu Mono;"> blog_dmz</span></p><p style="text-align: left;"> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ5bTlF0G7OC1HLB-1LSjidXarznxOi04HfNKs_CW9AvqslxfaizaAbL_zzWXMJ17hPww24vSoq9bXqPlvWm5PXQveHLRJPNJ8y1X56Czq6rwN-YN7eYYgNqH75FwXQlNE_Kl9Paz60k3WiF8Pr3AFHzbYUcbl948o3lPpCWTeHkUZreknEQ/s1336/blog2.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1108" data-original-width="1336" height="331" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ5bTlF0G7OC1HLB-1LSjidXarznxOi04HfNKs_CW9AvqslxfaizaAbL_zzWXMJ17hPww24vSoq9bXqPlvWm5PXQveHLRJPNJ8y1X56Czq6rwN-YN7eYYgNqH75FwXQlNE_Kl9Paz60k3WiF8Pr3AFHzbYUcbl948o3lPpCWTeHkUZreknEQ/w400-h331/blog2.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">http://kiko.mshome.net:8089/</td></tr></tbody></table><br /><br /><p></p><p style="text-align: left;">Links:</p><ul style="text-align: left;"><li>Docker Compose 101<br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-62914319427639051172022-11-24T23:29:00.001+09:002022-11-24T23:29:00.156+09:00Docker Compose 101<p>Let's follow the steps to create first docker images.</p><p><br /></p><p></p><p>First, we just start a docker images with Multipass.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> multipass launch docker -n kiko</span></p><p>Login to docker (kiko) and start creating <span style="font-family: Fira Code;">docker-compose.yaml</span>.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> multipass shell kiko</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ mkdir coffee && cd coffee</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ vi docker.compose.yaml</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">--------------------------------------------------- <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">version: "3"<br />services:<br /> website:<br /> image: nginx<br /> ports:<br /> - "8081:80"<br /> restart: always </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">----------------------------------------------------<br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ docker-compose up -d </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ docker-compose ps</span></p><p style="text-align: left;">Add second image with different network (coffee).</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ vi docker.compose.yaml</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">--------------------------------------------------- <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">version: "3"<br />services:<br /> website:<br /> image: nginx<br /> ports:<br /> - "8081:80"<br /> restart: always<br /> website2:<br /> image: nginx<br /> ports:<br /> - "8082:80"<br /> restart: always<br /> networks:<br /> coffee:<br /> ipv4_address: 192.168.92.22<br />networks:<br /> coffee:<br /> ipam:<br /> driver: default<br /> config:<br /> - subnet: "192.168.92.0/24"</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">----------------------------------------------------<br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ docker-compose up -d </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ docker network ls </span><span style="font-family: Ubuntu Mono;"> <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ docker inspect coffee_default </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~/coffee$ docker inspect coffee_coffee </span><span style="font-family: Ubuntu Mono;"><br /></span></p><p style="text-align: left;"></p><p></p><p></p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://www.youtube.com/watch?v=DM65_JyGxCo">Docker Compose will BLOW your MIND!! (a tutorial)</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-30463797865379123692022-11-23T20:55:00.001+09:002022-11-23T20:55:00.158+09:00Docker Container 101<p>Virtualization or hypervisor virtualizes hardware; docker container virtualizes OS kernel.</p><p>First, we just start a docker images with Multipass.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> multipass launch docker -n kiko</span></p><p>Login to docker and start download the images.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> multipass shell kiko</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker pull centos</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker container run -itd --name cc centos</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker exec -it cc bash </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">[root@a4d5e22b6ef5 /]# cat /etc/os-release<br /></span></p><p>Try download other images.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker pull archlinux </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;"></span><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker pull ubuntu</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;"></span><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker pull almalinux</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;"></span><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker run -itd --name uu ubuntu</span></p><p><span style="font-family: Ubuntu Mono;"></span>Check the utilization and stop the container.</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker stats</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">ubuntu@kiko:~$ docker stop uu cc </span><span style="font-family: Ubuntu Mono;"> <br /></span></p><p><span style="font-family: Ubuntu Mono;"></span> </p><p>Why container runs so fast and why use container?</p><ul style="text-align: left;"><li>share the kernel with hosts (compare to separate guest OS kernel).<br /></li><li>use control group to define cpu, mem, disk, network namespaces.</li><li>container is portable.</li><li>micro-service concept.<br /></li></ul><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://www.youtube.com/watch?v=eGz9DS-aIeY">Docker 101 </a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-67065293858826190592022-11-21T19:35:00.144+09:002022-11-23T20:05:24.393+09:00Redmine on Docker<p>This is a quick tutorial on setting up a Redmine on Docker container.</p><p> </p><h3 style="text-align: left;">Overview <br /></h3><p>Redmine is a flexible project management web application written using Ruby on Rails framework.</p><p><br /></p><h3 style="text-align: left;">Architecture</h3><p>This is to simulate how to dockerize a production-ready infrastructure on Redmine application using Nginx as reverse proxy.</p><p><br /></p><h3 style="text-align: left;">Prerequisite</h3><p>I'm using the Multipass to setup my docker platform.</p><p style="margin-left: 40px; text-align: left;">PS> multipass launch docker -n dido</p><p style="margin-left: 40px; text-align: left;">PS> multipass shell dido <br /></p><p></p><p><br /></p><h3 style="text-align: left;"><b>Setup</b></h3><p>First, create 3 files within an empty folder.</p><ol style="text-align: left;"><li>Dockerfile</li><li>conf/default.conf</li><li>conf/supervisord.conf <br /></li></ol><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">~$ mkdir red</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">~$ cd red</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">~/red$ cat Dockerfile </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">------------------8<------------------------- <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">FROM redmine:5<br /><br />RUN apt update && \<br /> apt install -y \<br /> supervisor \<br /> nginx && \<br /> apt clean && \<br /> rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*<br /><br />COPY conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf<br />COPY conf/default.conf /etc/nginx/sites-available/default<br /><br />EXPOSE 80<br /><br />ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">------------------8<------------------------- </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">~/red$ cat conf/default.conf</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">------------------8<------------------------- </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">server {<br /> listen 80;<br /> server_name _;<br /><br /> location / {<br /> proxy_pass http://127.0.0.1:3000;<br /> }<br />} <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">------------------8<------------------------- </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">~/red$ cat conf/supervisord.conf </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">------------------8<------------------------- </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">[supervisord]<br />nodaemon=true<br />user=root<br /><br />[program:nginx]<br />user=root<br />command=nginx<br /><br />[program:redmine]<br />user=redmine<br />directory=/usr/src/redmine<br />command=/docker-entrypoint.sh rails server -b 127.0.0.1 <br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">------------------8<------------------------- </span><br /></p><p> </p><h3 style="text-align: left;"><b>Build the Docker Image</b></h3><p>Next, build the docker image called "redapp".</p><p style="margin-left: 40px; text-align: left;"><b><span style="font-family: Ubuntu Mono;">~/red$ docker build -t redapp . </span></b></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">Sending build context to Docker daemon 4.608kB<br />Step 1/6 : FROM redmine:5<br /> ---> 7cc28c5d1864<br />Step 2/6 : RUN apt update && apt install -y supervisor nginx && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*<br /> ---> Using cache<br /> ---> 03ee1eb12c0a<br />Step 3/6 : COPY conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf<br /> ---> Using cache<br /> ---> bfaee539e7d4<br />Step 4/6 : COPY conf/default.conf /etc/nginx/sites-available/default<br /> ---> Using cache<br /> ---> 8f20ffe3be6a<br />Step 5/6 : EXPOSE 80<br /> ---> Using cache<br /> ---> de69fec60e49<br />Step 6/6 : ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]<br /> ---> Using cache<br /> ---> 3e9b0eecdfaf<br />Successfully built 3e9b0eecdfaf<br />Successfully tagged redapp:latest</span></p><h3 style="text-align: left;"><b><br /></b></h3><h3 style="text-align: left;"><b>Start the Docker image as Container</b></h3><p>Next, run the container by exposing the port 80 (external on eth0 interface) with Nginx (internal port 80 on docker0 interface) <br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">~/red$ docker run -p 80:80 -d redapp </span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">4851a3266f50ebd3ee7c3c69e87bc2e4697e74e699839b21f566119c39e5665f</span></p><p><br /></p><h3 style="text-align: left;"><b>Access the Redmine Application</b></h3><p>Last, point the browser to the URL at <b><span style="font-family: Fira Code;">http://172.18.238.107/login</span></b> (where 172.18.238.107 is the IP address at my eth0 interface).</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTpJUCSB3FhNTewZ19BBDtMVA17xatk4ds3YXARaAbyS1TPJqlG-hO1xjX5mK_VY2NLGL8ApMCdqOPSNf1WolVfxaLJ3dECyyGOVUpHNL6E-aUcPQXo_PbQM3bmE26PZiK1N1cvAd1IRsNocI4SJrwteTgmK3_k7gZCwt3jon7z1NZX1UxcA/s1227/redapp.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="671" data-original-width="1227" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTpJUCSB3FhNTewZ19BBDtMVA17xatk4ds3YXARaAbyS1TPJqlG-hO1xjX5mK_VY2NLGL8ApMCdqOPSNf1WolVfxaLJ3dECyyGOVUpHNL6E-aUcPQXo_PbQM3bmE26PZiK1N1cvAd1IRsNocI4SJrwteTgmK3_k7gZCwt3jon7z1NZX1UxcA/w400-h219/redapp.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><b><span style="font-family: Fira Code;">http://172.18.238.107/login</span></b></td></tr></tbody></table><br /><p></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://myseq.blogspot.com/2022/05/docker-helloworld1.html">Docker_HelloWorld_1</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-6529342185856110802022-11-07T14:18:00.001+09:002022-12-15T14:24:41.263+09:00Weather at CmdLine<p>Check or curl your weather at cmdline with :</p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ curl -s wttr.in/Melbourne?format="%l:%c+%C+%t/%f+%h+%w+%m+UV:%u/12+%P"<br />Melbourne:⛅️ Partly cloudy +15°C/+14°C 59% ↑31km/h 🌗 UV:3/12 1016hPa</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">$ curl -s wttr.in/New+York?format="%l:%c+%C+%t/%f+%h+%w+%m+UV:%u/12+%P"<br />New+York:☀️ Clear +1°C/-3°C 56% ↓15km/h 🌗 UV:1/12 1022hPa</span></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: Ubuntu Mono;">PS> Invoke-RestMEthod 'https://wttr.in/New+York?format="%l:%c+%C+%t/%f+%h+%w+%m+UV:%u/12+%P"'<br />New+York:☀️ Clear +1°C/-3°C 56% ↓15km/h 🌗 UV:1/12 1022hPa</span></p><p><br /></p><p>Links:</p><ul style="text-align: left;"><li><a href="https://wttr.in/">https://wttr.in/</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-62522703277406055292022-11-05T10:58:00.006+09:002022-12-15T11:03:43.756+09:00Windows Commands<p>This set of documentation describes the Windows Commands you can use to automate tasks by using scripts or scripting tools.</p><p>All supported versions of Windows and Windows Server have a set of Win32 console commands built in.</p><p> </p><p>Links:</p><ul style="text-align: left;"><li><a href="https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands" target="_blank">Windows Commands</a><br /></li></ul>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.comtag:blogger.com,1999:blog-27246961.post-3761214696336246312022-11-03T10:19:00.003+09:002022-11-17T10:30:18.024+09:00MS Teams Dev Mode<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmtzM5Ko6UizE2OrKrqn0Pe84h4UYUvH7quePcJF60-_FaP0o1F8rFTaptpLh54M9GpuVHwqwc9sn4LEz-sswo7ABCABsbL-GRX5L8FEH8K0p6TyOEMHRZiuUvclQrdNseegbrfiRENAcxLIfx_0E1hkfpranz46jXzs13qBDcr1Ma6IORlw/s592/electron.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="385" data-original-width="592" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmtzM5Ko6UizE2OrKrqn0Pe84h4UYUvH7quePcJF60-_FaP0o1F8rFTaptpLh54M9GpuVHwqwc9sn4LEz-sswo7ABCABsbL-GRX5L8FEH8K0p6TyOEMHRZiuUvclQrdNseegbrfiRENAcxLIfx_0E1hkfpranz46jXzs13qBDcr1Ma6IORlw/w400-h260/electron.png" width="400" /></a></div> <p></p><p>Microsoft Teams is power by Electron, SlimCore, Chromium, Node.js, and V8 Javascript engine. (No wonder it sucks up all your memory)</p><p>To check your MS Teams version, you have to enter the Dev Mode with the following steps:</p><ol style="text-align: left;"><li>Minimize your MS Teams, and you should see the small icon at taskbar (beside datetime).</li><li>Continuously (left) click on the icon for 7 times.</li><li>Right click the icon and you should see the <b>hidden menu</b>.</li><li>Click "Get Electron/SlimCore version".</li></ol><p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwp8mc5R8uG8p5Gg-aH3o05UFpP260L2IIXdp0z8jFzPsJM3vgZJKLx_6-a1wkx8P2OuBv7LrR5xU2dTSnYwSgzptaWf2wbIDtbniJS-0RysKA0mgotkH7Nuu5e2fOnWxqdQA_NOfJTxkWuLZS-gARgT6l25ayjSn9qWCZXYUUr0WMBHCXGw/s539/Screenshot_20221116_213951.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="379" data-original-width="539" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwp8mc5R8uG8p5Gg-aH3o05UFpP260L2IIXdp0z8jFzPsJM3vgZJKLx_6-a1wkx8P2OuBv7LrR5xU2dTSnYwSgzptaWf2wbIDtbniJS-0RysKA0mgotkH7Nuu5e2fOnWxqdQA_NOfJTxkWuLZS-gARgT6l25ayjSn9qWCZXYUUr0WMBHCXGw/w400-h281/Screenshot_20221116_213951.png" width="400" /></a></div><br /><p></p>zdhttp://www.blogger.com/profile/04667444439286327070noreply@blogger.com