<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MoreMeng.in.th</title>
	<atom:link href="https://moremeng.in.th/feed" rel="self" type="application/rss+xml" />
	<link>https://moremeng.in.th/</link>
	<description>ม.เหม่ง อิน ไทยแลนด์</description>
	<lastBuildDate>Sun, 10 Aug 2025 13:35:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://moremeng.in.th/wp-content/uploads/2024/02/moremenginth_logo-300x300.png</url>
	<title>MoreMeng.in.th</title>
	<link>https://moremeng.in.th/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">111826608</site>	<item>
		<title>แนวทางการเก็บขนาดฐานข้อมูลเพื่อวิเคราะห์และแสดงผลบน Metabase</title>
		<link>https://moremeng.in.th/2025/08/data-size-monitoring-for-analysis-and-visualization-in-metabase.html</link>
					<comments>https://moremeng.in.th/2025/08/data-size-monitoring-for-analysis-and-visualization-in-metabase.html#respond</comments>
		
		<dc:creator><![CDATA[Thanikul Sriuthis]]></dc:creator>
		<pubDate>Sun, 10 Aug 2025 13:18:54 +0000</pubDate>
				<category><![CDATA[Life of Dev]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[metabase]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>
		<guid isPermaLink="false">https://moremeng.in.th/?p=5347</guid>

					<description><![CDATA[<p>1. วัตถุประสงค์และแนวคิด องค์กรส่วนใหญ่มักมีฐานข้อมูลหลายระบบ เช่น PostgreSQL, MariaDB/MySQL, และ MSSQL ซึ่งกระจายอยู่บนหลายเครื่อง การติดตามขนาดฐานข้อมูลเป็นประจำจะช่วยให้สามารถวางแผนการขยายระบบ, ป้องกันปัญหาพื้นที่เต็ม, และวิเคราะห์แนวโน้มการใช้งานได้อย่างมีประสิทธิภาพแนวคิดหลัก: 2. การสร้างตารางเก็บข้อมูล ก่อนจะรับข้อมูลจาก API ต้องสร้างตารางกลางเพื่อเก็บข้อมูลขนาดฐานข้อมูลที่ส่งเข้ามา ตัวอย่างเช่น PostgreSQL: MSSQL: [&#8230;]</p>
<p>The post <a href="https://moremeng.in.th/2025/08/data-size-monitoring-for-analysis-and-visualization-in-metabase.html">แนวทางการเก็บขนาดฐานข้อมูลเพื่อวิเคราะห์และแสดงผลบน Metabase</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">1. วัตถุประสงค์และแนวคิด</h3>



<p class="wp-block-paragraph">องค์กรส่วนใหญ่มักมีฐานข้อมูลหลายระบบ เช่น PostgreSQL, MariaDB/MySQL, และ MSSQL ซึ่งกระจายอยู่บนหลายเครื่อง การติดตามขนาดฐานข้อมูลเป็นประจำจะช่วยให้สามารถวางแผนการขยายระบบ, ป้องกันปัญหาพื้นที่เต็ม, และวิเคราะห์แนวโน้มการใช้งานได้อย่างมีประสิทธิภาพ<br><strong>แนวคิดหลัก:</strong></p>



<ul class="wp-block-list">
<li>ให้แต่ละเครื่องส่งขนาดฐานข้อมูลของตนเองขึ้น API กลาง</li>



<li>ข้อมูลจะถูกเก็บในฐานข้อมูลกลาง</li>



<li>นำข้อมูลไปแสดงผลและวิเคราะห์ผ่าน Metabase Dashboard</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">2. การสร้างตารางเก็บข้อมูล</h3>



<p class="wp-block-paragraph">ก่อนจะรับข้อมูลจาก API ต้องสร้างตารางกลางเพื่อเก็บข้อมูลขนาดฐานข้อมูลที่ส่งเข้ามา ตัวอย่างเช่น</p>



<p class="wp-block-paragraph"><strong>PostgreSQL:</strong></p>



<pre class="wp-block-code"><code lang="sql" class="language-sql">CREATE TABLE db_log_size (
    id        SERIAL PRIMARY KEY,
    host      VARCHAR(100) NOT NULL,
    dbname    VARCHAR(100) NOT NULL,
    size      BIGINT NOT NULL,
    timestamp TIMESTAMP NOT NULL
);</code></pre>



<p class="wp-block-paragraph"><strong>MSSQL:</strong></p>



<pre class="wp-block-code"><code lang="sql" class="language-sql">CREATE TABLE db_log_size (
    id        INT IDENTITY(1,1) PRIMARY KEY,
    host      VARCHAR(100) NOT NULL,
    dbname    VARCHAR(100) NOT NULL,
    size      BIGINT NOT NULL,
    timestamp DATETIME NOT NULL
);</code></pre>



<p class="wp-block-paragraph"><strong>MariaDB/MySQL:</strong></p>



<pre class="wp-block-code"><code lang="sql" class="language-sql">CREATE TABLE db_log_size (
    id        BIGINT AUTO_INCREMENT PRIMARY KEY,
    host      VARCHAR(100) NOT NULL,
    dbname    VARCHAR(100) NOT NULL,
    size      BIGINT NOT NULL,
    timestamp DATETIME NOT NULL
);</code></pre>



<p class="wp-block-paragraph"><strong>หมายเหตุ:</strong></p>



<ul class="wp-block-list">
<li>ฟิลด์ <code>host</code> สำหรับระบุชื่อเครื่อง</li>



<li>ฟิลด์ <code>dbname</code> สำหรับชื่อฐานข้อมูล</li>



<li>ฟิลด์ <code>size</code> สำหรับขนาดฐานข้อมูล (หน่วยเป็น bytes)</li>



<li>ฟิลด์ <code>timestamp</code> สำหรับเวลาที่บันทึกข้อมูล</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">3. การสร้าง API สำหรับรับค่าไปเก็บ</h3>



<p class="wp-block-paragraph">เพื่อความปลอดภัยและความยืดหยุ่นในการรับข้อมูลจากหลายเครื่อง ควรสร้าง API กลางสำหรับรับข้อมูลขนาดฐานข้อมูล<br><strong>เหตุผลที่ใช้ API แทนการดึงข้อมูลโดยตรง:</strong></p>



<ul class="wp-block-list">
<li>ไม่ต้องเปิดสิทธิ์เข้าถึงฐานข้อมูลจากภายนอก ลดความเสี่ยงด้านความปลอดภัย</li>



<li>สามารถควบคุม ตรวจสอบ และ validate ข้อมูลที่รับเข้ามา</li>



<li>รองรับการขยายระบบในอนาคต</li>
</ul>



<p class="wp-block-paragraph"><strong>ตัวอย่าง API (Node.js/Express):</strong></p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript">router.post('/push_db_size', async (req, res) =&gt; {
  const { host, dbname, size, timestamp } = req.body;
  if (!host || !dbname || !size || !timestamp || size &lt;= 0) {
    return res.status(400).json({ success: false, error: 'Validation failed' });
  }
  await db('db_log_size').insert({ host, dbname, size, timestamp });
  res.json({ success: true });
});</code></pre>



<ul class="wp-block-list">
<li>API นี้จะรับข้อมูล JSON จากแต่ละเครื่อง แล้วบันทึกลงตาราง <code>db_log_size</code></li>



<li>มีการตรวจสอบความถูกต้องของข้อมูลก่อนบันทึก</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">4. ฝั่ง Linux: การส่งข้อมูลจาก PostgreSQL และ MariaDB/MySQL</h3>



<h4 class="wp-block-heading">4.1 การสร้าง Shell Script</h4>



<p class="wp-block-paragraph"><strong>PostgreSQL:</strong></p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">#!/bin/bash
DBS=("db1" "db2")
for DB in "${DBS[@]}"; do
  SIZE=$(psql -d $DB -t -c "SELECT pg_database_size('$DB');")
  curl -X POST http://api-url/storage/push_db_size \
    -H "Content-Type: application/json" \
    -d "{\"host\":\"$(hostname)\",\"dbname\":\"$DB\",\"size\":$SIZE,\"timestamp\":\"$(date '+%F %T')\"}"
done</code></pre>



<p class="wp-block-paragraph"><strong>MariaDB/MySQL:</strong></p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">#!/bin/bash
DBS=("db1" "db2")
for DB in "${DBS[@]}"; do
  SIZE=$(mysql -N -e "SELECT IFNULL(SUM(data_length+index_length),0) FROM information_schema.tables WHERE table_schema='$DB';")
  curl -X POST http://api-url/storage/push_db_size \
    -H "Content-Type: application/json" \
    -d "{\"host\":\"$(hostname)\",\"dbname\":\"$DB\",\"size\":$SIZE,\"timestamp\":\"$(date '+%F %T')\"}"
done</code></pre>



<h4 class="wp-block-heading">4.2 การกำหนดสิทธิ์ไฟล์ .pgpass และ my.cnf</h4>



<p class="wp-block-paragraph">เพื่อความปลอดภัยในการเก็บรหัสผ่านสำหรับเชื่อมต่อฐานข้อมูล</p>



<ul class="wp-block-list">
<li>ไฟล์ <code>.pgpass</code> (Postgres) และ <code>.my.cnf</code> (MySQL) ควรตั้ง permission ให้เฉพาะเจ้าของอ่านได้เท่านั้น</li>
</ul>



<pre class="wp-block-code"><code lang="bash" class="language-bash">  chmod 600 ~/.pgpass
  chmod 600 ~/.my.cnf</code></pre>



<ul class="wp-block-list">
<li>หลีกเลี่ยงการใส่รหัสผ่านไว้ในสคริปต์โดยตรง</li>
</ul>



<h4 class="wp-block-heading">4.3 การตั้ง crontab</h4>



<p class="wp-block-paragraph">ตั้ง crontab ให้สคริปต์ทำงานอัตโนมัติ เช่น ทุกวันเวลา 21:15</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">15 21 * * * /path/to/push_db_size.sh</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">5. ฝั่ง Windows: การส่งข้อมูลจาก MSSQL</h3>



<h4 class="wp-block-heading">5.1 การสร้าง PowerShell Script (.ps1)</h4>



<pre class="wp-block-code"><code lang="powershell" class="language-powershell">$Databases = @("db1", "db2")
foreach ($DbName in $Databases) {
  $Query = "SELECT SUM(size)*8*1024 AS SizeBytes FROM sys.master_files WHERE database_id = DB_ID('$DbName')"
  $DbSize = Invoke-Sqlcmd -ServerInstance "localhost" -Query $Query
  $SizeBytes = [int64]$DbSize.SizeBytes
  $Body = @{
    host = $env:COMPUTERNAME
    dbname = $DbName
    size = $SizeBytes
    timestamp = (Get-Date -Format "yyyy-MM-dd HH:mm:ss")
  } | ConvertTo-Json
  Invoke-RestMethod -Uri "http://api-url/storage/push_db_size" -Method Post -Body $Body -ContentType "application/json"
}</code></pre>



<h4 class="wp-block-heading">5.2 การกำหนด User Authenticate</h4>



<ul class="wp-block-list">
<li>สามารถใช้ Windows Authentication (ต้องให้ DBA เพิ่มสิทธิ์ user ใน SQL Server)</li>



<li>หรือใช้ SQL Authentication โดยระบุ <code>-Username</code> และ <code>-Password</code> ใน <code>Invoke-Sqlcmd</code></li>



<li>ควรเก็บรหัสผ่านอย่างปลอดภัย ไม่ควรเขียนไว้ในสคริปต์โดยตรง</li>
</ul>



<h4 class="wp-block-heading">5.3 การตั้ง Task Scheduler</h4>



<ul class="wp-block-list">
<li>เปิด Task Scheduler</li>



<li>สร้าง Task ใหม่</li>



<li>ตั้งเวลาให้รันสคริปต์อัตโนมัติ เช่น ทุกวันเวลา 21:15</li>



<li>ในช่อง Program/script ใส่ <code>powershell</code></li>



<li>ในช่อง Add arguments ใส่</li>
</ul>



<pre class="wp-block-code"><code lang="powershell" class="language-powershell">  -ExecutionPolicy Bypass -File "C:\path\to\push_db_size_mssql.ps1"</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">6. การแสดงผลบน Metabase</h3>



<ul class="wp-block-list">
<li>เชื่อมต่อ Metabase เข้ากับฐานข้อมูลกลางที่มีตาราง <code>db_log_size</code></li>



<li>สร้าง Dashboard เพื่อแสดงขนาดฐานข้อมูลแต่ละเครื่อง/แต่ละฐานข้อมูล</li>



<li>สามารถวิเคราะห์แนวโน้มการใช้งาน, ตรวจสอบการเติบโตของข้อมูล, และตั้งแจ้งเตือนเมื่อขนาดฐานข้อมูลเกิน threshold ได้</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">สรุป</h3>



<p class="wp-block-paragraph">แนวทางนี้ช่วยให้แต่ละเครื่องสามารถส่งขนาดฐานข้อมูลของตนเองขึ้น API กลางได้อย่างปลอดภัย ข้อมูลจะถูกเก็บในฐานข้อมูลกลางและนำไปแสดงผลบน Metabase Dashboard ได้อย่างสะดวก ลดความเสี่ยงจากการเปิดสิทธิ์ฐานข้อมูลโดยตรง และเพิ่มความยืดหยุ่นในการบริหารจัดการข้อมูลสำหรับองค์กร</p>



<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/08/image.png" data-gallery><img fetchpriority="high" decoding="async" width="1024" height="576" src="https://moremeng.in.th/wp-content/uploads/2025/08/image-1024x576.png" alt="" class="wp-image-5353" srcset="https://moremeng.in.th/wp-content/uploads/2025/08/image-1024x576.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/08/image-300x169.png 300w, https://moremeng.in.th/wp-content/uploads/2025/08/image-768x432.png 768w, https://moremeng.in.th/wp-content/uploads/2025/08/image-1536x864.png 1536w, https://moremeng.in.th/wp-content/uploads/2025/08/image.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
<p>The post <a href="https://moremeng.in.th/2025/08/data-size-monitoring-for-analysis-and-visualization-in-metabase.html">แนวทางการเก็บขนาดฐานข้อมูลเพื่อวิเคราะห์และแสดงผลบน Metabase</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://moremeng.in.th/2025/08/data-size-monitoring-for-analysis-and-visualization-in-metabase.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5347</post-id>	</item>
		<item>
		<title>บันทึกการแก้ปัญหาต่ออายุ SSL Let’s Encrypt ใน aaPanel บน Localhost</title>
		<link>https://moremeng.in.th/2025/05/how-to-renew-ssl-letsencrypt-aapanel-fix-verification-failed.html</link>
					<comments>https://moremeng.in.th/2025/05/how-to-renew-ssl-letsencrypt-aapanel-fix-verification-failed.html#respond</comments>
		
		<dc:creator><![CDATA[Thanikul Sriuthis]]></dc:creator>
		<pubDate>Sun, 04 May 2025 07:55:05 +0000</pubDate>
				<category><![CDATA[Life of Dev]]></category>
		<category><![CDATA[aapanel]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[domainname]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[fortigate]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ssl]]></category>
		<guid isPermaLink="false">https://moremeng.in.th/?p=5330</guid>

					<description><![CDATA[<p>Updated: 10 August 2025 ปํญหานี้เกิดขึ้นได้หาก aaPanel คุณอยูหลัง Firewall หรือ WAF ที่กั้นไม่ได้เข้าถึง port 80, 443 ได้จากภายนอก หรือจาก source ที่เราไม่ได้อนุญาต โดยในขั้นตอนที่ผมทำนี้จะเป็นการแก้ปัญหาที่เกิดกับ domain [&#8230;]</p>
<p>The post <a href="https://moremeng.in.th/2025/05/how-to-renew-ssl-letsencrypt-aapanel-fix-verification-failed.html">บันทึกการแก้ปัญหาต่ออายุ SSL Let’s Encrypt ใน aaPanel บน Localhost</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="post-modified-info entry-meta">Updated: 10 August 2025</p>
<p class="wp-block-paragraph">ปํญหานี้เกิดขึ้นได้หาก aaPanel คุณอยูหลัง Firewall หรือ WAF ที่กั้นไม่ได้เข้าถึง port 80, 443 ได้จากภายนอก หรือจาก source ที่เราไม่ได้อนุญาต โดยในขั้นตอนที่ผมทำนี้จะเป็นการแก้ปัญหาที่เกิดกับ domain ภายในองค์กร ที่สร้าง NAT ไว้บน Fortigate เพื่อให้เข้าถึงจากภายนอกได้อย่างจำกัด</p>



<p class="wp-block-paragraph">หากคุณใช้ aaPanel แล้วพบปัญหาในการต่ออายุ SSL เช่น <code>The CA server was unable to access your website</code> หรือ timeout จาก Let&#8217;s Encrypt บทความนี้จะพาคุณแก้ไขอย่างเป็นขั้นตอน พร้อมตรวจสอบ Firewall, .htaccess และการตั้งค่าให้พร้อมก่อนกด &#8220;Renew SSL&#8221; บน aaPanel อีกครั้ง</p>



<h2 class="wp-block-heading">ขั้นตอนที่ 1: เปิด Firewall ให้ Let&#8217;s Encrypt เข้าถึงเว็บ</h2>



<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/05/image-4.png" data-gallery><img decoding="async" width="1024" height="191" src="https://moremeng.in.th/wp-content/uploads/2025/05/image-4-1024x191.png" alt="" class="wp-image-5341" srcset="https://moremeng.in.th/wp-content/uploads/2025/05/image-4-1024x191.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/05/image-4-300x56.png 300w, https://moremeng.in.th/wp-content/uploads/2025/05/image-4-768x143.png 768w, https://moremeng.in.th/wp-content/uploads/2025/05/image-4.png 1412w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<ol class="wp-block-list">
<li>ไปที่ FortiGate หรือ firewall ที่คุณใช้งาน</li>



<li>เพิ่ม Policy ดังนี้:
<ul class="wp-block-list">
<li><strong>From</strong>: Internet-Zone</li>



<li><strong>To</strong>: WEBServer-Zone</li>



<li><strong>Service</strong>: HTTP (port 80), HTTPS (port 443)</li>



<li><strong>Source</strong>: ควรตั้งเป็น <code>all</code> ชั่วคราว</li>



<li><strong>SSL Inspection</strong>: ปิด (ใช้ <code>ssl-disabled</code>)</li>
</ul>
</li>
</ol>



<p class="is-style-default has-central-palette-7-color has-text-color has-link-color wp-elements-c8969cb3388085e6361f38a8f9ae97e5 wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> หากคุณจำกัดเฉพาะประเทศ เช่น Thailand หรือ Japan ใน source อาจทำให้ Let&#8217;s Encrypt เข้าถึงไม่ได้ ต้องเปิด global access ชั่วคราว</p>



<h2 class="wp-block-heading">ขั้นตอนที่ 2: ปิดการ Redirect ไป HTTPS ชั่วคราวใน <code>.htaccess</code></h2>



<p class="wp-block-paragraph">เพื่อให้ Let&#8217;s Encrypt สามารถเข้าถึงไฟล์ยืนยันโดเมนได้ผ่าน HTTP คุณต้องปิดการบังคับให้ redirect ไป HTTPS ชั่วคราว</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">#RewriteCond %{HTTP_HOST} ^moremeng.in.th [NC]
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</code></pre>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="has-central-palette-7-color has-text-color has-link-color wp-elements-5dfd40ac7ac9466449a83430d26b94fe wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> หลังจากต่ออายุสำเร็จแล้ว ควรเปิด redirect กลับเพื่อความปลอดภัย</p>
</blockquote>



<h2 class="wp-block-heading">ขั้นตอนที่ 3: ตรวจสอบว่า Port 80 และ 443 เปิดจากภายนอก</h2>



<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/05/image-2.png" data-gallery><img decoding="async" width="1024" height="530" src="https://moremeng.in.th/wp-content/uploads/2025/05/image-2-1024x530.png" alt="" class="wp-image-5339" srcset="https://moremeng.in.th/wp-content/uploads/2025/05/image-2-1024x530.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/05/image-2-300x155.png 300w, https://moremeng.in.th/wp-content/uploads/2025/05/image-2-768x397.png 768w, https://moremeng.in.th/wp-content/uploads/2025/05/image-2-1536x794.png 1536w, https://moremeng.in.th/wp-content/uploads/2025/05/image-2.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph">เข้าเว็บไซต์ <a href="https://dnschecker.org/port-scanner.php">https://dnschecker.org/port-scanner.php</a> ใส่ domain ที่เราทำการชี้มายัง NAT IP ของ Firewall อาทิเช่น <code>moremeng.in.th</code> แล้วตรวจสอบว่า</p>



<ul class="wp-block-list">
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Port 80: Open</li>



<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Port 443: Open</li>
</ul>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="has-central-palette-10-color has-text-color has-link-color wp-elements-fea375e4b57fca450c9ea890192d5693 wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2757.png" alt="❗" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ถ้า Port ปิด แสดงว่า NAT หรือ firewall ยังบล็อกอยู่ ต้องแก้ไขก่อน</p>
</blockquote>



<h2 class="wp-block-heading">ขั้นตอนที่ 4: ต่ออายุ SSL ใน aaPanel</h2>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/05/image-3.png" data-gallery><img loading="lazy" decoding="async" width="899" height="581" src="https://moremeng.in.th/wp-content/uploads/2025/05/image-3.png" alt="" class="wp-image-5340" srcset="https://moremeng.in.th/wp-content/uploads/2025/05/image-3.png 899w, https://moremeng.in.th/wp-content/uploads/2025/05/image-3-300x194.png 300w, https://moremeng.in.th/wp-content/uploads/2025/05/image-3-768x496.png 768w" sizes="auto, (max-width: 899px) 100vw, 899px" /></a></figure>



<ol class="wp-block-list">
<li>เข้าสู่ระบบ aaPanel</li>



<li>ไปที่เมนู <strong>Website</strong></li>



<li>เลือกเว็บไซต์ → กดที่ปุ่ม <strong>SSL</strong></li>



<li>คลิกปุ่ม <strong>Renewal SSL</strong></li>
</ol>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="has-central-palette-7-color has-text-color has-link-color wp-elements-54066a619eb0d4e847e5c178dd5d1675 wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> หากมีข้อความว่า “More than 5 failed orders within 1 hour” ให้รออย่างน้อย 1 ชั่วโมงก่อนทำใหม่</p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">ขั้นตอนที่ 5: เปิด HTTPS Redirect กลับ</h2>



<p class="wp-block-paragraph">เมื่อต่ออายุ SSL สำเร็จแล้ว ให้กลับไปที่ <code>.htaccess</code> แล้วปลดคอมเมนต์</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">RewriteCond %{HTTP_HOST} ^moremeng.in.th [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</code></pre>



<p class="wp-block-paragraph">เพื่อบังคับให้ทุกการเข้าถึงเปลี่ยนเป็น HTTPS เพื่อความปลอดภัย</p>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f389.png" alt="🎉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ผลลัพธ์ที่ควรได้</h2>



<ul class="wp-block-list">
<li>สถานะ SSL: <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ต่ออายุสำเร็จ</li>



<li>Expired: “Exp in 89 days” (หรือประมาณ 90 วัน)</li>



<li>Port 80/443: เปิดใช้งานได้จากภายนอก</li>



<li>เว็บไซต์ปลอดภัยด้วย HTTPS แบบอัตโนมัติ</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/05/image.png" data-gallery><img loading="lazy" decoding="async" width="1024" height="488" src="https://moremeng.in.th/wp-content/uploads/2025/05/image-1024x488.png" alt="" class="wp-image-5337" srcset="https://moremeng.in.th/wp-content/uploads/2025/05/image-1024x488.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/05/image-300x143.png 300w, https://moremeng.in.th/wp-content/uploads/2025/05/image-768x366.png 768w, https://moremeng.in.th/wp-content/uploads/2025/05/image.png 1366w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph">หากคุณดูแลเว็บไซต์บนเซิร์ฟเวอร์เองและใช้ aaPanel บทความนี้จะช่วยให้คุณหลีกเลี่ยงปัญหา SSL Verify Fail ได้ทุกครั้งที่ถึงรอบต่ออายุครับ</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://moremeng.in.th/2025/05/how-to-renew-ssl-letsencrypt-aapanel-fix-verification-failed.html">บันทึกการแก้ปัญหาต่ออายุ SSL Let’s Encrypt ใน aaPanel บน Localhost</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://moremeng.in.th/2025/05/how-to-renew-ssl-letsencrypt-aapanel-fix-verification-failed.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5330</post-id>	</item>
		<item>
		<title>ตรวจสอบและลบโปรแกรมต้องสงสัยบน Windows 10 จาก Firewall Log</title>
		<link>https://moremeng.in.th/2025/04/firewall-log-analysis-app-removal.html</link>
					<comments>https://moremeng.in.th/2025/04/firewall-log-analysis-app-removal.html#respond</comments>
		
		<dc:creator><![CDATA[Thanikul Sriuthis]]></dc:creator>
		<pubDate>Fri, 18 Apr 2025 03:33:10 +0000</pubDate>
				<category><![CDATA[Life of Dev]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[threatdetection]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://moremeng.in.th/?p=5321</guid>

					<description><![CDATA[<p>Updated: 10 August 2025 ในบทความนี้เราจะเล่า กระบวนการตรวจสอบและจัดการ หลังพบ Traffic ที่ถูก Deny จาก Firewall Fortigate ซึ่งนำไปสู่การพบแอปพลิเคชันต้องสงสัยบนเครื่อง Windows 10 และการลบแอปพลิเคชันนั้นออกจากระบบ ขั้นตอนการทำงาน 1. ตรวจสอบ [&#8230;]</p>
<p>The post <a href="https://moremeng.in.th/2025/04/firewall-log-analysis-app-removal.html">ตรวจสอบและลบโปรแกรมต้องสงสัยบน Windows 10 จาก Firewall Log</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="post-modified-info entry-meta">Updated: 10 August 2025</p>
<p class="wp-block-paragraph">ในบทความนี้เราจะเล่า <strong>กระบวนการตรวจสอบและจัดการ</strong> หลังพบ <strong>Traffic ที่ถูก Deny</strong> จาก <strong>Firewall Fortigate</strong> ซึ่งนำไปสู่การพบแอปพลิเคชันต้องสงสัยบนเครื่อง <strong>Windows 10</strong> และการลบแอปพลิเคชันนั้นออกจากระบบ</p>



<h2 class="wp-block-heading">ขั้นตอนการทำงาน</h2>



<h3 class="wp-block-heading">1. ตรวจสอบ Traffic Log บนอุปกรณ์ Fortigate</h3>



<p class="wp-block-paragraph">จากหน้า <strong>Firewall Logs</strong> ของ Fortigate เราพบรายการที่มีการ <strong>Deny</strong> การเชื่อมต่อไปยัง IP <code>129.0.11.17</code> บนพอร์ต <code>54120</code> (TCP) หลายครั้ง จากเครื่อง IP ภายในเครือข่าย</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>ตัวอย่าง Log</strong></p>



<ul class="wp-block-list">
<li>Source: <code>192.168.201.34</code></li>



<li>Destination: <code>129.0.11.17</code></li>



<li>Port: <code>54120</code></li>



<li>Result: <strong>Deny</strong></li>
</ul>
</blockquote>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/04/image.png" data-gallery><img loading="lazy" decoding="async" width="1024" height="402" data-id="5322" src="https://moremeng.in.th/wp-content/uploads/2025/04/image-1024x402.png" alt="" class="wp-image-5322" srcset="https://moremeng.in.th/wp-content/uploads/2025/04/image-1024x402.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/04/image-300x118.png 300w, https://moremeng.in.th/wp-content/uploads/2025/04/image-768x302.png 768w, https://moremeng.in.th/wp-content/uploads/2025/04/image.png 1209w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<h3 class="wp-block-heading">2. ตรวจสอบ Process ที่ใช้ Port ดังกล่าวบน Windows 10</h3>



<p class="wp-block-paragraph">เพื่อหาว่าโปรแกรมใดพยายามเชื่อมต่อ เราใช้คำสั่ง <code>netstat</code> บน <strong>Command Prompt</strong></p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">netstat -ano | findstr 54120</code></pre>



<p class="wp-block-paragraph">จากผลลัพธ์พบว่ามี <strong>Process ID (PID)</strong> เป็น <code>2740</code> ที่ทำการเชื่อมต่อแบบ <code>SYN_SENT</code> ไปยัง IP ดังกล่าว</p>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/04/image-1.png" data-gallery><img loading="lazy" decoding="async" width="982" height="515" src="https://moremeng.in.th/wp-content/uploads/2025/04/image-1.png" alt="" class="wp-image-5323" srcset="https://moremeng.in.th/wp-content/uploads/2025/04/image-1.png 982w, https://moremeng.in.th/wp-content/uploads/2025/04/image-1-300x157.png 300w, https://moremeng.in.th/wp-content/uploads/2025/04/image-1-360x189.png 360w, https://moremeng.in.th/wp-content/uploads/2025/04/image-1-768x403.png 768w" sizes="auto, (max-width: 982px) 100vw, 982px" /></a></figure>



<p class="wp-block-paragraph">ต่อมาใช้คำสั่งเพื่อดูรายละเอียดโปรเซส</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">tasklist /FI "PID eq 2740"</code></pre>



<p class="wp-block-paragraph">พบว่าโปรแกรมที่ทำการเชื่อมต่อคือ <code>abs_deployer.exe</code></p>



<h3 class="wp-block-heading">3. ตรวจสอบ Application ผ่าน Task Manager</h3>



<p class="wp-block-paragraph">เมื่อเปิด <strong>Task Manager</strong> ไปที่แท็บ <strong>Processes</strong> พบว่า <code>abs_deployer.exe</code> อยู่ภายใต้บริการชื่อว่า <strong>Sangfor Deployer Service</strong></p>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/04/image-2.png" data-gallery><img loading="lazy" decoding="async" width="748" height="458" src="https://moremeng.in.th/wp-content/uploads/2025/04/image-2.png" alt="" class="wp-image-5324" srcset="https://moremeng.in.th/wp-content/uploads/2025/04/image-2.png 748w, https://moremeng.in.th/wp-content/uploads/2025/04/image-2-300x184.png 300w" sizes="auto, (max-width: 748px) 100vw, 748px" /></a></figure>



<h3 class="wp-block-heading">4. การจัดการและลบแอปพลิเคชัน</h3>



<p class="wp-block-paragraph">ในตัวอย่างนี้สาเหตุเกิดจาก IP ของ sangfor endpoint ไม่ได้เป็นเลข 129.0.11.17 แล้ว เนื่องจากมีการปรับปรุงเครือข่ายภายใน ทำให้ IP ดังกล่าวถูกยกเลิก แต่ก็ยังมีเครื่อง client ที่ติดตั้ง agent ไว้ ก็ยังวิ่งหา server อยู่ แต่หากเราพบว่าแอปพลิเคชันนี้ไม่ได้อยู่ในรายการโปรแกรมที่อนุญาตใช้งาน และมีพฤติกรรมเชื่อมต่อภายนอกอย่างผิดปกติ ให้ดำเนินการ</p>



<ul class="wp-block-list">
<li><strong>Disable Service</strong>: ปิดบริการ Sangfor Deployer Service ผ่าน Services.msc</li>



<li><strong>Uninstall Program</strong>: ลบโปรแกรมออกจากระบบผ่าน Settings → Apps → Uninstall</li>



<li><strong>ลบไฟล์ตกค้าง</strong>: ตรวจสอบโฟลเดอร์ที่เกี่ยวข้อง เช่น Program Files หรือ ProgramData เพื่อแน่ใจว่าไม่มีไฟล์เหลืออยู่</li>
</ul>



<h2 class="wp-block-heading">สรุป</h2>



<p class="wp-block-paragraph">กระบวนการนี้ช่วยให้สามารถ</p>



<ul class="wp-block-list">
<li>ตรวจจับการเชื่อมต่อผิดปกติจาก Firewall</li>



<li>ระบุ Application ที่มีพฤติกรรมน่าสงสัย</li>



<li>ดำเนินการจัดการความเสี่ยงโดยการลบโปรแกรมที่ไม่จำเป็นหรืออาจเป็นภัย</li>
</ul>



<p class="wp-block-paragraph">การตรวจสอบเป็นประจำช่วยลดความเสี่ยงของการโจมตีและเพิ่มความปลอดภัยให้กับระบบภายในองค์กรได้อย่างมาก</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://moremeng.in.th/2025/04/firewall-log-analysis-app-removal.html">ตรวจสอบและลบโปรแกรมต้องสงสัยบน Windows 10 จาก Firewall Log</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://moremeng.in.th/2025/04/firewall-log-analysis-app-removal.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5321</post-id>	</item>
		<item>
		<title>NHSO SECURE SMARTCARD AGENT LINUX UPGRADE</title>
		<link>https://moremeng.in.th/2025/03/nhso-secure-smartcard-agent-linux-upgrade.html</link>
					<comments>https://moremeng.in.th/2025/03/nhso-secure-smartcard-agent-linux-upgrade.html#respond</comments>
		
		<dc:creator><![CDATA[Thanikul Sriuthis]]></dc:creator>
		<pubDate>Mon, 31 Mar 2025 04:43:28 +0000</pubDate>
				<category><![CDATA[Life of Dev]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nhso]]></category>
		<category><![CDATA[secureagent]]></category>
		<category><![CDATA[upgrade]]></category>
		<guid isPermaLink="false">https://moremeng.in.th/?p=5313</guid>

					<description><![CDATA[<p>Updated: 10 August 2025 เช้าวันจันทร์เป็นเหมือน aftershock ที่จะต้องมีปัญหาทุกเช้า กับเรื่องการตรวจสอบสิทธิ์ของ สปสช. อาทิตย์ไหนไม่มีปัญหาถือว่าแปลกมาก วันนี้พบว่า secure agent api มันค้าง เหมือน authen ไม่ได้โดยไม่ทราบสาเหตุ วิธีแก้ไขโดยการอัพเดท secureagent [&#8230;]</p>
<p>The post <a href="https://moremeng.in.th/2025/03/nhso-secure-smartcard-agent-linux-upgrade.html">NHSO SECURE SMARTCARD AGENT LINUX UPGRADE</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="post-modified-info entry-meta">Updated: 10 August 2025</p>
<p class="wp-block-paragraph">เช้าวันจันทร์เป็นเหมือน aftershock ที่จะต้องมีปัญหาทุกเช้า กับเรื่องการตรวจสอบสิทธิ์ของ สปสช. อาทิตย์ไหนไม่มีปัญหาถือว่าแปลกมาก วันนี้พบว่า secure agent api มันค้าง เหมือน authen ไม่ได้โดยไม่ทราบสาเหตุ วิธีแก้ไขโดยการอัพเดท secureagent ใหม่ แค่เนี่ย!!! </p>



<h2 class="wp-block-heading">อาการที่พบ</h2>



<ul class="wp-block-list">
<li>ตู้ KIOSK ส่งตรวจใช้งานไม่ได้ เสียบบัตรแล้วค้างอยู่หน้า &#8220;กำลังส่งตรวจ&#8221;</li>



<li>ใน HOSxPXE ระบบห้องบัตร กดเมนู &#8220;อ่านบัตร&#8221; แล้วขอ authen ไม่ได้</li>
</ul>



<h2 class="wp-block-heading">การอัปเดตโปรแกรม SecureAgent ของ สปสช. บนระบบปฏิบัติการ Linux</h2>



<p class="wp-block-paragraph">ในบทความนี้ เราจะอธิบายขั้นตอนการอัปเดตโปรแกรม SecureAgent ของสำนักงานหลักประกันสุขภาพแห่งชาติ (สปสช.) โดยใช้คำสั่งที่ปรากฏใน history ซึ่งประกอบไปด้วยขั้นตอนต่าง ๆ ดังนี้:</p>



<h3 class="wp-block-heading">1. ดาวน์โหลดไฟล์ติดตั้ง ในที่นี้เป็น version 1.1.2</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">wget https://www.nhso.go.th/images/2024/11/TH005P013%20%E0%B8%94%E0%B8%B2%E0%B8%A7%E0%B8%99%E0%B9%8C%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94%E0%B9%80%E0%B8%AD%E0%B8%81%E0%B8%AA%E0%B8%B2%E0%B8%A3/%E0%B8%94%E0%B8%B2%E0%B8%A7%E0%B8%99%E0%B9%8C%E0%B9%82%E0%B8%AB%E0%B8%A5%E0%B8%94%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1/0208_%E0%B9%80%E0%B8%AD%E0%B8%81%E0%B8%AA%E0%B8%B2%E0%B8%A3%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%AD%E0%B8%9A%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9E%E0%B8%B1%E0%B8%92%E0%B8%99%E0%B8%B2%20API%20SPEC%20%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A%E0%B8%9C%E0%B8%B9%E0%B9%89%E0%B8%9E%E0%B8%B1%E0%B8%92%E0%B8%99%E0%B8%B2/Download%20agent%20version%201.1.2%20Linux.gz
</code></pre>



<p class="wp-block-paragraph">คำสั่งนี้ใช้ <code>wget</code> เพื่อดาวน์โหลดไฟล์ติดตั้งของ SecureAgent เวอร์ชัน 1.1.2 ซึ่งอยู่ในรูปแบบไฟล์ <code>gz</code> (gzip compressed file) จากเว็บไซต์ของ สปสช.</p>



<p class="has-central-palette-4-color has-central-palette-9-background-color has-text-color has-background has-link-color wp-elements-d4534934d8f235e06838da2b280b2350 wp-block-paragraph">Update 2025/03/29 ของใหม่ล่าสุดเวอร์ชั่น 1.1.4<br><a href="https://drive.google.com/file/d/1p58m3oonZYroTZnxy2exJpUrFieR2tqn/view">https://drive.google.com/file/d/1p58m3oonZYroTZnxy2exJpUrFieR2tqn/view</a></p>



<h3 class="wp-block-heading">2. แตกไฟล์ติดตั้ง</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">tar zxvf 'Download agent version 1.1.2 Linux.gz'</code></pre>



<p class="wp-block-paragraph">คำสั่ง <code>tar zxvf</code> ใช้ในการแตกไฟล์ <code>gz</code> ที่ดาวน์โหลดมา ซึ่งเป็นไฟล์บีบอัดแบบ tar.gz เมื่อแตกไฟล์ออกมาแล้ว จะได้โฟลเดอร์หรือไฟล์ที่ใช้สำหรับติดตั้งโปรแกรม</p>



<h3 class="wp-block-heading">3. เข้าไปยังโฟลเดอร์ติดตั้ง</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">cd linux-installer/</code></pre>



<p class="wp-block-paragraph">คำสั่ง <code>cd linux-installer/</code> ใช้สำหรับเข้าไปยังโฟลเดอร์ที่มีไฟล์ติดตั้งของ SecureAgent</p>



<h3 class="wp-block-heading">4. ติดตั้งโปรแกรม SecureAgent</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo ./installer-x64.sh secureagent-1.1.2.jar</code></pre>



<p class="wp-block-paragraph">คำสั่งนี้ใช้ <code>sudo</code> เพื่อรันสคริปต์ติดตั้ง <code>installer-x64.sh</code> พร้อมระบุไฟล์ <code>secureagent-1.1.2.jar</code> ซึ่งเป็นแพ็กเกจของโปรแกรม SecureAgent</p>



<h3 class="wp-block-heading">5. เริ่มต้นการทำงานใหม่</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">service secureagent restart</code></pre>



<h3 class="wp-block-heading">6. ตรวจสอบสถานะของ SecureAgent</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">service secureagent status</code></pre>



<p class="wp-block-paragraph">คำสั่ง <code>service secureagent status</code> ใช้เพื่อตรวจสอบสถานะการทำงานของ SecureAgent หลังการติดตั้ง ว่ามีการทำงานอยู่หรือไม่ หาก SecureAgent ทำงานได้อย่างถูกต้อง จะมีข้อความแสดงว่าสถานะเป็น &#8220;active&#8221; หรือ &#8220;running&#8221;</p>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/03/image-8.png" data-gallery><img loading="lazy" decoding="async" width="957" height="420" src="https://moremeng.in.th/wp-content/uploads/2025/03/image-8.png" alt="" class="wp-image-5314" srcset="https://moremeng.in.th/wp-content/uploads/2025/03/image-8.png 957w, https://moremeng.in.th/wp-content/uploads/2025/03/image-8-300x132.png 300w, https://moremeng.in.th/wp-content/uploads/2025/03/image-8-768x337.png 768w" sizes="auto, (max-width: 957px) 100vw, 957px" /></a></figure>



<h3 class="wp-block-heading">หมายเหตุ</h3>



<ul class="wp-block-list">
<li>หาก SecureAgent ไม่สามารถเริ่มต้นทำงานได้ อาจต้องตรวจสอบ log ของบริการ หรือใช้คำสั่ง <code>sudo systemctl restart secureagent</code> เพื่อรีสตาร์ตบริการใหม่</li>



<li>ในกรณีที่ต้องการหยุดการทำงาน สามารถใช้คำสั่ง <code>sudo systemctl stop secureagent</code></li>
</ul>



<h2 class="wp-block-heading">การเปิดตรวจสอบดูการทำงานของ agent</h2>



<p class="wp-block-paragraph">เข้าผ่าน url <code>http://clicent_ip_address:8189/</code> ตัวอย่างเช่น </p>



<pre class="wp-block-code"><code lang="apacheconf" class="language-apacheconf">http://192.168.203.235:8189 </code></pre>



<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/03/image-9-1024x463.png" data-gallery><img loading="lazy" decoding="async" width="1024" height="463" src="https://moremeng.in.th/wp-content/uploads/2025/03/image-9-1024x463.png" alt="" class="wp-image-5315" srcset="https://moremeng.in.th/wp-content/uploads/2025/03/image-9-1024x463.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/03/image-9-300x136.png 300w, https://moremeng.in.th/wp-content/uploads/2025/03/image-9-768x347.png 768w, https://moremeng.in.th/wp-content/uploads/2025/03/image-9.png 1366w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph">Read More</p>



<ul class="wp-block-list">
<li>ขั้นตอนนี้คือการติดตั้งไลบรารีเพื่อให้ Linux สามารถเชื่อมต่อกับเครื่องอ่านได้<br><a href="https://gist.github.com/pramoth/abdd624f6179e48d874d3f126ac9c0d8">https://gist.github.com/pramoth/abdd624f6179e48d874d3f126ac9c0d8</a></li>



<li>เอกสารประกอบการพัฒนา API SPEC สำหรับผู้พัฒนา<br><a href="https://www.nhso.go.th/th/communicate-th/new/2024-10-30-15-38-55/1225-api-spec">https://www.nhso.go.th/th/communicate-th/new/2024-10-30-15-38-55/1225-api-spec</a></li>
</ul>
<p>The post <a href="https://moremeng.in.th/2025/03/nhso-secure-smartcard-agent-linux-upgrade.html">NHSO SECURE SMARTCARD AGENT LINUX UPGRADE</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://moremeng.in.th/2025/03/nhso-secure-smartcard-agent-linux-upgrade.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5313</post-id>	</item>
		<item>
		<title>ล้าง SNMP เก่าที่เลิกใช้งาน สำหรับ Network Printer</title>
		<link>https://moremeng.in.th/2025/03/remove-tcpip-printer-port-powershel.html</link>
					<comments>https://moremeng.in.th/2025/03/remove-tcpip-printer-port-powershel.html#respond</comments>
		
		<dc:creator><![CDATA[Thanikul Sriuthis]]></dc:creator>
		<pubDate>Sat, 15 Mar 2025 07:44:52 +0000</pubDate>
				<category><![CDATA[Life of Dev]]></category>
		<guid isPermaLink="false">https://moremeng.in.th/?p=5282</guid>

					<description><![CDATA[<p>พบว่ามี logs วิ่งหา SNMP ที่เป็น Printer Network ของ RICHO ต้องการลบอันนี้ออก จะใช้แบบคลิกขวา แล้ว delete ก็ได้ PowerShell 1.0 ถ้าลบไม่ได้แสดงว่ามีการใช้งานอยู่ หรือ ยังไม่ได้เปลี่ยน หลังจากปิดแล้ว [&#8230;]</p>
<p>The post <a href="https://moremeng.in.th/2025/03/remove-tcpip-printer-port-powershel.html">ล้าง SNMP เก่าที่เลิกใช้งาน สำหรับ Network Printer</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">พบว่ามี logs วิ่งหา SNMP ที่เป็น Printer Network ของ RICHO</p>



<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/01/image-1.png" data-gallery><img loading="lazy" decoding="async" width="1024" height="287" src="https://moremeng.in.th/wp-content/uploads/2025/01/image-1-1024x287.png" alt="" class="wp-image-5283" srcset="https://moremeng.in.th/wp-content/uploads/2025/01/image-1-1024x287.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/01/image-1-300x84.png 300w, https://moremeng.in.th/wp-content/uploads/2025/01/image-1-768x215.png 768w, https://moremeng.in.th/wp-content/uploads/2025/01/image-1.png 1179w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph"> ต้องการลบอันนี้ออก</p>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/01/image-2.png" data-gallery><img loading="lazy" decoding="async" width="839" height="468" src="https://moremeng.in.th/wp-content/uploads/2025/01/image-2.png" alt="" class="wp-image-5284" srcset="https://moremeng.in.th/wp-content/uploads/2025/01/image-2.png 839w, https://moremeng.in.th/wp-content/uploads/2025/01/image-2-300x167.png 300w, https://moremeng.in.th/wp-content/uploads/2025/01/image-2-768x428.png 768w" sizes="auto, (max-width: 839px) 100vw, 839px" /></a></figure>



<p class="wp-block-paragraph">จะใช้แบบคลิกขวา แล้ว delete ก็ได้</p>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/01/image-3.png" data-gallery><img loading="lazy" decoding="async" width="834" height="264" src="https://moremeng.in.th/wp-content/uploads/2025/01/image-3.png" alt="" class="wp-image-5285" srcset="https://moremeng.in.th/wp-content/uploads/2025/01/image-3.png 834w, https://moremeng.in.th/wp-content/uploads/2025/01/image-3-300x95.png 300w, https://moremeng.in.th/wp-content/uploads/2025/01/image-3-768x243.png 768w" sizes="auto, (max-width: 834px) 100vw, 834px" /></a></figure>



<p class="wp-block-paragraph">PowerShell 1.0</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">Get-WmiObject -Query "Select * from Win32_TCPIPPrinterPort" | Where-Object { $_.Name -like '*129.0.*' } | ForEach-Object { $_.Delete() } </code></pre>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/01/image-4.png" data-gallery><img loading="lazy" decoding="async" width="1001" height="444" src="https://moremeng.in.th/wp-content/uploads/2025/01/image-4.png" alt="" class="wp-image-5286" srcset="https://moremeng.in.th/wp-content/uploads/2025/01/image-4.png 1001w, https://moremeng.in.th/wp-content/uploads/2025/01/image-4-300x133.png 300w, https://moremeng.in.th/wp-content/uploads/2025/01/image-4-768x341.png 768w" sizes="auto, (max-width: 1001px) 100vw, 1001px" /></a></figure>



<p class="wp-block-paragraph">ถ้าลบไม่ได้แสดงว่ามีการใช้งานอยู่ หรือ ยังไม่ได้เปลี่ยน</p>



<figure class="wp-block-image size-full"><a href="https://moremeng.in.th/wp-content/uploads/2025/01/image-5.png" data-gallery><img loading="lazy" decoding="async" width="834" height="378" src="https://moremeng.in.th/wp-content/uploads/2025/01/image-5.png" alt="" class="wp-image-5287" srcset="https://moremeng.in.th/wp-content/uploads/2025/01/image-5.png 834w, https://moremeng.in.th/wp-content/uploads/2025/01/image-5-300x136.png 300w, https://moremeng.in.th/wp-content/uploads/2025/01/image-5-768x348.png 768w" sizes="auto, (max-width: 834px) 100vw, 834px" /></a></figure>



<p class="wp-block-paragraph">หลังจากปิดแล้ว log traffic ที่วิ่งหา print network ก็จะหายไป</p>



<figure class="wp-block-image size-large"><a href="https://moremeng.in.th/wp-content/uploads/2025/01/image-6.png" data-gallery><img loading="lazy" decoding="async" width="1024" height="287" src="https://moremeng.in.th/wp-content/uploads/2025/01/image-6-1024x287.png" alt="" class="wp-image-5288" srcset="https://moremeng.in.th/wp-content/uploads/2025/01/image-6-1024x287.png 1024w, https://moremeng.in.th/wp-content/uploads/2025/01/image-6-300x84.png 300w, https://moremeng.in.th/wp-content/uploads/2025/01/image-6-768x215.png 768w, https://moremeng.in.th/wp-content/uploads/2025/01/image-6.png 1233w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph">คำสั่งนี้ช่วยลบ Fax หรือ OneNote ที่ไม่ได้ใช้งาน ให้หายไปจากรายการของเครื่องพิมพ์</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">Get-Printer | Where-Object { $_.Name -match "Fax|OneNote" } | ForEach-Object { Remove-Printer -Name $_.Name }</code></pre>



<p class="wp-block-paragraph">คำสั่งนี้ช่วยลบพอร์ตเครื่องพิมพ์ที่ใช้ <strong>TCP/IP</strong> ซึ่งตรงกับช่วง IP ที่กำหนด (<code>*129.0.*</code>) ออกจากระบบโดยอัตโนมัติ ช่วยลดปัญหาการตั้งค่าพอร์ตผิดพลาด, ป้องกันความสับสนในการกำหนดค่าเครื่องพิมพ์, และช่วยจัดการระบบเครือข่ายเครื่องพิมพ์ให้สะอาดขึ้น เหมาะสำหรับการดูแลระบบที่มีเครื่องพิมพ์จำนวนมาก ลดภาระงานของผู้ดูแลระบบ และป้องกันปัญหาที่อาจเกิดจากพอร์ตที่ไม่ได้ใช้งานหรือถูกตั้งค่าผิดพลาดในเครือข่าย </p>
<p>The post <a href="https://moremeng.in.th/2025/03/remove-tcpip-printer-port-powershel.html">ล้าง SNMP เก่าที่เลิกใช้งาน สำหรับ Network Printer</a> appeared first on <a href="https://moremeng.in.th">MoreMeng.in.th</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://moremeng.in.th/2025/03/remove-tcpip-printer-port-powershel.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5282</post-id>	</item>
	</channel>
</rss>
