NCNU-OpenSource
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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
    • 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 Help
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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    --- tags: 1101, lsa --- - Book mode https://hackmd.io/@ncnu-opensource/book # Week 11(2021/12/02) [TOC] > 應該是下周或下下周期中考嘿 ## 鎖定使用者 ### 密碼欄位 - /etc/shadow :::info **salt** - Why do we need that? - 彩虹表的鍋 > 水很深,自己查[name=keke] - 在密碼加入salt(鹽巴)讓原本的密碼走位,這樣別人就猜不到你原先的密碼是甚麼 在密碼雜湊之前,先在密碼中特定位置塞入隨機字串再進行雜湊 :::warning - 原本密碼 qwe - salt (123) - qwe123 - q1w2e3 ::: ::: - ` ` - 沒有密碼 - `passwd` 可直接新增密碼 - `!` & `!!` - 此帳號密碼被鎖定 - 原本有密碼,但是被鎖住(lock) - `*` - 此帳號無預設密碼 :::info 小demo - `sudo adduser ttt` - 不打密碼 - `sudo adduser --disabled-password ttt1` - `sudo cat /etc/shadow` ::: :::danger **不能用密碼,不代表那個使用者不能使用** - `!` `*` 只是代表這個使用者可不可以透過 /etc/passwd 找到密碼 - ::: ### Demo :::success 首先先建一個新的使用者 - `sudo adduser test` - `cat /etc/passwd` - `sudo cat /etc/shadow` ::: - `sudo passwd -l <username>` 鎖住使用者密碼 - eg: `sudo passwd -l test` - in `test` - `sudo passwd -S <username>` 看使用者的狀態 - `L`: lock 代表密碼被鎖住 - 因為使用者的密碼被 lock 住了,所以你也無法使用該使用者的身分進行登入 - 被鎖住後,使用 passwd 更改密碼,就算輸入原先正確的密碼,也無法進行更改 - lock 後,還是能使用 ssh 連線 - `sudo passwd -u <username>` 解鎖使用者密碼 ### 讓user無法登入 - `cat /etc/passwd` - `sudo usermod -s /sbin/nologin <username>` 讓 `<username>` 無法登入 - `ssh <username>@<ip or domain>` 試登看看 - `sudo chage -l <username>` - 看帳號狀態 - `Account expires: never` - 設定"這個帳號"永遠不會過期 - 這是預設 - `sudo change -E 0 <username>` - 設成 0 讓他馬上過期 - never 代表不會過期 - `sudo su -test2` - 鎖定密碼可以用切換使用者、ssh連線過去,但帳號過期,ssh及切換使用者皆無法使用 ## TCP/IP ### 補充 - switch (交換器) - port 會記憶每台電腦的 MAC address - 可以**針對性**的傳送資料,不用 broadcast - hub (集線器) </br>![](https://i.imgur.com/cioa8Dk.png =150x) - 收到資料就**無差別地**從每個 port 送出去 - broadcast (廣播) - class A B C D E 網段分別的用途 - [IP位址 - wiki](https://zh.wikipedia.org/wiki/IP%E5%9C%B0%E5%9D%80) ![](https://i.imgur.com/dyNmSCw.png) - 特殊網段 - `192.168.0.0/16` 家庭、小型區網 - `10.0.0.0/8` 大型區網 - `xx.xx.xx.0` net ID - `xx.xx.xx.255` 一個網段在 broadcast - `xx.xx.xx.254` or `.1` gateway router ## Transport layer - 把訊息拆成好幾個封包,並確保封包有沒有傳到目的地 ### TCP - 三向交握 </br>![](https://i.imgur.com/AswYslp.png =300x) - 如果資料弄丟了,就全部重傳一次 - 建立連線 (下圖 Data 前半段) 1. <span class="client">蔣媽:</span> 我們建立連線八 (ノ>ω<)ノ (SYN) 2. <span class="server">秋分:</span> 好哇 (SYN+ACK) 3. <span class="client">蔣媽</span>建立連線 (ACK) > <span class="client">蔣媽:</span> client <span class="server">秋分:</span> server - 結束連線(傳完資料 Data 的後半段) <br/> 1. <span class="client">蔣媽:</span> 我想終止連線了 ╮(╯∀╰)╭(FIN) 2. <span class="server">秋分:</span> 好的,我確認一下(ACK) 3. <span class="server">秋分:</span> 我們沒有東西要傳了,我們終止連線ㄅ(FIN) 4. <span class="client">蔣媽:</span> 恩恩,結束連線(ACK) > <span class="client">蔣媽:</span> client <span class="server">秋分:</span> server - RST - reset - 異常連線的關閉連接 - 不必等 cache 資料傳完或ACK - 直接斷掉連線 - UDP - 不用握手 - 沒有錯誤修正功能,不在乎封包遺失 - 容易出錯,但速度快 - 比較 | | TCP | UDP | | -------- | -------- | -------- | | 可靠性 | 可靠 | 不可靠 | | 速度 | 慢 | 快 | | 傳輸方式 | 封包按順序傳輸 | 封包以串流方式傳輸 | | 錯誤檢查與修正 | 有 | 無 | | 壅塞控制 | 有 | 無 | | 適用服務 | 要求可靠傳輸的服務。e.g. SSH, 文字聊天, email, 檔案傳輸 | 即時服務,ex: 串流媒體、網路電話| ![](https://i.imgur.com/UgWLSxr.png) ## Application Layer - DNS - UDP - HTTP - TCP ## TCP/IP 架構 四層 ![](https://i.imgur.com/hBKRzna.png) - 左側:TCP/IP - 右側:封包型式 ![](https://i.imgur.com/K2tnsO8.png) - 封包傳送方式與過程 ## OSI 七層 - OSI 七層 :::info TCP/IP & OSI - TCP/IP - 最早發源於美國國防部的專案 - 1983年,在網際網路的前身 (ARPA網) 中通訊方式換成新的定義 - 做OS的人用的 - OSI - ISO(國際標準化組織)組織1985年 研究的模型 - 做 network device 的人用的 ::: || Layer | 設備種類 | 負責功能 |協定 | | -------- | -------- | -------- | -------- | -------- | | 7 | Application | WAF (Web application firewall) |定義介面給的應用程式 | HTTP FTP SMTP | | 6 | Presentation | WAF |轉網路的標準格式 加解密 加解壓縮檔 | SSH Telnet | | 5 | Session | WAF(與傳統firewall不同) |開啟和關閉兩個裝置之間的通訊 | - | | 4 | Transport | firewall |流量控制,錯誤控制,資料完整偵測 | TCP UDP | | 3 | Network | router |為資料尋找抵達目的地的最佳實體路徑 | IP ICMP | | 2 | Data-Link | switch |位於相同網路的兩個裝置之間的資料傳輸 | 有線 802.3 無線802.11| | 1 | Physical | hub repeater(擴大訊號的設備) |資料傳輸的實體設備 |- | > Data-Link: 看得懂 MAC address > > Network: router 看 ip address :::info **上星期netID 補充** - 網段的第一個(頭): netID - 網段的最後一個(尾): broadcastID - 用 OR 去算 1. 先把mask做not 2. destination 1. 再做 or 這樣就可以取得後面的ID了!!! ::: ## iptables - Linux的防火牆過濾軟體 - 依據header與定義的<span class="special">『規則』</span>來決定該封包**是否可以進入主機或者是被丟棄** - 根據封包的分析資料 <span class="special">**"比對"**</span> 你預先定義的規則內容 >若封包資料與規則內容相同則進行動作,否則就繼續下一條規則的比對 > </br>**from:**[ 鳥哥的 Linux 私房菜](http://linux.vbird.org/linux_server/0250simple_firewall.php#netfilter_chain) - 使用規則: - 由上往下瀏覽規則,經過之後就不會再重複看了 - 只要其中一條規則符合,就再見 ![](https://i.imgur.com/sNA3ivq.png) > Table: 綠色 :::info ### 架構: Tables表->Chains 鍊->Rules 規則 - iptables 有**多個表格 (table)**: - 表格定義出自己的預設政策與規則,且用途都不相同 - 表格(Table)內有多種鍊(Chain) >e.g: INPUT、OUTPUT - 鍊(Chain)有多種規則(Rule) >![](https://i.imgur.com/JzByPGR.png =70%x) ::: - firewall 會去過濾: protocal、port、IP、Mac、網卡 - 先安裝 `sudo apt install route` ![](https://i.imgur.com/K2tnsO8.png) - `sudo iptables -L` 可以看你所有的 iptable - `-L` 列出現有 iptables 的規則 ## Table: fillter(過濾器,過濾封包) ![](https://i.imgur.com/eO2eTOy.png =300x) | Chain | 時刻 | | -------- | -------- | |INPUT | 進入本機的封包 | |OUTPUT |本機要送出的封包 | | FORWARD | **轉遞封包**到其他地方 | - `ip a` 查詢網卡和 IP - `sudo tcpdump -i <網卡名稱>` 擷取網路封包 ### INPUT 阻擋外部連線進伺服器 - `sudo iptables -A INPUT -i <網卡名稱> -j DROP` - 從<網卡名稱>INPUT進來的封包,做DROP的動作 - 這時候再 ping 就會 ping 不到,packet loss - 沒有指定 `-t` 要用哪個 table 的話,預設就是用 filter 這個 - `-A` 新增一條規則 - `-i` input,從哪一張網卡進來 - `-j` 做什麼動作 - `sudo iptables -nvL --line-number` - `-v` 印出更多資訊 - `sudo iptables -D INPUT 1` - 1代表是第幾條規則 - `-D` 刪除該條規則 - `sudo iptables -A INPUT -i <網卡名稱> -j REJECT` - 被拒絕:Unreceivable - 此時 ping 會回傳 unreachable - `sudo iptables -A INPUT -s <IP> -j DROP` - `-s` 來源 IP - 擋掉來自某 IP 封包 > 丟掉來自某 IP 封包(?) - `sudo iptables -A INPUT -s <IP> -j REJECT` - 在自己電腦上下這個指令,雖然封包出的去,但它回復的封包就會被我 INPUT 擋住,最後一樣連線不通 - `sudo iptables -A INPUT -p tcp --dport 80 -j DROP ` - 擋掉 HTTP - `-p` 通訊協定 - `dport` 目的地 port - `sudo iptables -A INPUT -p icmp --icmp-type 8 -j DROP` - 擋掉(DROP) ping 8 ### OUTPUT 阻擋伺服器連線出去 - `sudo iptables -A OUTPUT -o <網卡> -j DROP` - 從 <網卡> 出去的都 DROP 掉 - `OUTPUT` 連線出去 - `-o` 從哪張網卡出去 - `sudo iptables -A OUTPUT -d <destination IP> -j DROP` - `-d` destination,要送到的目的地 IP - `sudo iptables -A INPUT -d <destination IP> -j DROP` - 擋掉別人進來找子網內的其他電腦(目的地 IP) - 比較不好的寫法 : 因為可能也會擋到其他真的要找這台電腦的封包 - `sudo iptables -A OUTPUT -p tcp --dport 80 -j REJECT` - 擋掉 http - `OUTPUT` 要過濾 output 的封包 - `sudo iptables -A INPUT -p tcp --dport 80 -j REJECT` - `-d` destination,要送到的目的地 IP - `port` 要擋掉的 port :::info 假設指令在 firewall 執行: `sudo iptables -A INPUT -d <destination IP> -j DROP` 那為何說沒有完全擋下來? - firewall $\xrightarrow{傳給}$ student - 對傳送者(firewall)來說有傳送出去,但是在收到對方(student)的 ACK 時,就會被 INPUT chain 擋掉 - 對接收者(對方)來說,我有成功接收到 firewall 的封包,也有成功傳送封包給 firewall ::: - `sudo iptables -A OUTPUT -p icmp --icmp-type 8 -j DROP` - 不能 ping 出去 ## Table: NAT(Network Address Translation ,位址轉換 ) :::info 因為 IPv4 的 IP 數量有限(2^32^),所以用 NAT 重新給封包一個 IP 當作內部的虛擬 IP (內網 IP),所有網卡在透過一個或是多個 public IP 連接到網路上 ::: | Chain | 時刻 | | -------- | -------- | |PREROUTING | **路由判斷之前**所要進行的規則(**DNAT/REDIRECT**) | |POSTROUTING |**路由判斷之後**所要進行的規則(**SNAT/MASQUERADE**) | | OUTPUT | 與發送出去的封包有關 | > <li>DNAT,Destination NAT:目的地址轉換</li> > <li>SNAT,Source: 源地址轉換</li> - [ipinfo.io](https://ipinfo.io/) - 虛擬IP網段: - 預留給內部的區網的網段 - 透過切開網路,網段之間不相連,達到安全性的目的 | 類別 |網段 | 使用對象 | | -------- | -------- | -------- | | A級 | 10.0.0.0 – 10.255.255.255 | 學校 | | B級 | 172.16.0.0 – 172.31.255.255 |一般公司使用 | | C級 | 192.168.0.0 – 192.168.255.255 | 一般的家用 router 使用 | - 封包有出有進 - NAT 就是 Gateway ### <span class="nat">NAT Translation Table</span></br> ![](https://i.imgur.com/moexktw.png =60%x) > 封包要連線到網路時,會去找公開 IP,有可能是多個或是一個(範例為一個公開 IP),虛擬 IP 連到公開 IP 的時候會去動態分配 public IP ![](https://i.imgur.com/IkTKj0U.png =70%x) :::info ## Router v.s. Gateway | 設備 | 功能 | | -------- | -------- | |Router | 不同網域的兩個 IP之間轉換 | | Gateway | <li>虛擬(內部) IP 要連上公開的網路,所以把虛擬 IP 轉換成 public IP</li><li>gateway 有做跨網段,在跨網段之前先把內部 IP 改成 public IP(也可以把 public IP 轉內部 IP)</li> <li>用 public IP 全世界就可以找到你</li> | ::: ![](https://i.imgur.com/urrAz9I.png =70%x) - 內網間的溝通用 router - 因為網段不同,所以用router進行溝通 1. 自己是 10.32.3.4,想要去 10.56.3.4,查了自己的 iptables 發現沒有一個規則是符合 10.56.3.4 的,代表說自己所在的這個網段問不到 10.56.3.4 的 MAC address 2. 把封包丟給 default route 的,先經過 router,router發現是不同的網段,不能直接轉送 3. router 查到它有在 10.56.3.x 這個網段,能知道 10.56.3.4 的 MAC 是多少 4. router 幫你把你傳來的封包的 destination MAC 改成真正能夠到達 10.56.3.4 的 ## iptables - FORWARD chain - 封包進來的時候,是否同意透過自己的 2 張網卡,用自己的名義幫別人轉送封包 - PREROUTING - 封包**進來**之前,將 public IP 轉換成內部IP - POSTROUTING - 在封包**出去**之前,先將封包的內部 IP 轉換成自己的 public IP ![](https://i.imgur.com/fTBvz3C.png) ## Demo - 前提 ![](https://i.imgur.com/oHd14JL.png) - student 送不出去封包到外網 - student 網卡: 1. 僅限主機介面卡(lan) - firewall 可以送出封包到外網 - firewall 網卡: <ol> <li>橋接介面卡(Wan)</li> <li>僅限主機介面卡(lan)</li> </ol> #### 目標: student 透過 firewall 送封包出去 ![](https://i.imgur.com/NzpezAX.png) ### firewall #### 需要: - WAN 連到外網 - LAN 連到內網 - `sudo iptables -A FORWARD -i {lan} -o {wan} -j ACCEPT` - 同意來自內網的封包要轉送到外網 - `{lan}`: 內網的網卡 ex: enp0s6 - `{wan}`: 外網的網卡 ex: enp0s5 - ![](https://i.imgur.com/QPzA75q.png) > enp0s3: public IP,外網的網卡<br/> > enp0s8: 虛擬 IP﹑內網的網卡<br/> > 當網卡 enp0s8 要連到外面的時候,就需要把虛擬 IP 換成 public IP,也就是要把 192.168.56.108 :arrow_right: 192.168.236.156,才可以順利讓外網的人知道我的 IP :::info 如何看網卡是外網還是內網? - 先去 virtual box 該虛擬機的設定檔看 - 橋接介面卡 => 外網 - 主機介面卡 => 內網 - 用順序判斷(第一張是橋接介面卡的話就是外網) :: - `sudo iptables -A FORWARD \-m conntrack --ctstate "ESTABLISHED,RELATED" \-j ACCEPT` - 因為之前同意過了,==**繼續同意(有建立連線的),所以之後都會讓封包進入**== - `-m` module 引入別人寫的模組 - `RELATED`: 有相關連線的時候 - `sudo iptables -t nat -A POSTROUTING -o {wan} -j MASQUERADE` - 內網出來的封包經過防火牆要出去時需要將內網IP轉換為外網 - **開啟 kernel 轉送的功能** - 編輯 sysctl.conf ```terminal= sudo vim /etc/sysctl.conf ``` ![](https://i.imgur.com/FPUFUIH.png) * 1: 啟動 * 0: 不啟動 > <span style ="color: #994433">**注意:要把#拿掉!!!**</span> ### student - `sudo route add default gw {firewall IP}` - **firewall ip : firewall 那台的內網 ip** - 設定 default gateway 是哪個IP - 當 router 找不到要連線的IP - 就去 default gateway(firewall IP) 讓他去 WAN - 輸入 route 檢查是否有設置gateway成功 ### 最後TEST:ping - 檢查是否成功讓student 透過 firewall 送封包出去 - ping `<ip address>` ![](https://i.imgur.com/s1wLsOD.png) <style> .special { background-color: #CD5C5C; color: white; font-size:15px; font-weight: bolder; border-radius: 50% 20% / 10% 40%; } .nat { background-color: #7BB372; color: white; font-size:30px; font-weight: bolder; border-radius: 20px; padding : 10px; } .client { background-color: #8EC4F5; color: balck; font-size:15px; font-weight: bolder; border-radius: 20px; padding:2px; } .server { background-color: #FFF998; color: #574D34; font-size:15px; font-weight: bolder; border-radius: 20px; padding:2px; } </style>

    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