王威 oliwave
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    1. # LSA 期中考試 - Book mode https://hackmd.io/@ncnu-opensource/By4H6JLNW ## 手寫 ### A - 基本 1. 請問 BT 的 Telegram ID (BlueT_Lien) 跟中文名字(練喆明)是什麼? 2. 請問三名助教的中文名字是什麼? 3. NCNU opensource Facebook 的網址是什麼?https://www.facebook.com/groups/NCNU.OpenSource/ 4. 請寫出三個你用過的指令跟它的功能? ### B - VM 1. 請問`NAT 網路`, `僅限主機介面卡`, `橋接介面卡` 有何不同? 2. 為何我們一開始用 `NAT 網路` 後來又改成`僅限主機介面卡`? 3. 請問`.iso` 和 `.vdi` 有什麼樣的差別? ### C - 網路 1. 請問課堂上 VM 中拿不到正確 IP address 或是沒 IP address 有可能是哪個(些)部份出了問題?要怎麼解決? 2. 請問如何查看 domain name (並非本機自己設定的)對應的 IP address 位置?請寫出至少兩種或以上方法。(例:google.com) 3. 課堂上提過的 8.8.8.8 與 1.1.1.1 這兩台主機是什麼主機?如何在系統中使用他們? 4. 請判斷以下的 IP address 網段是否相同(要附上過程) - 10.3.127.128/16 與 10.5.1.1/16 - 192.168.129.218/25 與 192.168.123.1/25 ### D - iptables ![](https://i.imgur.com/9Sdd2Qp.png) (全部 chain 的 policy 請設定為 **DROP**) 1. NAT 區域 a. 可以連線至 BBI b. 不能被 BBI 連線 2. DMZ 區域 a. 不能連線至 BBI **(ssh s3 例外)** b. 可以被 BBI 連線 3. ssh s3(s3 只是一台區域內的主機) a. 可以連線至 NAT 區域 b. 可以被 BBI 連線 ## 實作 (做完舉手請助教看 demo) 1. 請創建一個檔案 private_file,權限改成擁有者可讀可寫可執行,同群組可讀不可寫不可執行,其他人不可讀不可寫不可執行。 2. Linux 中有一個好用的東西叫 crontab,搭配 rsync 使用會是一套很方便的備份流程。請利用 man 或是網路上的資源,查詢 crontab 的設定方式,與 rsync 搭配在每天半夜 3 點鐘,自動將本機 /etc 備份至遠端主機(自行命名)。(切記!請使用差異備份) 3. 有個網域 55669478.gy 的 IP 應為 220.133.158.125,請用課堂教過的方法,以其網域名稱和其 IP 分別測試主機是否在線上。請說明結果與可能的原因。 4. 請在本機架設一個系統,架構為本機架設前端 Nginx 做 reverse-proxy 把使用者請求轉送給 VM 上的後端 Lighttpd 伺服器。Lighttpd 的 index filename 設定為 yi-bra-o.html 內容為包含 “LSA-I 108”的任意資訊。 - 完成之後使用本機的純文字瀏覽器輸入 http://my-lighttpd/ 時會連到本機 nginx 並被 proxy 得到虛擬機裡面 lighttpd 的頁面。 - 顯示的是自訂的預設頁面內容(yi-bra-o.html 的內容)。 - 請設定 Nginx 讓後端伺服器能取得 Client 的正確 IP address。 - 請由 Client 發出一個 HTTP Request,讓 Lighttpd 誤判 Client IP 為偽造的來源。你可以使用瀏覽器 or wget or curl or 任何工具。 ## 挑戰題 ### 挑戰(一) 網管人員吉吉想要讓每個使用者都能夠擁有個人網頁,但在 `/var/www/html` 目錄底下大多是其公司重要網頁,不敢恣意開權限給大家編輯。而吉吉聽說大多網管人員的做法是使用 Apache 的 UserDir 功能,你可以幫助吉吉設定好嗎?下面連結為範例網站 https://www.csie.ntu.edu.tw/~hungsh/ 但是後來,吉吉又發現 Apache 效能不好想換成 Nginx,你可以再次幫助吉吉使用 Nginx 設定 UserDir 嗎? ### 挑戰(二) 吉吉最近在機器上想瀏覽 google 網頁,卻發現機器好像中毒了,總是跳出奇怪的頁面,請嘗試找出原因,不需修復。 ``` 遠端機器的 IP:54.81.189.210 使用者名稱:student 密碼:LSA ``` ### 挑戰(三) 同樣都是遠端連到一台機器上,為什麼 ssh 可以連線但是 sftp 卻不行呢? ``` 遠端機器的 IP:52.68.8.53 使用者名稱:student 密碼:LSA ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully