2022年2月17日 星期四

【IT Notes】將AD群組導入Paloalto防火牆

這個筆記其實去年就該做了,一直偷懶到現在,Paloalto防火牆的控制介面不是很好懂,在使用之前我也搞了很久才勉強理解了一些,而之前的防火牆政策所套用的對象都是any,也就是說沒有按照任何使用者或群組去分類,這樣的作法不是很妥當,所以決定導入AD群組,針對不同群組去套用不同防火牆政策。

2022年2月15日 星期二

【IT Notes】使用telnet測試收發email

一·測試SMTP發信

  1. 開啟終端機
  2. 輸入指令:
    telnet example.com 25
  3. 輸入 ehlo指令,後面接郵件伺服器名稱 example.com 
    ehlo example.com
  4. 輸入寄件者 mail from: username@example.com
    mail from: username@example.com
  5. 輸入收件者 rcpt to: friend@hotmail.com, friend2@yahoo.com
    rcpt to: friend@hotmail.com, friend2@yahoo.com
  6. 輸入指令 data,然後輸入subject:郵件標題、下面郵件內容,最後用.
    data
    Subject: My Telnet Test Email
    
    Hello,
    
    This is an email sent by using the telnet command.
    
    Your friend,
    Me
    
    .
    
  7. 按下quit 關閉對話


二·測試POP收信

  1. 開啟終端機
  2. 輸入指令:
    telnet example.com 110
  3. 輸入指令 user 和收件者信箱 (username@example.com) 
    user username@example.com
  4. 輸入指令 pass 和信箱密碼
    pass *IK<.lo9
  5. 輸入指令 list 列出所有郵件序列:
    list
  6. 會看到郵件序列秀出編號跟信件的容量大小
    list
    +OK POP3 clients that break here, they violate STD53.
    1 897
    2 5136
    3 1884
    4 2973
    5 2595
    6 3063
    7 3509
    8 2283
    9 1926
    10 2763
    11 1795
    12 2780
    13 2342
    14 2342
    15 2342
    16 3833
    17 2211
    18 793
    19 797
    20 2599
    .
  7. 如果要檢視郵件內容,例如第二封信件 (2 5136),輸入 retr 2
    retr 2 
  8. 如果要刪除第一封信件,例如1 897,輸入 dele 1:
    dele 1
  9. 按下quit 關閉對話

【IT Notes】透過api移轉Gmail到Exchange

 在雲端裡面串接api不是一件很好學的技術,第一次有機會學習到將GWS的Gmail信件全部轉移到M365的Exchange,其實方法很多種,像以前用的pst檔匯出轉移的方式等,但透過api串接,可以批次和排程轉移,是非常方便且準確的作法。唯一讓人感到困難的是學習成本不小,通常需要...