B站的瓦砾村夫这个频道,搜集了很多与埃隆*马斯克有关的演讲、访谈,比在油管上观看还要方便。
比如最近在all in 论坛上,他也发表了对中美关系的看法,他认为中美关系的核心就是台湾问题,他也认为冲突可能会升级,在台海问题上摊牌,这也是越来多高科技产品被禁运的原因。
他还认为digital superintelligence是最重要的话题,比核武器还要重要。
B站的瓦砾村夫这个频道,搜集了很多与埃隆*马斯克有关的演讲、访谈,比在油管上观看还要方便。
比如最近在all in 论坛上,他也发表了对中美关系的看法,他认为中美关系的核心就是台湾问题,他也认为冲突可能会升级,在台海问题上摊牌,这也是越来多高科技产品被禁运的原因。
他还认为digital superintelligence是最重要的话题,比核武器还要重要。
下面的文章,解决了多年的一个疑惑,端口号的命名,真的有规律吗?
Most applications communicate over a TCP or UDP port. Ports 0-1023 are usually privileged and require administrator or superuser access to bind a network socket to an IP with the corresponding port. But anything over 1024 is up for grabs. IANA (Internet Assigned Numbers Authority) can “reserve” ports for specific applications — but this is only a formality; users and applications are free to use whatever port they wish.
So a look at some port numbers (1024+) and how they are used as default ports today, in 2023. There are many lists out there, but this aims to capture a list of protocols actually used in production (and leaves off many one-off ports used for specific games).
Some interesting patterns observed:
Odd-numbered and easy-to-remember ports are usually used for development servers. 3000, 5000, and 9000 are common in all-in-one web frameworks. Applications that have a related privileged application port (e.g., SMTP, DNS) sometimes use a repeated string (e.g., 5353 for Multicast DNS, 3535 for SMTP, or 8080 for a web server). Other than that, it seems like the strategy is to pick a number with low entropy (e.g., Jupyter on 8888) or a completely random one unlikely to cause conflicts (e.g., 25565 for Minecraft).
Odd-numbered and easy-to-remember ports are usually used for development servers. 3000, 5000, and 9000 are common in all-in-one web frameworks. Applications that have a related privileged application port (e.g., SMTP, DNS) sometimes use a repeated string (e.g., 5353 for Multicast DNS, 3535 for SMTP, or 8080 for a web server). Other than that, it seems like the strategy is to pick a number with low entropy (e.g., Jupyter on 8888) or a completely random one unlikely to cause conflicts (e.g., 25565 for Minecraft).
1080 — SOCK Proxy
2049 — Network File System (NFS)
2181 — Apache ZooKeeper
2375 — Docker REST API (HTTP)
2376 — Docker REST API (HTTPS)
3000 — “The Development Framework Port.” Ruby on Rails uses port 3000 as the default development port for its web server. Node frameworks use this port (e.g., Express.js, Meteor, Create React App, NextJS, SvelteJS, Astro, Remix).
3306 — MySQL
3478 — STUN, TURN (NAT Traversal)
4000 — Phoenix, Jekyll
4001 — etcd
4200 — AngularJS
4567 — Sinatra
5000 — “The Other Development Framework Port.” Flask (Python) uses 5000 as the default development port. As does ASP.NET Core.
5222 — XMPP (Extensible Messaging and Presence Protocol)
5349 — STUN, TURN over TLS
5353 — Multicast DNS — Follows the same pattern as SMTP, occasionally being run on port 3535. Duplicates the privileged port (DNS uses 53).
5432 — PostgreSQL
5900 — VNC (using a remote frame buffer, RFB)
6000 — X11 (over the network). Common to take the display number and add it to 6000 (e.g., DISPLAY 6 would be served over 6006).
6379 — Redis
6660 — IRC (Internet Relay Chat)
6881 — BitTorrent
8000 — “Python Development Framework Port.” Includes Django and Python 3’s http.server.
8080 — “The HTTP web server port.” Like 5353 (Multicast DNS) and 3535 (SMTP), an unprivileged port to run an HTTP webserver.
8333 — Bitcoin
8888 — Jupyter Notebook,
8983 — Apache Solr
9000 — Used by various applications, but no central theme or extremely well-known application.
25565 — Minecraft
27017 — MongoDB
51820 — WireGuard
"10.0.0.0/26" 是使用CIDR(无类别域间路由/Classless Inter-Domain Routing)表示法来表示一个IP地址范围的方式。在CIDR表示法中,IP地址范围由一个IP地址后跟一个正斜杠和一个数字组成,该数字指定了网络前缀中的位数。下面解释一下 "10.0.0.0/26" 的含义:
IP地址:"10.0.0.0" 是该范围的基本IP地址。它是地址范围的起点。
/26:"/26" 表示子网掩码或网络前缀中的位数。在这种情况下,它表示IP地址中左边的26位用于表示网络,而剩下的6位用于表示网络内的各个主机地址。
现在,让我们更详细地解释 "10.0.0.0/26":
网络地址:"10.0.0.0" 是网络地址,表示整个网络或子网。
可用IP地址:在/26子网中,有2^6 = 64个可能的IP地址。然而,通常情况下,范围中的第一个和最后一个地址被保留用于网络标识和广播,因此在网络内有62个可用的IP地址供主机使用。
可用IP地址范围:"10.0.0.1" 到 "10.0.0.62"
子网掩码:与"/26"相关联的子网掩码以标准点分十进制格式表示为 "255.255.255.192"。以二进制表示,它是 "11111111.11111111.11111111.11000000",其中前26位被设置为 "1" 以表示网络部分,后6位被设置为 "0" 以表示主机地址。
总之,"10.0.0.0/26" 定义了一个具有64个IP地址的子网范围,从 "10.0.0.1" 到 "10.0.0.62"。这通常用于为网络段内的设备或主机分配IP地址,同时保留了网络和广播地址。
子网掩码、网络地址范围和CIDR(Classless Inter-Domain Routing)之间有密切的关系,它们都用于定义和描述计算机网络中的子网和网络分割。
子网掩码(Subnet Mask):
255.255.255.0
表示前24位用于网络地址,后8位用于主机地址。网络地址范围:
255.255.255.0
,网络地址范围可以是 192.168.1.0
到 192.168.1.255
。同样的,网络地址范围也可以是’172.1.1.0′ ‘172.1.1.255’CIDR(Classless Inter-Domain Routing):
192.168.1.0/24
表示网络前缀长度为24位,即前24位用于网络地址,后8位用于主机地址(32-24=8,2^8=256)。关系:
当使用CIDR(Classless Inter-Domain Routing)表示法时,IP地址和子网掩码结合在一起,以一种更精确和紧凑的方式来表示网络的子网划分。让我详细解释为什么子网掩码 255.255.240.0
可以用CIDR表示法表示为 172.19.224.0/20
:
子网掩码 255.255.240.0
的二进制表示:
255.255.240.0
在二进制中是 11111111.11111111.11110000.00000000
。IP地址 172.19.224.0
的二进制表示:
172.19.224.0
在二进制中是 10101100.00010011.11100000.00000000
。CIDR表示法的网络前缀长度:
CIDR表示法的格式:
IP地址/网络前缀长度
。CIDR表示法的组合:
172.19.224.0
与网络前缀长度 20
组合在一起,即 172.19.224.0/20
。综上所述,CIDR表示法 172.19.224.0/20
表示网络地址 172.19.224.0
和子网掩码 255.255.240.0
结合在一起,指定了网络地址的前20位是网络位,后12位是主机位。这使得CIDR表示法成为一种更灵活、紧凑和精确的方式,用于描述网络的子网划分,而无需使用特定的子网掩码。
k8s配合容器化技术,高度抽象了底层硬件,因此有时候我们想了解master node的具体位置,还有点困难。
第一步,先找到master nodes的名字
[root@172-20-26-79 ~]# kubectl get nodes | grep master
ks-control-1 Ready control-plane,master 5d23h v1.21.11
ks-control-2 Ready control-plane,master 5d23h v1.21.11
ks-control-3 Ready control-plane,master 5d23h v1.21.11
第二步,使用describe来获取内部ip的地址,从而判断是否在一台主机上(综合server的组网情况)
[root@172-20-26-79 ~]# kubectl describe nodes ks-control-3 | grep InternalIP
InternalIP: 172.20.26.28
[root@172-20-26-79 ~]# kubectl describe nodes ks-control-2 | grep InternalIP
InternalIP: 172.20.26.89
[root@172-20-26-79 ~]# kubectl describe nodes ks-control-1 | grep InternalIP
InternalIP: 172.20.26.86
曾子说:吾日三省吾身,为人谋而不忠乎?与朋友交而不信乎?传而不习乎?
从今天,我也准备养成:三洗吾身的习惯
一洗:早晨完成100个俯卧撑后
二洗:午饭后最困倦时,大概2点左右
三洗:下班到家后
三洗都采用海军陆战队洗澡法,时常控制在端到端10分钟内,冷水。
公司的IDC,需要通过堡垒机登录,有两种方式
失败信息
on my mac :# ssh username@jump.server.com
Unable to negotiate with X.X.X.X port 22: no matching host key type found. Their offer: ssh-rsa
chat gpt给出的建议
It appears that you’re trying to SSH from your Mac to the server at jump.server.com, and you’re encountering the "no matching host key type found" error with an offer of "ssh-rsa." This error typically occurs when the SSH client and server cannot agree on a suitable host key algorithm.
To resolve this issue, you can use the -o option to specify the host key algorithm explicitly in your SSH command. For example, you can use the -o option to force the use of the "ssh-rsa" host key algorithm like this:
ssh -o HostKeyAlgorithms=+ssh-rsa username@jump.server.com
This command tells the SSH client to use the "ssh-rsa" host key algorithm when connecting to the server.
However, it’s worth noting that "ssh-rsa" is considered less secure than modern alternatives like "ssh-ed25519" or "ecdsa-sha2-nistp256." If possible, you should encourage the server administrator to update the SSH server’s host key algorithm configuration to use a more secure option.
Additionally, ensure that your SSH client is up to date, as older versions may not support some of the newer host key algorithms.
地铁里,我的左前方,一个忧郁的胖子。
黑体恤、黑运动裤、黑球鞋,黑边眼镜和凌乱的胡渣。
他嘴角下撇,一股绝望包裹着他,生无可恋。
Ensure you have your OpenVPN client profile files (e.g., .oxxxx files) ready on your server,在同一目录下,新建一个Dockerfile,同时把*.oxxxx 拷贝到这个目录下。
vi Dockerfile
文件内容如下
# Use an official Nginx runtime as a parent image
FROM nginx:alpine
# Copy your client profile files to the container
COPY *.oxxx /usr/share/nginx/html/
# Expose port 80
EXPOSE 80
In the directory containing your Dockerfile, build the Docker image using the docker build
command:
docker build -t openxxxx-web-server .
Start a Docker container based on the image you just built:
docker run -d -p 80:80 --name openxxx-web-server openxxx-web-server
Your Openxxx client profile files should now be accessible via HTTP on your server’s IP address or domain name. You can access them using a URL like this:
http://your-server-ip-or-domain/client-profile.oxxx