标签为“Linux”的页面如下
libvirt无法与主机通信解决回顾
先放结论
If firewalld is active on the host, libvirt will attempt to place the bridge interface of a libvirt virtual network into the firewalld zone named **“libvirt” ** (thus making all guest->host traffic on that network subject to the rules of the “libvirt” zone).
我需要在firewalld (I am using a Fedora host)的libvirt区域中添加对应的放行规则:
Radicale with Caddy v2
In this article (in Chinese), I discussed installing and using Radicale in termux. However, in most sceneries we are more likely to put radicale behind a web proxy. In this article I take notes on how did I make radicale work with Caddy v2.
If you search “radicale with caddy”, you are more likely to find information about using radicale with Caddy v1. By explicitly searching “radicale with caddy v2” you can fetch meaningful answers as in this post. Though I didn’t find the very post before I worked out the solution myself. T_T
Learn from Linux from Scratch (LFS) (Part 2)
在Part 1中,涉及的知识点主要集中在宿主机上准备构建环境。本篇将记录对应于书中第5章”Constructing a Temporary System”一章的从“Introduction”到“GCC-9.2.0 – Pass 2”有关内容。
Learn from Linux from Scratch (LFS) (Part 1)
Learn from Linux from Scratch (LFS)这个系列的文章是我在阅读Linux from Scratch 9.1过程中的笔记。我用的宿主系统为CentOS 8(运行于VituralBox虚拟机中,VirtualBox虚拟机的Host是Windows 10)。
SELinux学习笔记
前排提示(2022-08-18):这 post 一直躺在我的草稿箱里面,没有写完,但不发出来又觉得难过
基于规则的安全模型
具体地说,在CentOS和Fedora的默认配置中,SELinux使用的targeted策略只覆盖了有限的(系统)应用程序。用户,特别是在/usr/local和/home目录运行的东西不受targeted约束。设计这样的默认配置显然是为了在易用性和安全性之间取得某种平衡。
使用Radicale建立你的私有日历和联系人同步服务器
换手机了,发现新手机完全不能兼容google play,看log是少一个权限无法申请。不知道是不是google单方面ban了华为,或者华为单方面ban了google。不管怎么样我想要同步我的google账号上的日历和联系人是不可能了。
就在我导出google日历和联系人的时候,我又开始在想那个问题了:数据不在自己的手上,有一天可能就找不回来了。能不能自己搭建一个私有云呢?说到私有云我立刻想到了Nextcloud,但是看到Nextcloud的各种php、数据库还有http服务器依赖之后我觉得太麻烦了——我的需求是日历同步,Nextcloud一套上来过于复杂了,而且不够轻量。
于是我找到了Radicale这个开始于学校作业的项目。这个项目基本上可以在任何能运行Python的地方运行。它支持的CalDAV协议。这种协议的客户端的话,PC上的邮件和日历app基本都支持这个协议,我用的是thunderbird。手机上的话,貌似华为不能直接支持这种协议,得装个DAVx5。
GNU nano basics| nano编辑器的使用提示
命令行选项
-m 此选项可激活鼠标,按住shift建即可选择文本。对应nanorc的set mouse
-l 显示行号。对应nanorc的set linenumbers
-E或--tabstospaces 把已有文件中的tab转换为空格。对应nanorc的set tabstospaces
-i或--autoindent 启动自动缩进。对应nanorc的set autoindent
-A或--smarthome启动智能home键。对应nanorc的set smarthome
-$或--softwrap 开启自动折行。对应nanorc的set softwrap
Linux主机获取校园网的ipv6地址……
这个是迷一样——我在Windows 10上,我的Android手机上,都能获取到global IPv6地址,可是一到我的Fedora Linux就只能获取到fe开头的非global地址……
Port forwarding (or proxying) on OpenWRT with socat
在校园网环境中可能会有这种需求:我可以获取到公网IPv6而不能获取到公网IPv4,但是我的应用程序只支持IPv4(比如某些游戏),能否把到达我的公网IPv6的数据转发到内网IPv4(forward IPv6 to IPv4)?
用Lighttpd转发V2Ray的WebSocket连接
在开始阅读之前,你可能会对“用Nginx转发V2Ray的WebSocket连接”感兴趣,所以我先把这个链接附在这里:
https://oing9179.github.io/blog/2017/03/v2ray-as-WebSocket-Proxy-behind-Nginx/
老版极路由1s(HC 5661)刷入OpenWRT记录
(UPDATE Mar-17, 2017) 本文的内容适用于OpenWrt DD分支。但对于最近版本的LEDE(LEDE Reboot 17.01.4)事实上也基本适用。
先贴介绍链接
OpenWRT/LEDE
(旧的)OpenWRT DD
关于创建U盘启动盘的一点思考 | Some considerations when creating bootable flash disks
分区表
U盘在出厂时多半会使用MS-DOS格式的分区表,而不是现代硬盘中常见的GPT。我猜可能是因为需要考虑到兼容性?
分区和文件系统
如果你只用Linux,那么你尽管分区,理论上现代的Linux发行版都能将你U盘上的分区识别出来,无论是通过图形用户界面的自动识别还是通过lsblk然后用mount命令挂载。
但是,如果你还用Windows,并且你希望你创建的可启动U盘同时也能正常地当作一个大容量存储器,分区的时候最好注意以下几点:
- 分区表采用MS-DOS格式;
- 作为普通U盘那样存储数据部分的分区,必须是第一个分区,而且必须是主分区;
- 作为数据存储的这个分区应该使用Windows原生支持的文件系统,而且最好是U盘出厂时使用的文件系统(对于32G以内的U盘,一般来说是FAT32);
- 作为可引导的分区,也就是存放U盘操作系统的分区,应该被设为可启动分区。
ssh connect through sock5 proxy
This post provides a straightforward method to connect your ssh client through a local socks5 proxy.
It’s quite simple, if you have a socks5 server listening on your local port, say, 8888:
ssh -l login -p ssh_server_port -o ProxyCommand='nc --proxy-type socks5 --proxy 127.0.0.1:8888 %h %p' ssh_server_host_name
If you are not using nmap’s netcat utility, you may try:
ssh -l login -p ssh_server_port -o ProxyCommand='nc -X 5 -x 127.0.0.1:8888 %h %p' ssh_server_host_name
极路由 极1s(老版) HC5661 刷入OpenWRT Barrier Breaker 14.07 手记
本文提到的github仓库看起来很久没更新了,许多问题也没有修复,因此**不建议**刷入那个仓库的固件。关于刷入最新版OpenWRT的问题可以看我的这篇文章。