<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest topics for the forum "Linux/Unix"]]></title>
		<link>https://forum.andowson.com/forums/show/16.page</link>
		<description><![CDATA[The newest discussed topics in the forum "Linux/Unix"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Oracle Linux 6自行透過SRPM編譯polkit套件修補CVE-2021-4034漏洞</title>
				<description><![CDATA[ 有關CVE-2021-4034漏洞的資訊可以參考相關連結 
<br>
[url]https://www.ithome.com.tw/news/149096[/url] 
<br>
<br>
有關Oracle Linux 6的安全性修補資訊如下: 
<br>
[url]https://linux.oracle.com/errata/ELSA-2022-9073.html[/url] 
<br>
<br>
問題是這些編譯好的rpm檔無法取得，需要有購買Oracle Support才行 
<br>
由於Oracle有將Linux的原始碼公布出來，包含這些安全性更新，在以下網址: 
<br>
[url]https://oss.oracle.com/el6/SRPMS-updates/?C=M;O=D[/url] 
<br>
<br>
因此我們可以嘗試透過編譯SRPM套件來取得修補套件的rpm檔 
<br>
以下是我自己實作的經驗與心得: 
<br>
1.取得SRPM 
<br>
wget https://oss.oracle.com/el6/SRPMS-updates/polkit-0.96-11.0.1.el6_10.1.src.rpm 
<br>
<br>
2.安裝(解包)SPRM 
<br>
rpm -i polkit-0.96-11.0.1.el6_10.1.src.rpm 
<br>
由於我是用root執行這行指令，所以是解包到/root/rpmbuild目錄下 
<br>
<br>
3.安裝rpm-build套件 
<br>
yum install rpm-build 
<br>
<br>
4.安裝相依套件 
<br>
yum install glib2-devel expat-devel pam-devel eggdbus-devel gtk-doc intltool 
<br>
<br>
5.安裝gcc編譯器 
<br>
yum install gcc 
<br>
<br>
6.開始編譯 
<br>
cd /root/rpmbuild/SPECS 
<br>
rpmbuild -bb polkit.spec 
<br>
<br>
7.檢視產生之rpm檔 
<br>
cd /root/rpmbuild/RPMS/x86_64 
<br>
ls -l 
<br>
這邊發現產生之檔名是polkit-0.96-11.0.1.[color=red]el6.1[/color].x86_64.rpm跟Oracle Linux網站上寫的polkit-0.96-11.0.1.[color=red]el6_10.1[/color].x86_64.rpm不太一樣 
<br>
<br>
8.如果想要讓檔名跟Oracle Linux上的網站一樣可以修改polkit.spec 
<br>
將這行 
<br>
[code]Release: 11.0.1%{?dist}.1[/code] 
<br>
改為這樣 
<br>
[code]Release: 11.0.1%{?dist}_10.1[/code] 
<br>
<br>
存檔後，將舊檔案刪除，再重新編譯一次即可得到我們想要的結果 
<br>
cd /root/rpmbuild/SPECS 
<br>
vi polkit.spec 
<br>
rm -f /root/rpmbuild/RPMS/x86_64/polkit* 
<br>
rpmbuild -bb polkit.spec 
<br>
<br>
[code=console][root@www x86_64]# ll 
<br>
總計 944 
<br>
-rw-r--r-- 1 root root 165476 2022-09-14 22:11 polkit-0.96-11.0.1.el6_10.1.x86_64.rpm 
<br>
-rw-r--r-- 1 root root 478192 2022-09-14 22:11 polkit-debuginfo-0.96-11.0.1.el6_10.1.x86_64.rpm 
<br>
-rw-r--r-- 1 root root 28600 2022-09-14 22:11 polkit-devel-0.96-11.0.1.el6_10.1.x86_64.rpm 
<br>
-rw-r--r-- 1 root root 277796 2022-09-14 22:11 polkit-docs-0.96-11.0.1.el6_10.1.x86_64.rpm[/code] 
<br>
<br>
我把我編譯好的檔案打包起來，放在這個網址 
<br>
[url]https://www.andowson.com/download/ol6_polkit_rpm.tar.gz[/url] 
<br>
如果您剛好有需要可以自行下載，再將其解壓縮後，安裝使用 
<br>
wget https://www.andowson.com/download/ol6_polkit_rpm.tar.gz --no-check-certificate 
<br>
tar zxvf ol6_polkit_rpm.tar.gz 
<br>
<br>
9.安裝更新檔 
<br>
rpm -Uvh polkit-0.96-11.0.1.el6_10.1.x86_64.rpm]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/784/1559.page</guid>
				<link>https://forum.andowson.com/posts/preList/784/1559.page</link>
				<pubDate><![CDATA[Wed, 14 Sep 2022 23:02:07]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>在Oracle Linux 8安裝Trend Micro ServerProtect for Linux 3(SPLX)</title>
				<description><![CDATA[ 自從CentOS Linux 8公布將提前於2021/12/31 EOL(End-of-Life)後，原本使用免費又跟RHEL(Red Hat Enterprise Linux)相容作業系統的人，面臨是否要轉換成CentOS Stream 8的選擇。不過CentOS Stream 8的定位是介於Fedora跟RHEL之前的中游產品，所有的套件版本都比RHEL要新，這種具有測試色彩的中間產品對要求穩定性的Production上線環境來說，將會是系統管理者選用時的心理障礙--是否要當Red Hat公司的白老鼠呢? 
<br>
面臨CentOS Linux 6已經於2020/11/30 EOL，系統管理者需要將既有的CentOS 6升版至新作業系統，CentOS Linux 7雖然還可以撐到2024/6/30，但屆時遷移系統到新版作業系統的工作(痛苦)還要重複一次，許多CentOS 6系統管理者仍希望仍夠一次移轉到新版作業系統後就可以撐比較久再來轉換作業系統。 
<br>
市場上目前現有的RHEL相容的產品還有Oracle Linux，Oracle Linux跟RHEL不同的地方是它有兩個kernel版本，一個是Oracle Unbreakable Enterprise Kernel(UEK)，一個是Red Hat Compatible Kernel(RHCK)，據Oracle網站的說法，可以免費下載和安裝使用Oracle Linux，也可以透過它們的公開yum repository取得更新patch，只有當需要Oracle Support時才需要付費，而且費用還比RHEL便宜。然後Oracle還寫了一個script可以直接將CentOS Linux轉換成Oracle Linux，包含CentOS 6、7、8版，不用重新安裝。 
<br>
聽起來很棒!但是公司資安的要求是需要安裝公司規定的防毒軟體，目前選用的是Trend Micro ServerProtect for Linux 3(SPLX)，但在趨勢科技網站上看到的支援作業系統清單中都看不到Oracle Linux的影子。 
<br>
由於Oracle Linux宣稱100%相容於RHEL，所有RHEL可以安裝的軟體都可以在Oracle Linux上執行，於是筆者有了嘗試在Oracle Linux 8.3上面安裝SPLX 3.0的想法。 
<br>
<br>
先講結果: 
<br>
可以成功在Oracle Linux 8上以RHCK模式安裝及執行SPLX 3，對SPLX來說會認為是RHEL 8。 
<br>
<br>
實驗過程簡述如下: 
<br>
1.在VirtualBox環境下建立Oracle Linux的VM(配置1 CPU、2G RAM、12G HD) 
<br>
2.掛載由Oracle Linux網站下載的ISO檔完成安裝 
<br>
3.登入Oracle Linux後開啟瀏覽器下載[url=https://files.trendmicro.com/products/splx/rhel8/SPLX30-X64-Redhat8_CentOS8_Suse15-repack2.tar.gz]SPLX30-X64.tgz[/url] 
<br>
4.依照趨勢科技[url=https://docs.trendmicro.com/all/ent/splx/v3.0/en-us/splx_30_readme_x64_centos8_rhel8_suse15.txt]說明[/url]完成必要套件安裝 
<br>
5.使用root權限，安裝SPLX 3(需要輸入啟動碼Activation Code才能正常啟動KHM) 
<br>
6.查看目前趨勢科技網站中Red Hat Enterprise Linux 8.0支援的KHM版本到哪個kernel版號，例如4.18.0-240.8.1.el8-3.x86-64.x86-64，並將它下載。 
<br>
7.切換到/opt/TrendMicro/SProtectLinux/SPLX.module目錄，然後將下載回來的KHM解壓縮 
<br>
[code]cd /opt/TrendMicro/SProtectLinux/SPLX.module 
<br>
tar zxvf /home/andowson/Downloads/splx_kernel_module-3.0.1.0023.rhel8_4.18.0-240.8.1.el8_3.x86_64.x86_64.tar.gz[/code] 
<br>
8.安裝kernel-4.18.0-240.8.1.el8-3.x86-64.x86-64套件 
<br>
[code]sudo dnf install kernel-4.18.0-240.8.1.el8_3[/code] 
<br>
<br>
9.將Oracle Linux的kernel由UEK切換至RHCK(而且是有KHM的版號) 
<br>
[code]sudo grubby --set-default /boot/vmlinuz-4.18.0-240.8.1.el8_3.x86_64[/code] 
<br>
<br>
10.重開機 
<br>
<br>
11.登入後，切換至root，使用/etc/init.d/splx status指令檢查是否已正常載入KHM 
<br>
<br>
已知的問題: 
<br>
1.執行/etc/init.d/splx start和/etc/init.d/splxhttpd start兩個指令雖然都顯示正常啟動SPLX管理網站splxhttpd，但實際上卻無法登入，需要手動下指令啟動才行 
<br>
[code]cd /opt/TrendMicro/SProtectLinux/SPLX.httpd/bin/ 
<br>
./splxhttpd[/code] 
<br>
2.然後下/etc/init.d/splx restart時就會出現無法正常關閉splxhttpd的錯誤訊息 
<br>
<br>
參考資料: 
<br>
[url]https://wiki.centos.org/zh-tw/About/Product[/url] 
<br>
[url]https://blogs.oracle.com/scoter/switch-from-centos-to-oracle-linux-example[/url] 
<br>
[url]https://downloadcenter.trendmicro.com/index.php?regs=NABU&amp;clk=latest&amp;clkval=111&amp;lang_loc=1[/url]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/778/1540.page</guid>
				<link>https://forum.andowson.com/posts/preList/778/1540.page</link>
				<pubDate><![CDATA[Mon, 18 Jan 2021 02:18:19]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>Linux的crontab中週與日月不可同時並存</title>
				<description><![CDATA[ I think that is nice sir]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/681/1522.page</guid>
				<link>https://forum.andowson.com/posts/preList/681/1522.page</link>
				<pubDate><![CDATA[Thu, 16 Jul 2020 05:13:43]]> GMT</pubDate>
				<author><![CDATA[ cerrykoman]]></author>
			</item>
			<item>
				<title>使用openssl ciphers -v指令列出系統支援的Ciphers</title>
				<description><![CDATA[ 近期很多網路服務都開始停止支援TLS v1.0和TLS v1.1，轉用TLS v1.2以上protocol，因此該服務與TLS v1.2通信協定相對應的加密演算法(Ciphers)設定也需要做對應的調整，例如vsftpd要支援TLS v1.2，則vsftpd.conf我們可以修改設定為 
<br>
<br>
[code]ssl_sslv2=NO 
<br>
ssl_sslv3=NO 
<br>
ssl_tlsv1=NO 
<br>
ssl_tlsv1_1=NO 
<br>
ssl_tlsv1_2=YES 
<br>
<br>
ssl_ciphers=TLSv1.2:!aNULL:!eNULL[/code] 
<br>
<br>
其中TLSv1.2:!aNULL:!eNULL這串設定到底支援那些加密演算法，可以透過執行下列指令來查詢: 
<br>
[code]openssl ciphers -v 'TLSv1.2:!aNULL:!eNULL'[/code] 
<br>
<br>
我們可以透過wc -l來確認調整cipherlist參數後數字有沒有降低 
<br>
[code]openssl ciphers -v 'TLSv1.2'|wc -l[/code] 
<br>
[code]openssl ciphers -v 'TLSv1.2:!aNULL'|wc -l[/code] 
<br>
[code]openssl ciphers -v 'TLSv1.2:!aNULL:!eNULL'|wc -l[/code] 
<br>
<br>
參考文件: 
<br>
[url]https://www.openssl.org/docs/man1.0.2/man1/ciphers.html[/url]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/761/1518.page</guid>
				<link>https://forum.andowson.com/posts/preList/761/1518.page</link>
				<pubDate><![CDATA[Sat, 6 Jun 2020 10:10:21]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>利用scponly限制帳號只能SCP或SFTP不能SSH登入</title>
				<description><![CDATA[ 最近公司要求介面帳號不能SSH登入主機，由於有些介面帳號是用來備份網路設備的設定檔，而採用的檔案傳輸方式是SCP不是SFTP，故無法[url=http://www.andowson.com/posts/list/554.page]參考這篇[/url]透過修改/etc/ssh/sshd_config的Subsystem sftp internal-sftp方式來達成。 
<br>
<br>
搜尋了一下網路發現可以透故scponly這個套件來達成，首先可以透過下列網址安裝對應發行版本的epel套件 
<br>
http://dl.fedoraproject.org/pub/epel/ 
<br>
<br>
例如 
<br>
RHEL 6/CentOS 6 
<br>
[code]rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm[/code] 
<br>
RHEL 5/CentOS 5 
<br>
[code]rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm[/code] 
<br>
<br>
然後再透過yum安裝scponly 
<br>
[code]yum install scponly[/code] 
<br>
<br>
安裝完成後將介面帳號的shell修改為/usr/bin/scponly，例如將user1的shell修改為scponly 
<br>
[code]usermod -s /usr/bin/scponly user1[/code] 
<br>
<br>
然後再利用WinSCP或FileZilla等工具程式確認是否可以正常SCP或SFTP 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/639/1332.page</guid>
				<link>https://forum.andowson.com/posts/preList/639/1332.page</link>
				<pubDate><![CDATA[Sat, 22 Aug 2015 15:34:46]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>限制某個帳號只能從某個IP來SSH登入或SFTP/SCP</title>
				<description><![CDATA[ 最近公司的資安政策修改了，要求需要限制帳號只能從特定來源IP來登入主機，要達成這個目標可以透過修改sshd的設定檔/etc/ssh/sshd_config加入下列設定到適當位置 
<br>
[code=text]AllowUsers user1@source_ip1 user2@source_ip2[/code] 
<br>
兩個以上的帳號中間用空白隔開，如果來源IP是某個網段，最後一碼可以用*表示，例如 
<br>
[code]AllowUsers user1@192.168.1.1 user2@192.168.2.*[/code] 
<br>
<br>
適當位置是指需要放在Match的設定之前 
<br>
<br>
設定完成後需要重新啟動sshd 
<br>
[code]service sshd restart[/code]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/638/1331.page</guid>
				<link>https://forum.andowson.com/posts/preList/638/1331.page</link>
				<pubDate><![CDATA[Sat, 22 Aug 2015 15:14:01]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>[參考]Linux IPTables Rules Examples</title>
				<description><![CDATA[ 25 Most Frequently Used Linux IPTables Rules Examples 
<br>
http://crm.vpscheap.net/knowledgebase.php?action=displayarticle&amp;id=29 
<br>
<br>
Linux IPTables: Incoming and Outgoing Rule Examples (SSH and HTTP) 
<br>
http://www.thegeekstuff.com/2011/03/iptables-inbound-and-outbound-rules/ 
<br>
<br>
How to Log Linux IPTables Firewall Dropped Packets to a Log File 
<br>
http://www.thegeekstuff.com/2012/08/iptables-log-packets/]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/635/1328.page</guid>
				<link>https://forum.andowson.com/posts/preList/635/1328.page</link>
				<pubDate><![CDATA[Tue, 12 May 2015 20:06:15]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>解決PAM unable to dlopen(/lib64/security/pam_fprintd.so)</title>
				<description><![CDATA[ 今天在看每天CentOS Linux logwatch套件自動寄出的report信件，發現了這幾行 
<br>
[quote] **Unmatched Entries** 
<br>
 passwd: PAM adding faulty module: /lib64/security/pam_fprintd.so: 1 Time(s) 
<br>
 passwd: PAM unable to dlopen(/lib64/security/pam_fprintd.so): /lib64/security/pam_fprintd.so: 無法開啟共用目的檔: 沒有此一檔案或目錄: 1 Time(s) 
<br>
[/quote] 
<br>
<br>
檢查了一下/var/log/secure確認幾天前就出現過多次了，切換到/etc/pam.d目錄，利用grep指令可以找到4個檔案有出現這個東西 
<br>
[code]grep fprintd * 
<br>
fingerprint-auth:auth sufficient pam_fprintd.so 
<br>
fingerprint-auth-ac:auth sufficient pam_fprintd.so 
<br>
system-auth:auth sufficient pam_fprintd.so 
<br>
system-auth-ac:auth sufficient pam_fprintd.so[/code] 
<br>
上網查了一下，發現這個fprintd是指紋辨識的認證套件，由於伺服器目前不需要這個功能，故不採用補安裝套件的方式處理，改走禁用這個功能，指令如下: 
<br>
[code]authconfig --disablefingerprint --update[/code] 
<br>
再對/etc/pam.d檢查一次，就只剩下fingerprint-auth和fingerprint-auth-ac有這個設定了 
<br>
<br>
參考資料: 
<br>
https://tickets.opscode.com/browse/BENTO-94]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/631/1322.page</guid>
				<link>https://forum.andowson.com/posts/preList/631/1322.page</link>
				<pubDate><![CDATA[Tue, 23 Dec 2014 10:42:33]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>解決ImportError: No module named fw_nm</title>
				<description><![CDATA[ 最近將CentOS 6.5透過yum update後更新為CentOS 6.6後，執行setup的防火牆設定沒有反應，離開時畫面出現 
<br>
[quote]Traceback (most recent call last): 
<br>
 File "/usr/bin/system-config-firewall-tui", line 29, in &lt;module&gt; 
<br>
 import fw_tui 
<br>
 File "/usr/share/system-config-firewall/fw_tui.py", line 34, in &lt;module&gt; 
<br>
 import fw_nm 
<br>
ImportError: No module named fw_nm[/quote] 
<br>
<br>
後來上網找到解法，就是安裝一個 system-config-firewall 套件: 
<br>
yum install system-config-firewall 
<br>
<br>
參考資料: 
<br>
http://darkranger.no-ip.org/content/importerror-no-module-named-fwnm]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/630/1321.page</guid>
				<link>https://forum.andowson.com/posts/preList/630/1321.page</link>
				<pubDate><![CDATA[Fri, 14 Nov 2014 11:14:45]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>解決rsh執行時會出現port 544: Connection refuse</title>
				<description><![CDATA[ 在使用rsh連線至另一台主機時，如果老是遇到類似下列的訊息: 
<br>
connect to address 192.168.1.1 port 544: Connection refused 
<br>
Trying krb4 rsh... 
<br>
connect to address 192.168.1.1 port 544: Connection refused 
<br>
trying normal rsh (/usr/bin/rsh) 
<br>
<br>
原因是rsh會先嘗試用kshell建立連接。如果想禁用這個功能，可作如下修改： 
<br>
[code=plain]cd /usr/kerberos/bin 
<br>
mv rsh rsh.sav 
<br>
ln -s /usr/bin/rsh rsh[/code] 
<br>
<br>
參考資料: 
<br>
http://bbs.chinaunix.net/thread-2201076-1-1.html]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/622/1305.page</guid>
				<link>https://forum.andowson.com/posts/preList/622/1305.page</link>
				<pubDate><![CDATA[Mon, 3 Mar 2014 17:22:08]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回覆:自動擋掉嘗試用ssh入侵Linux的攻擊者IP</title>
				<description><![CDATA[ 今天發現透過檢查BANNED_HOSTS_HISTORY檔案內容有可能會漏封(先前有封過，重開機後因已在歷史檔中)，修改為透過iptables -L OUTPUT -n指令取得目前系統已封鎖之IP，修正後之檔案如下: 
<br>
<br>
[code=bash] 
<br>
#!/bin/bash 
<br>
# Name: banip.sh 
<br>
# Author: Andowson Chang (andowson [at] gmail [dot] com) 
<br>
# Version: 0.6 
<br>
# Since: 2007-01-21 
<br>
# Last Modified: 2013-06-09 
<br>
<br>
# 修改這邊的參數 
<br>
EXTERNAL_INTERFACE="eth0" # value can be "eth0" or "ppp0" 
<br>
BANNED_HOSTS="/tmp/bannedhosts.txt" 
<br>
BANNED_HOSTS_HISTORY="/tmp/history.txt" 
<br>
IPTABLES="/sbin/iptables" 
<br>
GREP_PARAM="^[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*" 
<br>
export LANG=en_US 
<br>
TODAY=`date +%Y-%m-%d` 
<br>
RANGE=`date "+%b %e"` 
<br>
SECURE_LOG="/tmp/secure.${TODAY}" 
<br>
SUSPECTED="/tmp/failed.${TODAY}" 
<br>
<br>
# 將資料資料範圍縮小到今天 
<br>
grep "$RANGE" /var/log/secure &gt; $SECURE_LOG 
<br>
grep "Failed password for invalid user" $SECURE_LOG | awk '{print $13}' &gt; $SUSPECTED 
<br>
grep "Failed password" $SECURE_LOG | grep -v "invalid user" | awk '{print $11}' &gt;&gt; $SUSPECTED 
<br>
<br>
# 找出攻擊的主機IP 
<br>
cat $SUSPECTED | sort | uniq &gt; /tmp/attacker_ip1 
<br>
<br>
# 找出已被封鎖的主機IP 
<br>
$IPTABLES -L OUTPUT -n | grep DROP | awk '{print $5}' | sort | uniq &gt; /tmp/attacker_ip2 
<br>
<br>
# 比對差異，找出新增的IP 
<br>
comm -23 /tmp/attacker_ip[1-2] &gt; $BANNED_HOSTS # 新增主機資料 
<br>
rm -rf /tmp/attacker* 
<br>
<br>
# 將攻擊的主機IP加到iptables擋掉 
<br>
for ip in $( grep $GREP_PARAM $BANNED_HOSTS ) 
<br>
do 
<br>
 echo "Check $ip" 
<br>
 #計算失敗次數 
<br>
 failcount=`grep $ip $SUSPECTED | wc -l` 
<br>
 #超過三次失敗者加入阻擋名單 
<br>
 if [ $failcount &gt; 3 ]; then 
<br>
 echo "Deny access from host: $ip" 
<br>
 $IPTABLES -A INPUT -i $EXTERNAL_INTERFACE -s $ip -j DROP 
<br>
 $IPTABLES -A OUTPUT -o $EXTERNAL_INTERFACE -d $ip -j DROP 
<br>
 # 將處理過的IP清單加到歷史檔去 
<br>
 echo $ip &gt;&gt; $BANNED_HOSTS_HISTORY 
<br>
 fi 
<br>
done 
<br>
<br>
rm -rf $BANNED_HOSTS 
<br>
rm -rf $SECURE_LOG 
<br>
rm -rf $SUSPECTED 
<br>
[/code]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/33/1293.page</guid>
				<link>https://forum.andowson.com/posts/preList/33/1293.page</link>
				<pubDate><![CDATA[Sun, 9 Jun 2013 13:32:08]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>[參考]The Linux Information Project</title>
				<description><![CDATA[ 這個網站提供Linux的名詞定義或命令說明，可以當作Linux字典來使用(搭配瀏覽器的搜尋功能) 
<br>
http://www.linfo.org/main_index.html]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/593/1258.page</guid>
				<link>https://forum.andowson.com/posts/preList/593/1258.page</link>
				<pubDate><![CDATA[Sat, 15 Dec 2012 11:45:47]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>VMware Images for Linux &amp; FreeBSD</title>
				<description><![CDATA[ 此網站提供了各種已裝好 For VMware 的Linux 及 BSD 的 VM Image 
<br>
<br>
想省掉安裝時間快速體驗的人可以到這邊下載... 8) 
<br>
<br>
[url]http://www.thoughtpolice.co.uk/[/url] 
<br>
<br>
 :lol:]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/588/1249.page</guid>
				<link>https://forum.andowson.com/posts/preList/588/1249.page</link>
				<pubDate><![CDATA[Fri, 28 Sep 2012 15:22:56]]> GMT</pubDate>
				<author><![CDATA[ jhliang]]></author>
			</item>
			<item>
				<title>回覆:在Shell Script中寄送檔案當作郵件附件</title>
				<description><![CDATA[ 今天發現有些主機(REHL 3.3: mutt-1.4.1-3.4, RH Linux 7.3: mutt-1.2.5.1-1)使用mutt寄出來的信件寄件人會變成root&lt;&gt;，而被當成廣告信，接著遭到郵件伺服器的封鎖，因此有收不到信的狀況。 
<br>
解決方法就是指定寄件人From: 
<br>
<br>
[code]mutt -e 'my_hdr from:客服中心&lt;service@andowson.com&gt;' -s "測試資料" -a /tmp/test.txt somebody@andowson.com &lt; /dev/null[/code] 
<br>
<br>
這樣子就可以正常收到信了 
<br>
<br>
參考資料: 
<br>
http://pegasus923.pixnet.net/blog/post/33608243-%E5%9C%A8linux%E4%B8%8A%E5%88%A9%E7%94%A8mutt%E6%8C%87%E4%BB%A4%E5%AF%84%E9%99%84%E5%8A%A0%E6%AA%94mail]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/288/1186.page</guid>
				<link>https://forum.andowson.com/posts/preList/288/1186.page</link>
				<pubDate><![CDATA[Thu, 29 Dec 2011 18:07:05]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回覆:解決yum [Errno -1] Metadata file does not match checksum Trying other mirror. </title>
				<description><![CDATA[ 今天發現用原來的方法還是無法真正的解決，找到了下面的網頁: 
<br>
http://plone.lucidsolutions.co.nz/linux/rpm/yum-metadata-file-does-not-match-checksum 
<br>
發現這個問題的真正原因是 http caching，所以使用yum clean all並無法解決問題， 
<br>
我決定採用讓yum暫時不要使用http caching的猛藥 
<br>
將/etc/yum.conf加上 
<br>
[code]http_caching=none[/code] 
<br>
再重新執行一次 
<br>
yum update 
<br>
這次就OK了。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/562/1185.page</guid>
				<link>https://forum.andowson.com/posts/preList/562/1185.page</link>
				<pubDate><![CDATA[Wed, 21 Dec 2011 18:37:31]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
	</channel>
</rss>