# 第三章 internet
---
課程連結
board.idunit.online
----
## 開始之前先說好
before we start
----
- workshop 需要的工具
- 筆電
----
- workshop 會用到的線上工具
[hackmd](board.idunit.online)
discord https://discord.gg/UdtEyq
slido https://app.sli.do/event/pr46kr0u
----
- 現場資源
- wifi
- 電源
----
- 如果太累
可以睡覺,但請不要打乎吵到其他人。
----
- 如果覺得講太快
請告訴我
----
- 由於我們時間有限,我們無法涵蓋所有內容
----
- 而是挑選幾個代表性的工具跟用法
----
- 如果覺得內容有誤
- 或覺得講得可以更好
歡迎來意見回饋 bootcamp 工作人員
----
- 或你有更多想說
- 歡迎報名成為講師
----
- Greeting I am jeffery
- icafe
- self-study to open source in security
- teapook
- London linux scholarship
- consult
----
- shell basic last time
----
### .net + powershell + chocolatey
----
- 接下來是
- OSI layer 1-4 TCP/IP
- OSI layer 5-7 http
- frontend domain
- ssh forwarding
----
- 再來就是
- git workshop 9/5
---
web frontend backend
need to know
----
internet basic structure
OSI
https://zh.wikipedia.org/zh-tw/OSI%E6%A8%A1%E5%9E%8B

----
[IETF](https://zh.wikipedia.org/wiki/%E4%BA%92%E8%81%94%E7%BD%91%E5%B7%A5%E7%A8%8B%E4%BB%BB%E5%8A%A1%E7%BB%84) 眾人合力的 [RFC(Request for Comments)](https://zh.wikipedia.org/zh-tw/RFC)
網路是眾人合力的成果
----
layer 1 the hardware
Broadcom cisco 通訊晶片廠
aruba asus 路由器廠
----
layer 2
節點資料有沒有接起來
https://en.wikipedia.org/wiki/Data_link_layer
```
ppp pppoe
arp -a
```
----
mac
https://en.wikipedia.org/wiki/Medium_access_control
----
layer 3
ICMP (Internet Control Message Protocol)
----
IP (Internet Protocal)
https://en.wikipedia.org/wiki/Network_layer
----
reserved privated ip
https://m.gamer.com.tw/home/creationDetail.php?sn=402247
----
```
ping
traceroute
```
----
layer 4
TCP UDP
https://en.wikipedia.org/wiki/Transport_layer

----
TCP handshake

----
port
https://en.wikipedia.org/wiki/Port_(computer_networking)
----
65535?
----
0-65535
65535 + 1 =65536
2 ** 16
----
nmap
---
layer 5 - layer 7
----
[What happens when...](https://github.com/alex/what-happens-when)
----
request and response

----
more user?

----
[HTTP: The Protocol Every Web Developer Must Know ](https://code.tutsplus.com/tutorials/http-the-protocol-every-web-developer-must-know-part-1--net-31177)
----
URL

[API(Application Programming Interface)](https://zh.wikipedia.org/zh-hant/%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%8E%A5%E5%8F%A3)
----
http get
https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Methods
----
http status code
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
----
restful api
1.Nouns 名詞:定義資源位置的 URL,每個資源在網路上都會有唯一的位置,就如每戶人家都有唯一的地址一樣。
2.Verbs 動詞:對資源要做的動作。
3.Content Types 資源呈現方式:API 資源可以以多種方式表現,最常用的是 JSON,較輕,也較好處理。
----
```
curl
```
----
https://httpbin.org/
https://http.cat/
---
html css javascript
----
```
wget
```
----
wget 整包帶回家
https://www.moreofless.co.uk/download-website-wget-entire-html-css-js/
----
crawler 爬蟲
你以為你是資料工程師,有時候你其實是爬蟲工程師
----
http header
----
js
py
----
cookie and session
----
more reference
----

----
鳥哥 伺服器篇
---
domain
[how dns works](https://howdns.works/)
----
```
whois
dig url
nslookup
```
----
TWNIC APNIC
----
SEO
----
google hacking
----
shodan
---
ssh
----
remote login
----
to your own machine
----
play with others'?
https://null-byte.wonderhowto.com/how-to/haunt-computer-with-ssh-0199625/
----
vm
----
even mobile
----
port forwarding
----
NAT
ifconfig iptable, router command
----
tunneling
https://newtoypia.blogspot.com/2020/05/ssh-tunnel.html
----
vpn proxy
----
protect yourself from shodan
https://null-byte.wonderhowto.com/how-to/set-up-ssh-server-with-tor-hide-from-shodan-hackers-0194455/
----
key-gen
https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh
----
for cert
{"metaMigratedAt":"2023-06-15T12:09:38.215Z","metaMigratedFrom":"Content","title":"第三章 internet","breaks":true,"contributors":"[{\"id\":\"e597b683-1086-4827-a909-b042866d09c2\",\"add\":4861,\"del\":507}]"}