最近因為要SDN的POC
廠商要求測試的主机要有二張網卡
一張要開啟promiscuous mode 用來聽所有對外的封包
本來是想放在vm上
但之前要把snort及其他網管軟体移進vm時也一直在找相關的資料
那時就沒找到要如何解決
因為在guest裡就是看不到所有的封包
上週也到proxmox的官方forum上去問
過了好几天也沒人回文
昨天終於找到解決方法了
原來這麼解單
把網卡的bridge設為HUB mode就好了
指令如下
brctl setageing vmbr1 0
順便來去官網自我回文
2015/12/14
2015/12/10
2015/12/04
最近開始直接向各國回報攻擊我們的ip
今天終於有一個國家回信 是日本
好感動
請我再提供log的時區及純文字檔
snort base 無法直接匯出
記錄一下sql語法
select event.cid,signature,sig_name,inet_ntoa(iphdr.ip_src),tcphdr.tcp_sport,inet_ntoa(iphdr.ip_dst),tcphdr.tcp_dport,timestamp from iphdr,event,signature,tcphdr where event.signature=signature.sig_id and event.cid=iphdr.cid and event.cid=tcphdr.cid and event.timestamp like '2015-12-04%' and inet_ntoa(iphdr.ip_src)="133.208.26.134" into outfile '/tmp/133.208.26.134.log';
事件的唯一值是 event裡的cid 其他table都要參考這個值
iphdr 放的是ip資料
tcphdr 放的是tcp的相關port 資料
udphdr 放的是udp的相關port 資料
今天終於有一個國家回信 是日本
好感動
請我再提供log的時區及純文字檔
snort base 無法直接匯出
記錄一下sql語法
select event.cid,signature,sig_name,inet_ntoa(iphdr.ip_src),tcphdr.tcp_sport,inet_ntoa(iphdr.ip_dst),tcphdr.tcp_dport,timestamp from iphdr,event,signature,tcphdr where event.signature=signature.sig_id and event.cid=iphdr.cid and event.cid=tcphdr.cid and event.timestamp like '2015-12-04%' and inet_ntoa(iphdr.ip_src)="133.208.26.134" into outfile '/tmp/133.208.26.134.log';
事件的唯一值是 event裡的cid 其他table都要參考這個值
iphdr 放的是ip資料
tcphdr 放的是tcp的相關port 資料
udphdr 放的是udp的相關port 資料
2015/12/02
2015/11/19
2015/10/29
2015/10/26
2015/10/21
今天在思考一個問題
要不要把google的ip全部設成白名單
但首先要取得google的全部ip
指令如下
nslookup -q=TXT _netblocks.google.com 8.8.8.8
目前得到的資料如下
nslookup -q=TXT _netblocks.google.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
_netblocks.google.com text = "v=spf1 ip4:64.18.0.0/20 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:207.126.144.0/20 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all"
http://itindex.net/detail/50310-google-ip-%E6%96%B9%E6%B3%95
要不要把google的ip全部設成白名單
但首先要取得google的全部ip
指令如下
nslookup -q=TXT _netblocks.google.com 8.8.8.8
目前得到的資料如下
nslookup -q=TXT _netblocks.google.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
_netblocks.google.com text = "v=spf1 ip4:64.18.0.0/20 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:207.126.144.0/20 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all"
http://itindex.net/detail/50310-google-ip-%E6%96%B9%E6%B3%95
2015/10/20
2015/10/14
為了上win10的kms
今天把kms從win7移到win server 2012 r2
測試了原來在win7 win8上使用的bat檔可以直接用沒問題
再來就是office 2016
不管怎麼寫就是會有問題
上網找了一下
有些人說是編碼的問題
有些人說是編輯器的問題
最後試的結果是
word notepad都不行 不管用什麼編碼
notepad++不管用什麼編碼都沒問題
XD
office 2016 kms認証bat檔內容如下
需要的自行取用
記得要改kms server的ip
@echo off
set OfficePath="C:\Program Files\Microsoft Office\Office16\"
if exist "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" set OfficePath="C:\Program Files (x86)\Microsoft Office\Office16\"
cscript %OfficePath%ospp.vbs /sethst:1.2.3.4
cscript %OfficePath%ospp.vbs /setprt:1688
cscript %OfficePath%ospp.vbs /act
echo active is success when you see "<Product activation successful>"
pause
2015/10/07
proxmox 4.0 經過很久的beta 終於 release了
主要有三個功能
bash這個因為我一直都使用ssh 所以沒啥感覺
再來是用LXC取代openvz了
因為我之前也不用openvz
試了一下LXC 感覺上真的快很多
但有個問題
backup目前不能使用snapshot
意思就是備份時要停机
這個我就有點意見了 雖然官方說會改進
再來就是HA的config更簡便了
這個我之前也沒在用
升級之後應該會有這個需求
最重要的是3.x可以用到什麼時候
The Proxmox VE 3.x family is supported until the end of Debian Wheezy security updates (expected end in April 2016)
還有半年
不過官方的建議升級是backup guest
install 新的 再restore guest
再找看看有沒机器和時間來做了
主要有三個功能
bash這個因為我一直都使用ssh 所以沒啥感覺
再來是用LXC取代openvz了
因為我之前也不用openvz
試了一下LXC 感覺上真的快很多
但有個問題
backup目前不能使用snapshot
意思就是備份時要停机
這個我就有點意見了 雖然官方說會改進
再來就是HA的config更簡便了
這個我之前也沒在用
升級之後應該會有這個需求
最重要的是3.x可以用到什麼時候
The Proxmox VE 3.x family is supported until the end of Debian Wheezy security updates (expected end in April 2016)
還有半年
不過官方的建議升級是backup guest
install 新的 再restore guest
再找看看有沒机器和時間來做了
2015/09/27
最近因為有需求買了一支usb 的 nic
用的是 rtl 8150的晶片
http://www.realtek.com/products/productsView.aspx?Langid=1&PFid=8&Level=5&Conn=4&ProdID=21
在win10上用沒几分鐘就GG了
本來以為是壞掉了
可是在win7上測試又能正常使用
打電話去realtek詢問的結果是
win10上只能使用rtl 8152或 rtl 8153
rtl 8150不支援 Orz
http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=56&PFid=56&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8153
沒法度了 因為趕著用
只好上 pchome 買了一支 pqi air pen express 來用
http://tw.pqigroup.com/prod_in.aspx?mnuid=1169&modid=85&prodid=567
晚上訂 隔天中午就到貨了
用的是 rtl 8150的晶片
http://www.realtek.com/products/productsView.aspx?Langid=1&PFid=8&Level=5&Conn=4&ProdID=21
在win10上用沒几分鐘就GG了
本來以為是壞掉了
可是在win7上測試又能正常使用
打電話去realtek詢問的結果是
win10上只能使用rtl 8152或 rtl 8153
rtl 8150不支援 Orz
http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=56&PFid=56&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8153
沒法度了 因為趕著用
只好上 pchome 買了一支 pqi air pen express 來用
http://tw.pqigroup.com/prod_in.aspx?mnuid=1169&modid=85&prodid=567
晚上訂 隔天中午就到貨了
2015/09/13
昨天跳電
firewall又出了一些問題
導致網路內對外沒問題 但外對內不通
因此想找一個外對內監控的方法
找到了利用google drive就能直接使用
滿方便的
http://www.labnol.org/internet/website-uptime-monitor/21060/
firewall又出了一些問題
導致網路內對外沒問題 但外對內不通
因此想找一個外對內監控的方法
找到了利用google drive就能直接使用
滿方便的
http://www.labnol.org/internet/website-uptime-monitor/21060/
2015/09/08
在ubuntu 中
影像處理相關軟体 包含轉檔 加字幕 合併等
Avidemux
http://www.wmfield.idv.tw/532
處理字幕相關軟體
Aegisub
http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?topic_id=79092
影像處理相關軟体 包含轉檔 加字幕 合併等
Avidemux
http://www.wmfield.idv.tw/532
處理字幕相關軟體
Aegisub
http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?topic_id=79092
2015/08/29
原來python打包成exe有三個工具
cx_freeze
py2exe
PyInstaller
之前一直使用的是py2exe
看來cx_freeze也不錯用
下次試看看
http://keliang.blog.51cto.com/3359430/661884
cx_freeze
py2exe
PyInstaller
之前一直使用的是py2exe
看來cx_freeze也不錯用
下次試看看
http://keliang.blog.51cto.com/3359430/661884
2015/08/24
2015/08/23
當完全找不到分割區時
可使用以下工具找看看
分割區救回工具
http://www.cgsecurity.org/wiki/TestDisk
當分割區沒問題 但有軌壞資料無法全部讀取或讀到一半當机時
可使用以下工具試試
壞軌資料救回工具
執行 ddrescue 時必須以分割區下指令不能是整個HD
否則無法mount img來用
ddrescue /dev/sdb1 /tmp/sdb1.img
不能是 ddrescue /dev/sdb /tmp/sdb.img
如要使用image
mount /tmp/sdb1.img /mnt
http://www.gnu.org/software/ddrescue/
誤刪檔救回工具
http://www.cgsecurity.org/wiki/PhotoRec
可使用以下工具找看看
分割區救回工具
http://www.cgsecurity.org/wiki/TestDisk
當分割區沒問題 但有軌壞資料無法全部讀取或讀到一半當机時
可使用以下工具試試
壞軌資料救回工具
執行 ddrescue 時必須以分割區下指令不能是整個HD
否則無法mount img來用
ddrescue /dev/sdb1 /tmp/sdb1.img
不能是 ddrescue /dev/sdb /tmp/sdb.img
如要使用image
mount /tmp/sdb1.img /mnt
http://www.gnu.org/software/ddrescue/
誤刪檔救回工具
http://www.cgsecurity.org/wiki/PhotoRec
2015/08/20
昨天上課時臨時需要xp
想說把virtualbox的guest匯出直接co給別人匯入比較快
想不到匯入後竟然開不了機 出現以下訊息
但同樣的檔在ubuntu中匯入卻沒問題
依字面上來看是有相同名字的node所以無法開机
但就只有一台啊XD
以這個message去找 也找不到什麼東東
只好自己試了 把設定值一個一個取消試看看
試到最後
在usb的選項把啟用usb取消勾選後
會出現偵測到無效的設定值的訊息
不管他
直接按確定
系統會自動再加回去
但是
這樣再開机就沒問題了吔
見鬼了
是七月沒拜拜嗎
另外 host guest 間的檔案拖放 在不同的 os 中有不同的結果
目前還是先用 共用資料夾 比較沒問題
想說把virtualbox的guest匯出直接co給別人匯入比較快
想不到匯入後竟然開不了機 出現以下訊息
但同樣的檔在ubuntu中匯入卻沒問題
依字面上來看是有相同名字的node所以無法開机
但就只有一台啊XD
以這個message去找 也找不到什麼東東
只好自己試了 把設定值一個一個取消試看看
試到最後
在usb的選項把啟用usb取消勾選後
會出現偵測到無效的設定值的訊息
不管他
直接按確定
系統會自動再加回去
但是
這樣再開机就沒問題了吔
見鬼了
是七月沒拜拜嗎
另外 host guest 間的檔案拖放 在不同的 os 中有不同的結果
目前還是先用 共用資料夾 比較沒問題
2015/08/19
2015/08/11
honeyd大約測了一週 看來是沒啥問題
只好在 root 的 home下寫一個 .bash_logout
在關机前把相關的process kill 掉
寫一個script
kill_process
在關机前把相關的process kill 掉
#!/bin/bash
for i in `pidof farpd`
do
kill -9 $i
done
kill -9 `pidof honeyd`
再把這個script放在
/etc/systemd/system/reboot.target.wants/hwclock-save.service裡
[Service]
Type=oneshot
ExecStart=/sbin/hwclock -D --systohc
ExecStart=/root/kill_process
不知道這樣到底對不對 有沒有什麼潛在的問題 目前有作用就是了
20160217 後記
今天apt-get update後要reboot時又沒法關机了
發現寫進去的東東被洗掉了
再找了一次資料
發現一個很簡單的解法
把/lib/systemd/system/rc-local.service原本的timeout改一下就好了
原本預設為0所以是unlimit改為5問題就解決了 timeout時間一到机器就會關了 不會再一直等
[Unit]
Description=/etc/rc.local Compatibility
[Service]
Type=oneshot
ExecStart=/etc/rc.local
TimeoutSec=5
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
也不知為什麼honeyd.log變成binary file了
grep要加上-a才會正常
grep -a "123" /var/log/honeypot/honeyd.log
但因為之前是直接下載iso回來用 使用的是ubuntu 12.04 有點舊
想說直接換成debian好了 目前是 8.1
只要在
/etc/apt/source.list
加上
deb http://ftp.us.debian.org/debian squeeze main
apt-get udpate
apt-get install honeyd
就可以了
但裝完後一直不能啟動
原來是要把 /etc/default/honeyd的 RUN="no"改成RUN="yes"
再把NETWORK mark 掉
雖然systemctl start honeyd 時有error 但process 還是有起來
不能enable就是了
沒想到關机出現問題
要重開時一直出現
a stop job is running for /etc/rc.local compatibility
而關不了机
還是第一次碰到這個問題
看來是因為把farpd及honeyd寫到/etc/rc.local後造成的
20160217 後記
今天apt-get update後要reboot時又沒法關机了
發現寫進去的東東被洗掉了
再找了一次資料
發現一個很簡單的解法
把/lib/systemd/system/rc-local.service原本的timeout改一下就好了
原本預設為0所以是unlimit改為5問題就解決了 timeout時間一到机器就會關了 不會再一直等
[Unit]
Description=/etc/rc.local Compatibility
[Service]
Type=oneshot
ExecStart=/etc/rc.local
TimeoutSec=5
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
接下來要把捉到的ip進行處理了
在debian中要取honeyd.log時出現error
grep "123" /var/log/honeypot/honeyd.log
Binary file /var/log/honeypot/honeyd.log matches
在debian中要取honeyd.log時出現error
grep "123" /var/log/honeypot/honeyd.log
Binary file /var/log/honeypot/honeyd.log matches
也不知為什麼honeyd.log變成binary file了
grep要加上-a才會正常
grep -a "123" /var/log/honeypot/honeyd.log
2015/08/06
2015/08/04
2015/08/03
最近忽然想玩一下honeypot
找了一下
好像都沒什麼新的project
只有看到honeyd好像還滿多人用的
不過也好久沒更新了
另外有一個honeydrive是利用xubuntu 12.04 為base裝了十個honeypot的軟体
所以決定用這個
iso裝好後首先要修改honeyd.conf
範例如下
create linux
set linux personality "Linux 2.4.7 (X86)"
add linux tcp port 25 "/usr/share/honeyd/scripts/unix/general/smtp.pl"
add linux tcp port 110 "/usr/share/honeyd/scripts/unix/general/pop/pop3.sh"
set linux default tcp action reset
set linux uid 32767 gid 32767
bind 192.168.1.1 linux
create windows
set windows personality "Microsoft Windows 2000 SP3"
add windows tcp port 80 "/usr/share/honeyd/scripts/win32/web.sh"
add windows tcp port 135 open
set windows default tcp action reset
set windows default udp action block
set windows uid 32767 gid 32767
bind 192.168.1.2 windows
service honeyd restart
再來就是要執行farpd 這樣才能讓bind的ip生效
語法如下
farpd 192.168.1.1-192.168.1.2
或
farpd 192.168.1.1/24
如果ip不連續
就要多執行几次
farpd 192.168.1.1
farpd 192.168.1.2
可以用nmap測一下
等個几天再來看看log
http://www.honeyd.org/
http://sourceforge.net/projects/honeydrive/
http://tiserle.blogspot.tw/2011/06/honeyd.html
找了一下
好像都沒什麼新的project
只有看到honeyd好像還滿多人用的
不過也好久沒更新了
另外有一個honeydrive是利用xubuntu 12.04 為base裝了十個honeypot的軟体
所以決定用這個
iso裝好後首先要修改honeyd.conf
範例如下
create linux
set linux personality "Linux 2.4.7 (X86)"
add linux tcp port 25 "/usr/share/honeyd/scripts/unix/general/smtp.pl"
add linux tcp port 110 "/usr/share/honeyd/scripts/unix/general/pop/pop3.sh"
set linux default tcp action reset
set linux uid 32767 gid 32767
bind 192.168.1.1 linux
create windows
set windows personality "Microsoft Windows 2000 SP3"
add windows tcp port 80 "/usr/share/honeyd/scripts/win32/web.sh"
add windows tcp port 135 open
set windows default tcp action reset
set windows default udp action block
set windows uid 32767 gid 32767
bind 192.168.1.2 windows
service honeyd restart
再來就是要執行farpd 這樣才能讓bind的ip生效
語法如下
farpd 192.168.1.1-192.168.1.2
或
farpd 192.168.1.1/24
如果ip不連續
就要多執行几次
farpd 192.168.1.1
farpd 192.168.1.2
可以用nmap測一下
等個几天再來看看log
http://www.honeyd.org/
http://sourceforge.net/projects/honeydrive/
http://tiserle.blogspot.tw/2011/06/honeyd.html
2015/07/30
昨天下午17點多發生一台cisco不明原因的網路不通
早上去查了一下
找不到原因
只好把昨天早上的config 備份倒回去
說也奇怪 就正常了
到了今天中午
宿舍的4台cisco一起出問題
查了一下log如下
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan206 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan207 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan208 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan209 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan210 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
詢問廠商後得到這樣的回答
原廠對3850/3650 ACL限制的說明,
ACL TCAM (TAQ)有2塊,分別為in與out,但VACL只能使用其中1塊.限制如下:
1.VACL => 1.5K 筆 (最多,不分in,out)
2.MAC VACL => 單向460筆(in,out分開算)
3.IPv4 VACL => 單向690筆(in,out分開算)
4.IPv4 PACL,RACL => 單向1380筆(in,out分開算)
5.MAC PACL,RACL =>單向690筆(in,out分開算)
6.IPv6 PACL,RACL =>單向690筆(in,out分開算)
VLAN Access Control List (VACL) − A VACL is an ACL that is applied to a VLAN. It can only be applied to a VLAN and no other type of interface. The security boundary is to permit or deny traffic that moves between VLANs and permit or deny traffic within a VLAN. The VLAN ACL is supported in hardware, and has no effect on the performance.
Port Access Control List (PACL) − A PACL is an ACL applied to a Layer 2 switchport interface. The security boundary is to permit or deny traffic within a VLAN. The PACL is supported in hardware and has no effect on the performance.
Router ACL (RACL) − An RACL is an ACL that is applied to an interface that has a Layer 3 address assigned to it. It can be applied to any port that has an IP address such as routed interfaces, loopback interfaces, and VLAN interfaces. The security boundary is to permit or deny traffic that moves between subnets or n
意思就是說當acl下超過690條後 机器就會不正常了
XD
cisco吔
為什麼以前都沒發生過咧
不知是因為最近snort升到 2.9.7.5 所以 port scan變的比較敏感
還是port scan真的變多了
反正先改了一下程式
要block的ip直接下到fortiget而不先進LP了
看來也沒啥好方法可以處理了
早上去查了一下
找不到原因
只好把昨天早上的config 備份倒回去
說也奇怪 就正常了
到了今天中午
宿舍的4台cisco一起出問題
查了一下log如下
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan206 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan207 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan208 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan209 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
Jul 30 11:10:27 GMT+8: %ACL_ERRMSG-4-UNLOADED: 1 fed: Output IP Vlan ACL on interface Vlan210 for label 3 on asic255 could not be programmed in hardware and traffic will be dropped.
詢問廠商後得到這樣的回答
原廠對3850/3650 ACL限制的說明,
ACL TCAM (TAQ)有2塊,分別為in與out,但VACL只能使用其中1塊.限制如下:
1.VACL => 1.5K 筆 (最多,不分in,out)
2.MAC VACL => 單向460筆(in,out分開算)
3.IPv4 VACL => 單向690筆(in,out分開算)
4.IPv4 PACL,RACL => 單向1380筆(in,out分開算)
5.MAC PACL,RACL =>單向690筆(in,out分開算)
6.IPv6 PACL,RACL =>單向690筆(in,out分開算)
VLAN Access Control List (VACL) − A VACL is an ACL that is applied to a VLAN. It can only be applied to a VLAN and no other type of interface. The security boundary is to permit or deny traffic that moves between VLANs and permit or deny traffic within a VLAN. The VLAN ACL is supported in hardware, and has no effect on the performance.
Port Access Control List (PACL) − A PACL is an ACL applied to a Layer 2 switchport interface. The security boundary is to permit or deny traffic within a VLAN. The PACL is supported in hardware and has no effect on the performance.
Router ACL (RACL) − An RACL is an ACL that is applied to an interface that has a Layer 3 address assigned to it. It can be applied to any port that has an IP address such as routed interfaces, loopback interfaces, and VLAN interfaces. The security boundary is to permit or deny traffic that moves between subnets or n
意思就是說當acl下超過690條後 机器就會不正常了
XD
cisco吔
為什麼以前都沒發生過咧
不知是因為最近snort升到 2.9.7.5 所以 port scan變的比較敏感
還是port scan真的變多了
反正先改了一下程式
要block的ip直接下到fortiget而不先進LP了
看來也沒啥好方法可以處理了
2015/07/28
2015/07/22
雖然網路上已經有很多關於使用ssh不用打密碼的教學文章
還是稍微記一下好了
先在client和server使用者的home目錄下建立.ssh的目錄
在client的机器中執行以下指令
ssh-keygen -t rsa 或 ssh-keygen -t dsa
dsa rsa 是二種不同的加密方式 就看要選擇那一種
之後按個几次enter
會在.ssh這個目錄內產生一對檔案
id_dsa
id_dsa.pub
或
id_rsa
id_rsa.pub
接下來把.pub那個檔案傳到要連線的server上
scp id_rsa.pub server_ip:~/.ssh/
再連到server上執行
cat .ssh/id_rsa.pub >> .ssh/authorized_keys
exit後再次連到server就無需再打密碼了
若有很多的client端key要放到server上
只要把pub檔附加到authorized_keys即可
cat .ssh/id_rsa.pub >> .ssh/authorized_keys
server端 修改 /etc/ssh/sshd_config
某些os可能不接受dsa的key而無法登入 此時就要換用rsa
server端 修改 /etc/ssh/sshd_config
PasswordAuthentication no
PubkeyAuthentication yes
如果要開放 root login
PermitRootLogin prohibit-password
改為:
PermitRootLogin yes
2015/07/21
2015/07/15
又到了每半年一次要使用openvas的時間
果不其然 又出問題了
決定以後要用再下vm 回來就好了
不想再裝了
vm使用的是debian
跑在virtualbox上還ok
跑完後因為報表只需要High跟Medium
所以在用ip sort後要再改 levels=hm 才符合需求
整個filter的條件如下
sort=host first=1 result_hosts_only=1 min_cvss_base= min_qod= levels=hm autofp=0 notes=1 overrides=1 rows=100 delta_states=gn
果不其然 又出問題了
決定以後要用再下vm 回來就好了
不想再裝了
vm使用的是debian
跑在virtualbox上還ok
跑完後因為報表只需要High跟Medium
所以在用ip sort後要再改 levels=hm 才符合需求
整個filter的條件如下
sort=host first=1 result_hosts_only=1 min_cvss_base= min_qod= levels=hm autofp=0 notes=1 overrides=1 rows=100 delta_states=gn
最近每次升級cacti都有問題
升到 0.8.8e 後原本正常的script output 竟然有個值不見了
到forum看看 已經有人反應了
http://forums.cacti.net/viewtopic.php?f=21&t=54856
只能再等了
無言
升到 0.8.8e 後原本正常的script output 竟然有個值不見了
到forum看看 已經有人反應了
http://forums.cacti.net/viewtopic.php?f=21&t=54856
只能再等了
無言
2015/07/07
今天接到一個工作
要把snort裡的資料匯出成文字檔給外面的單位
因為BASE沒辦法一次全部匯出
所以要自己寫sql了
select event.cid,signature,sig_name,inet_ntoa(iphdr.ip_src),inet_ntoa(iphdr.ip_dst),timestamp from iphdr,event,signature where event.signature=signature.sig_id and event.cid=iphdr.cid into outfile '/tmp/sqloutput.txt';
http://www.andrew.cmu.edu/user/rdanyliw/snort/acid_db_er_v102.html
http://sgros.blogspot.tw/2012/07/querying-snort-sql-database.html
http://note.tc.edu.tw/670.html
要把snort裡的資料匯出成文字檔給外面的單位
因為BASE沒辦法一次全部匯出
所以要自己寫sql了
select event.cid,signature,sig_name,inet_ntoa(iphdr.ip_src),inet_ntoa(iphdr.ip_dst),timestamp from iphdr,event,signature where event.signature=signature.sig_id and event.cid=iphdr.cid into outfile '/tmp/sqloutput.txt';
http://www.andrew.cmu.edu/user/rdanyliw/snort/acid_db_er_v102.html
http://sgros.blogspot.tw/2012/07/querying-snort-sql-database.html
http://note.tc.edu.tw/670.html
2015/07/05
2015/06/30
brocade fws 624 密碼忘記時的處理方法
Recover from a lost password.
1. Start a CLI session over the serial interface to the Brocade device.
2. Reboot the device.
3. While the system is booting, before the initial system prompt appears, enter b to enter the boot
monitor mode.
4. Enter no password at the prompt. (You cannot abbreviate this command.)
5. Enter boot system flash primary at the prompt. This command causes the device to bypass the
system password check.
After the console prompt reappears, assign a new password
Recover from a lost password.
1. Start a CLI session over the serial interface to the Brocade device.
2. Reboot the device.
3. While the system is booting, before the initial system prompt appears, enter b to enter the boot
monitor mode.
4. Enter no password at the prompt. (You cannot abbreviate this command.)
5. Enter boot system flash primary at the prompt. This command causes the device to bypass the
system password check.
After the console prompt reappears, assign a new password
2015/06/29
2015/06/28
最近想在8G的硬碟上裝linux mint
但安裝時會出現
說hd不夠大
為了解決這個問題找了一下資料
也不難處理
修改 /usr/lib/ubiquity/ubiquity/misc.py
min_disk_size = size * 2 # fudge factor.
為
min_disk_size = size * 1.1 # fudge factor.
再執行installer就ok了
http://forums.linuxmint.com/viewtopic.php?f=46&t=182642
但安裝時會出現
說hd不夠大
為了解決這個問題找了一下資料
也不難處理
修改 /usr/lib/ubiquity/ubiquity/misc.py
min_disk_size = size * 2 # fudge factor.
為
min_disk_size = size * 1.1 # fudge factor.
再執行installer就ok了
http://forums.linuxmint.com/viewtopic.php?f=46&t=182642
2015/06/26
好像愈來愈多人設定forword來把信轉到gmail去
導致因為信件量太多而被google擋了
一直出現
Jun 26 13:43:11 mail postfix/smtp[19923]: 4BB3B9E0624: lost connection with ALT1.ASPMX.L.GOOGLE.COM[64.233.168.26] while receiving the initial server greeting
Jun 26 13:43:13 mail postfix/smtp[19922]: 743E79E058A: lost connection with alt2.gmail-smtp-in.l.google.com[64.233.168.27] while receiving the initial server greeting
除了要求user不要再轉信而用pop3來收信外
想不出來有什麼方式可以解決了
查了一下google有提供轉發的服務
https://support.google.com/a/answer/2956491?hl=zh-Hant
再想看看要不要用
導致因為信件量太多而被google擋了
一直出現
Jun 26 13:43:11 mail postfix/smtp[19923]: 4BB3B9E0624: lost connection with ALT1.ASPMX.L.GOOGLE.COM[64.233.168.26] while receiving the initial server greeting
Jun 26 13:43:13 mail postfix/smtp[19922]: 743E79E058A: lost connection with alt2.gmail-smtp-in.l.google.com[64.233.168.27] while receiving the initial server greeting
除了要求user不要再轉信而用pop3來收信外
想不出來有什麼方式可以解決了
查了一下google有提供轉發的服務
https://support.google.com/a/answer/2956491?hl=zh-Hant
再想看看要不要用
2015/06/19
after cacti upgrade to 0.8.8d
zoom not working
Orz
wait for some days
someone find the problem and solved
download jquery-ui.js from https://jqueryui.com/download/
and put it into /cacti/include/js/
jquery-ui.js is missing from Cacti 0.8.8d tar.gz package.
This library is needed by jquery-zoom plugin.
This is the script load header from default cacti tree view :
<script type="text/javascript" src="/cacti/include/layout.js"></script>
<script type="text/javascript" src="/cacti/include/js/jquery.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/js/jquery-ui.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/js/jquery.cookie.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/js/jstree.js"></script>
<script type="text/javascript" src="/cacti/include/js/jquery.zoom.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/jscalendar/calendar.js"></script>
<script type="text/javascript" src="/cacti/include/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="/cacti/include/jscalendar/calendar-setup.js"></script>
http://forums.cacti.net/viewtopic.php?f=21&t=54754
zoom not working
Orz
wait for some days
someone find the problem and solved
download jquery-ui.js from https://jqueryui.com/download/
and put it into /cacti/include/js/
jquery-ui.js is missing from Cacti 0.8.8d tar.gz package.
This library is needed by jquery-zoom plugin.
This is the script load header from default cacti tree view :
<script type="text/javascript" src="/cacti/include/layout.js"></script>
<script type="text/javascript" src="/cacti/include/js/jquery.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/js/jquery-ui.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/js/jquery.cookie.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/js/jstree.js"></script>
<script type="text/javascript" src="/cacti/include/js/jquery.zoom.js" language="javascript"></script>
<script type="text/javascript" src="/cacti/include/jscalendar/calendar.js"></script>
<script type="text/javascript" src="/cacti/include/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="/cacti/include/jscalendar/calendar-setup.js"></script>
http://forums.cacti.net/viewtopic.php?f=21&t=54754
2015/06/02
2015/05/17
ubuntu 目前預設都是使用unity 3d為預設桌面環境
但在顯示效能比較差的電腦上總是會有點lag的情況
若要轉回舊版桌面
要安裝
gnome-session-flashback
安裝後登出
在重新登入前按登入區塊右上角的ubuntu圖示就可以選擇不同的桌面環境
在此選擇 gnome flash back(metacity) 登入
若要在桌面上建立捷徑
在 /home/user/桌面 裡建立以下檔案 以terminator為例
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[zh_TW]=/home/user/icon/terminator_7302.png
Name[zh_TW]=terminator
Exec=/usr/share/terminator/terminator
Name=terminator
Icon=/home/user/icon/terminator_7302.png
若要再建立新的捷徑
只要複制檔案 再修改紅色地方即可 icon 要手動找一下
但在顯示效能比較差的電腦上總是會有點lag的情況
若要轉回舊版桌面
要安裝
gnome-session-flashback
安裝後登出
在重新登入前按登入區塊右上角的ubuntu圖示就可以選擇不同的桌面環境
在此選擇 gnome flash back(metacity) 登入
若要在桌面上建立捷徑
在 /home/user/桌面 裡建立以下檔案 以terminator為例
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[zh_TW]=/home/user/icon/terminator_7302.png
Name[zh_TW]=terminator
Exec=/usr/share/terminator/terminator
Name=terminator
Icon=/home/user/icon/terminator_7302.png
若要再建立新的捷徑
只要複制檔案 再修改紅色地方即可 icon 要手動找一下
2015/05/16
2015/05/15
5/13psad又有更新版本
上次2.4版時更新就有問題了
所以沒更新
今天想說再試看看
結果用tar.gz更新還是有問題
想說有提供rpm
所以重裝一台好了
放在centos7 x64上
使用rpm裝完沒問題
但systemctl start psad會起不來
用
journalctl -xn
找一下停在什麼地方
要補什麼東東
還要再加裝的有
perl-Data-Dumper.x86_64
psmisc.x86_64
mailx
iptables-devel.x86_64
perl-ExtUtils-MakeMaker.noarch
perl-NetAddr-IP.x86_64
perl-Date-Calc.noarch
perl-Sys-Syslog.x86_64
gcc
ntpdate
ftp
另外有几個沒有rpm
IPTables-ChainMgr-1.3
IPTables-Parse-1.4
Unix-Syslog-1.1
使用
perl Makefile.PL
make
make install
手動做
如果有缺什麼再補一下吧
log的格式沒有變
所以程式不用修改
最後把這個ip 在 firewall 完全開放
大家來攻吧!
ps
除了改/etc/psad/psad.conf外
記得在/etc/psad/auto_dl
加上內部的ip
不然log會收不完
上次2.4版時更新就有問題了
所以沒更新
今天想說再試看看
結果用tar.gz更新還是有問題
想說有提供rpm
所以重裝一台好了
放在centos7 x64上
使用rpm裝完沒問題
但systemctl start psad會起不來
用
journalctl -xn
找一下停在什麼地方
要補什麼東東
還要再加裝的有
perl-Data-Dumper.x86_64
psmisc.x86_64
mailx
iptables-devel.x86_64
perl-ExtUtils-MakeMaker.noarch
perl-NetAddr-IP.x86_64
perl-Date-Calc.noarch
perl-Sys-Syslog.x86_64
gcc
ntpdate
ftp
另外有几個沒有rpm
IPTables-ChainMgr-1.3
IPTables-Parse-1.4
Unix-Syslog-1.1
使用
perl Makefile.PL
make
make install
手動做
如果有缺什麼再補一下吧
log的格式沒有變
所以程式不用修改
最後把這個ip 在 firewall 完全開放
大家來攻吧!
ps
除了改/etc/psad/psad.conf外
記得在/etc/psad/auto_dl
加上內部的ip
不然log會收不完
2015/05/09
自從之前換isp升速後
發珼舊的ap及無線網卡沒法達到isp給的速度
所以買了新的ap (tp-link tl-wr740n)及asus n10 nano usb無線網卡
但因為使用原廠提供的linux driver一直無法使用
所以使用ndiswrapper掛載windows的driver來使用
但一直有動不動就斷線的困擾
今天再去查了一下
找到了一個方法
sudo apt-get install git
git clone https://github.com/pvaret/rtl8192cu-fixes.git
cd rtl8192cu-fixes
make
sudo make install
sudo modprobe 8192cu
使用改過的driver來編譯使用
目前還沒有問題
再試几天看看吧
發珼舊的ap及無線網卡沒法達到isp給的速度
所以買了新的ap (tp-link tl-wr740n)及asus n10 nano usb無線網卡
但因為使用原廠提供的linux driver一直無法使用
所以使用ndiswrapper掛載windows的driver來使用
但一直有動不動就斷線的困擾
今天再去查了一下
找到了一個方法
sudo apt-get install git
git clone https://github.com/pvaret/rtl8192cu-fixes.git
cd rtl8192cu-fixes
make
sudo make install
sudo modprobe 8192cu
使用改過的driver來編譯使用
目前還沒有問題
再試几天看看吧
2015/05/08
在 mail server的log裡發現
postfix/smtp[1921]: 347A79E0739: to=<abc@gmail.com>, orig_to=<abc@bbb.edu.tw>, relay=alt1.gmail-smtp-in.l.google.com[74.125.25.27]:25, delay=239783, delays=239779/0.04/2.6/0.84, dsn=4.7.0, status=deferred (host alt1.gmail-smtp-in.l.google.com[74.125.25.27] said: 421-4.7.0 [2.3.4.5 15] Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 rate limited. Please visit 421-4.7.0 http://www.google.com/mail/help/bulk_mail.html to review our Bulk 421 4.7.0 Email Senders Guidelines. d5si4976585pdi.47 - gsmtp (in reply to end of DATA command))
被google擋信了
查了一下google的網頁說明
有三個方式可以處理
最方便的是在DNS設定spf
;spf for google
bbb.edu.tw. 3600 IN TXT "v=spf1 ip4:2.3.4.5 include:_spf.google.com ~all"
設定後重啟DNS
等cache更新後就ok了
postfix/smtp[1921]: 347A79E0739: to=<abc@gmail.com>, orig_to=<abc@bbb.edu.tw>, relay=alt1.gmail-smtp-in.l.google.com[74.125.25.27]:25, delay=239783, delays=239779/0.04/2.6/0.84, dsn=4.7.0, status=deferred (host alt1.gmail-smtp-in.l.google.com[74.125.25.27] said: 421-4.7.0 [2.3.4.5 15] Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 rate limited. Please visit 421-4.7.0 http://www.google.com/mail/help/bulk_mail.html to review our Bulk 421 4.7.0 Email Senders Guidelines. d5si4976585pdi.47 - gsmtp (in reply to end of DATA command))
被google擋信了
查了一下google的網頁說明
有三個方式可以處理
最方便的是在DNS設定spf
;spf for google
bbb.edu.tw. 3600 IN TXT "v=spf1 ip4:2.3.4.5 include:_spf.google.com ~all"
設定後重啟DNS
等cache更新後就ok了
2015/05/05
2015/05/01
二套偵測硬碟老化及是否有壞軌的程式
http://hddguru.com/software/2005.10.02-MHDD/
燒成光碟開机
http://hddscan.com/
在win下執行
ubuntu 使用
sudo badblocks -nsv -c 1 /dev/sdb
http://hddguru.com/software/2005.10.02-MHDD/
燒成光碟開机
http://hddscan.com/
在win下執行
ubuntu 使用
sudo badblocks -nsv -c 1 /dev/sdb
2015/04/22
free WAF
for iis
http://www.iis.net/downloads/microsoft/urlscan
for apache
https://www.modsecurity.org/
for iis
http://www.iis.net/downloads/microsoft/urlscan
for apache
https://www.modsecurity.org/
原來使用的ultravnc SC都必須直接指定到固定机器上
最近有個需求
希望在校內各個地方都能連線user的電腦
就是說user及工程師的ip都不固定
想到使用 ultravnc的 repeater來做
流程如下
1. 找一台pc來執行 repeater
http://www.uvnc.com/downloads/repeater.html
使用預設值 執行後無須做任何修改
2. 修改原本使用的SC裡的helpdesk.txt
加上
[HOST]
any
-id 1234 -connect 10.0.0.1:5500
10.0.0.1為第1點執行repeater 的 pc ip
3. 工程師執行 vncviewer後 要連線的設定如下
或直接執行指令 vncviewer.exe ID:1234 -proxy 10.0.0.1:5901
10.0.0.1為 repeater 的ip
最近有個需求
希望在校內各個地方都能連線user的電腦
就是說user及工程師的ip都不固定
想到使用 ultravnc的 repeater來做
流程如下
1. 找一台pc來執行 repeater
http://www.uvnc.com/downloads/repeater.html
使用預設值 執行後無須做任何修改
2. 修改原本使用的SC裡的helpdesk.txt
加上
[HOST]
any
-id 1234 -connect 10.0.0.1:5500
10.0.0.1為第1點執行repeater 的 pc ip
3. 工程師執行 vncviewer後 要連線的設定如下
或直接執行指令 vncviewer.exe ID:1234 -proxy 10.0.0.1:5901
10.0.0.1為 repeater 的ip
2015/04/16
2015/04/10
word 20xx 持續出現錯誤 "........安裝軟體時 選擇不要安裝巨集........"
解決方法如下:
從 檔案→選項→信任中心→信任中心設定→增益集
勾選
停用所有應用程式增益集(可能影響功能)
http://answers.microsoft.com/zh-hant/office/forum/office_2010-word/word-2010/8e952bb9-ac1c-4ab1-b00a-9e1d96c9983c
解決方法如下:
從 檔案→選項→信任中心→信任中心設定→增益集
勾選
停用所有應用程式增益集(可能影響功能)
http://answers.microsoft.com/zh-hant/office/forum/office_2010-word/word-2010/8e952bb9-ac1c-4ab1-b00a-9e1d96c9983c
今天在安裝使用playonlinux
在裝完ie8後發現有很多字變成了方格
應該是因為安裝了英文版的IE
而且又沒有中文字型
所以找了一下解決的方法
1.
把/usr/share/fonts/truetype/wqy內的
wqy-microhei.ttc
cp 到
/home/abc/PlayOnLinux's virtual drives/InternetExplorer8/drive_c/windows/Fonts
2.建立f.reg
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-microhei.ttc"
"Microsoft Sans Serif"="wqy-microhei.ttc"
"MS Sans Serif"="wqy-microhei.ttc"
"Tahoma"="wqy-microhei.ttc"
"Tahoma Bold"="wqy-microhei.ttc"
"SimSun"="wqy-microhei.ttc"
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
3.
打開playonlinux 點選 配置
點選wine 註冊表編輯器
匯入之前建立的 f.reg
http://blog.csdn.net/LanderlYoung/article/details/12177091
在裝完ie8後發現有很多字變成了方格
應該是因為安裝了英文版的IE
而且又沒有中文字型
所以找了一下解決的方法
1.
把/usr/share/fonts/truetype/wqy內的
wqy-microhei.ttc
cp 到
/home/abc/PlayOnLinux's virtual drives/InternetExplorer8/drive_c/windows/Fonts
2.建立f.reg
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-microhei.ttc"
"Microsoft Sans Serif"="wqy-microhei.ttc"
"MS Sans Serif"="wqy-microhei.ttc"
"Tahoma"="wqy-microhei.ttc"
"Tahoma Bold"="wqy-microhei.ttc"
"SimSun"="wqy-microhei.ttc"
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
3.
打開playonlinux 點選 配置
點選wine 註冊表編輯器
匯入之前建立的 f.reg
http://blog.csdn.net/LanderlYoung/article/details/12177091
2015/04/09
2015/03/25
2015/03/20
2015/03/16
psad 之前每次都隔好久才更新
昨天上去看
2015就更新了二次
版本已經到 2.2.5了
Added signature to detect fwknop Single Packet Authorization (SPA)
packets that are destined to the default UDP port 62201
看change log好像在這個月 2015/3還會到 2.2.6
還是先更新一下
log的格式沒變,所以程式不用改
另外psad的log已經獨立出來放在/var/log/psad
有滿詳細的資料 要鎖ip可以直接到這裡捉就好了
不過程式先不改
但 2.2.6出來再看看
https://cipherdyne.org/psad/download/
昨天上去看
2015就更新了二次
版本已經到 2.2.5了
Added signature to detect fwknop Single Packet Authorization (SPA)
packets that are destined to the default UDP port 62201
看change log好像在這個月 2015/3還會到 2.2.6
還是先更新一下
log的格式沒變,所以程式不用改
另外psad的log已經獨立出來放在/var/log/psad
有滿詳細的資料 要鎖ip可以直接到這裡捉就好了
不過程式先不改
但 2.2.6出來再看看
https://cipherdyne.org/psad/download/
2015/03/10
2015/03/09
一直都是在user 的.profile把mail forward到gmail去
可是最近突然發現有些mail沒收到
check了一下mail log
發現以下的訊息
Mar 6 16:48:26 mail postfix/smtp[31508]: 206879E074E: to=<test@staff.edu.tw>, orig_to=<test2@mail.edu.tw>, relay=ASPMX.L.GOOGLE.COM[74.125.23.26]:25, delay=2, delays=0.01/0.01/0.54/1.4, dsn=5.7.1, status=bounced (host ASPMX.L.GOOGLE.COM[74.125.23.26] said: 550-5.7.1 [1.1.1.1 12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for 550 5.7.1 more information. x1si13668566pdp.46 - gsmtp (in reply to end of DATA command))
居然被google視為spam而擋了
找了一下解決方法有三個 SPF DKIM DMARC
最快的是設定SPF
https://support.google.com/a/answer/178723?hl=zh-Hant
參考以下資料設定完成後
http://www.icst.org.tw/ArticlesDetail.aspx?seq=1351&lang=zh
目前沒有再出現被擋的訊息了
持續觀察中
不知道是不是太多人設forward了
XD
可是最近突然發現有些mail沒收到
check了一下mail log
發現以下的訊息
Mar 6 16:48:26 mail postfix/smtp[31508]: 206879E074E: to=<test@staff.edu.tw>, orig_to=<test2@mail.edu.tw>, relay=ASPMX.L.GOOGLE.COM[74.125.23.26]:25, delay=2, delays=0.01/0.01/0.54/1.4, dsn=5.7.1, status=bounced (host ASPMX.L.GOOGLE.COM[74.125.23.26] said: 550-5.7.1 [1.1.1.1 12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for 550 5.7.1 more information. x1si13668566pdp.46 - gsmtp (in reply to end of DATA command))
居然被google視為spam而擋了
找了一下解決方法有三個 SPF DKIM DMARC
最快的是設定SPF
https://support.google.com/a/answer/178723?hl=zh-Hant
參考以下資料設定完成後
http://www.icst.org.tw/ArticlesDetail.aspx?seq=1351&lang=zh
目前沒有再出現被擋的訊息了
持續觀察中
不知道是不是太多人設forward了
XD
2015/02/20
之前有介紹過 mobaxterm 在win下非常方便好用的工具
如果在linux 的 x-win 下要下指令到多個terminal要怎麼辦呢?
找到了 terminator 相當方便
apt-get install terminator 就可以使用了
第一次執行時會發現有些字重疊在一起了
要改字体來解決這個問題
在視窗內按右鍵-偏好設定裡把字型設為 ubuntu mono 就可以了
(如果還有問題再換其他字体看看)
以下是相關的快速鍵整理
Ctrl + Shift + t 開新 Tab
Ctrl-Shift-E: 新增terminal並垂直切割
Ctrl-Shift-O: 新增terminal並水平切割
Ctrl-Shift-P: 回到上一個terminal
Ctrl-Shift-N: 至下一個terminal
Ctrl-Shift-W: 關閉目前的terminal
Ctrl-Shift-Q: 結束terminator
F11: 全螢幕顯示
ctrl+tab為在分割畫面間切換
ctrl+shift+c 把圈選部份copy
ctrl+shift+v paste
ctrl+shift+上下左右鍵 調整分割畫面範圍
ctrl+shift+x 為將目前分割畫面放大
http://forum.ubuntu.com.cn/viewtopic.php?f=48&t=464295&p=3106293
http://anemospring.blogspot.tw/2009/08/shell-terminator.html
第一次執行時會發現有些字重疊在一起了
要改字体來解決這個問題
在視窗內按右鍵-偏好設定裡把字型設為 ubuntu mono 就可以了
(如果還有問題再換其他字体看看)
以下是相關的快速鍵整理
Ctrl + Shift + t 開新 Tab
Ctrl-Shift-E: 新增terminal並垂直切割
Ctrl-Shift-O: 新增terminal並水平切割
Ctrl-Shift-P: 回到上一個terminal
Ctrl-Shift-N: 至下一個terminal
Ctrl-Shift-W: 關閉目前的terminal
Ctrl-Shift-Q: 結束terminator
F11: 全螢幕顯示
ctrl+tab為在分割畫面間切換
ctrl+shift+c 把圈選部份copy
ctrl+shift+v paste
ctrl+shift+上下左右鍵 調整分割畫面範圍
ctrl+shift+x 為將目前分割畫面放大
http://forum.ubuntu.com.cn/viewtopic.php?f=48&t=464295&p=3106293
http://anemospring.blogspot.tw/2009/08/shell-terminator.html
2015/02/12
接連碰到几台机器在設定完bios的定時開機後都無法正常開機
於是上網找了一下
linux本身就支援定時開機的功能了
設定上也不複雜
但就是每次開完機就要設定一次
不過也還好
放在/etc/rc.local就好了
有几個地方要注意
1. /etc/default/rcS
UTC=yes
2. 再來檢查二個地方
cat /sys/class/rtc/rtc0/wakealarm
cat /proc/driver/rtc
設定明天早上八點三十分自動開機(這個不需要推算utc時間)
設定後再次檢查看看上述的二個檔案是否正常
cat /sys/class/rtc/rtc0/wakealarm
要有值
cat /proc/driver/rtc
http://jamyy.us.to/blog/2012/12/4259.html
http://www.linux.com/learn/docs/672849-wake-up-linux-with-an-rtc-alarm-clock
http://guildwar23.blogspot.tw/2013/02/linux.html
於是上網找了一下
linux本身就支援定時開機的功能了
設定上也不複雜
但就是每次開完機就要設定一次
不過也還好
放在/etc/rc.local就好了
有几個地方要注意
1. /etc/default/rcS
UTC=yes
2. 再來檢查二個地方
cat /sys/class/rtc/rtc0/wakealarm
cat /proc/driver/rtc
設定明天早上八點三十分自動開機(這個不需要推算utc時間)
echo 0 > /sys/class/rtc/rtc0/wakealarmdate +%s --date 'tomorrow 8:30 am' > /sys/class/rtc/rtc0/wakealarm
設定後再次檢查看看上述的二個檔案是否正常
cat /sys/class/rtc/rtc0/wakealarm
要有值
cat /proc/driver/rtc
要看到
alarm_IRQ : yes
http://www.linux.com/learn/docs/672849-wake-up-linux-with-an-rtc-alarm-clock
http://guildwar23.blogspot.tw/2013/02/linux.html
2015/02/09
在cisco的設備設定完dhcp snooping及arp inspection後
如果要針對某些ip例外開放
必須使用arp access-list
arp access-list static-arp
permit ip host 1.1.1.1 mac host 0000.1234.5678
在把這個access-list 下到vlan上去
但在brocade fws624 上就不用這麼麻煩
只要在config裡下一行指令就解決了
arp 1.1.1.1 0000.1234.5678 inspect
接下來再port security這裡加上 maxmum
如果不加 預設每個port 只能出現一個mac
加上後才能允許多個mac出現(在下串小switch的情況下)
port security
enable
maximum 5
violation restrict
age 1
如果要針對某些ip例外開放
必須使用arp access-list
arp access-list static-arp
permit ip host 1.1.1.1 mac host 0000.1234.5678
在把這個access-list 下到vlan上去
但在brocade fws624 上就不用這麼麻煩
只要在config裡下一行指令就解決了
arp 1.1.1.1 0000.1234.5678 inspect
接下來再port security這裡加上 maxmum
如果不加 預設每個port 只能出現一個mac
加上後才能允許多個mac出現(在下串小switch的情況下)
port security
enable
maximum 5
violation restrict
age 1
2015/02/04
2015/01/09
近來linux把network的設定改用NetworkManager來操作
在x-win上有圖形介面的工具可以使用
而命令列的指令為nmcli
命令 作用
nmcli dev status 列出设备(状态)
nmcli con show 显示当前连接信息
nmcli con up "连接名" 启动一个连接
nmcli con down "连接名" 关闭一个连接;如果这个连接设置了autoconnect,那么关闭后这个连接会重启
nmcli dev dis 设备 关闭这个网卡设备,就算有autoconnect也不会重启
nmcli net off 关闭所有受NetworkManager管理的网卡
nmcli con add con-name ens6 type ethernet ifname ens6 增加一个连接
nmcli con mod "连接名" 修改一个连接
nmcli con del "连接名" 删除一个连接
http://feichashao.com/nmcli/
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Using_the_NetworkManager_Command_Line_Tool_nmcli.html
PS. 目前還是找不到這個指令更改的config file是在那裡
在x-win上有圖形介面的工具可以使用
而命令列的指令為nmcli
命令 作用
nmcli dev status 列出设备(状态)
nmcli con show 显示当前连接信息
nmcli con up "连接名" 启动一个连接
nmcli con down "连接名" 关闭一个连接;如果这个连接设置了autoconnect,那么关闭后这个连接会重启
nmcli dev dis 设备 关闭这个网卡设备,就算有autoconnect也不会重启
nmcli net off 关闭所有受NetworkManager管理的网卡
nmcli con add con-name ens6 type ethernet ifname ens6 增加一个连接
nmcli con mod "连接名" 修改一个连接
nmcli con del "连接名" 删除一个连接
http://feichashao.com/nmcli/
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Using_the_NetworkManager_Command_Line_Tool_nmcli.html
PS. 目前還是找不到這個指令更改的config file是在那裡
在asus vm40B 上裝好 xubuntu 14.04 x64 後一直出現以下的log
Jan 9 08:56:25 vod-VM40B kernel: [10567.759358] rtl8821ae-0:rtl_is_special_data():<10000-1> dhcp Rx !!
Jan 9 08:56:25 vod-VM40B kernel: [10567.860612] rtl8821ae-0:rtl_is_special_data():<10000-1> dhcp Rx !!
Jan 9 08:56:26 vod-VM40B kernel: [10568.475362] rtl8821ae-0:rtl_is_special_data():<10000-1> dhcp Rx !!
查了一下google看來是wireless driver的問題
Jan 9 08:56:25 vod-VM40B kernel: [10567.759358] rtl8821ae-0:rtl_is_special_data():<10000-1> dhcp Rx !!
Jan 9 08:56:25 vod-VM40B kernel: [10567.860612] rtl8821ae-0:rtl_is_special_data():<10000-1> dhcp Rx !!
Jan 9 08:56:26 vod-VM40B kernel: [10568.475362] rtl8821ae-0:rtl_is_special_data():<10000-1> dhcp Rx !!
查了一下google看來是wireless driver的問題
先把wireless關了
反正目前用不到
2015/01/07
訂閱:
文章 (Atom)