浏览代码

Merge branch 'master' of github.com:HON95/wiki

Håvard O. Nordstrand 5 年之前
父节点
当前提交
90cf28a762
共有 3 个文件被更改,包括 7 次插入5 次删除
  1. 5 4
      config/linux-general/applications.md
  2. 1 1
      config/linux-general/examples.md
  3. 1 0
      config/linux-server/applications.md

+ 5 - 4
config/linux-general/applications.md

@@ -17,10 +17,11 @@ breadcrumbs:
     - In `/etc/default/grub`, add `cgroup_enable=memory swapaccount=1` to `GRUB_CMDLINE_LINUX`.
     - Run `update-grub` and reboot.
 1. Configure `/etc/docker/daemon.json`:
+    - Enable IPv6: `"ipv6": true` and `"fixed-cidr-v6": "<ipv6-subnet>/64"`
+        - Note that IPv6 it not NATed like IPv4 is in Docker.
     - Set DNS servers: `"dns": ["1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001"]`
+        - If not set, containers will use `8.8.8.8` and `8.8.4.4` by default.
     - (Optional) Disable automatic IPTables rules: `"iptables": false`
-    - Enable IPv6: `"ipv6": true`
-    - Set IPv6 default subnet: `"fixed-cidr-v6": <64-prefix>`
 1. (Optional, not recommended on servers) Allow certain users to use Docker: Add them to the `docker` group.
 
 ### Usage
@@ -41,8 +42,8 @@ breadcrumbs:
     - Publish network port: `-p <host-port>:<cont-port>[/udp]`
     - Mount volume: `-v <vol>:<cont-path>` (`<vol>` must have a path prefix like `./` or `/` if it is a directory and not a named volume)
 - Networks:
-    - Create bridged network: `docker network create --driver=bridge --ipv6 --subnet=<ipv4-net> --subnet=<ipv6-net> <name>`
-    - Create bridged network connected to host interface: `docker network create --driver=bridge --ipv6 --subnet=<ipv4-net> --gateway=<ipv4-gateway> --subnet=<ipv6-net> --gateway=<ipv6-gateway> -o "com.docker.network.bridge.name=<host-if> <name>`
+    - Create bridged network: `docker network create --driver=bridge [--subnet=<ipv4-net>] --ipv6 --subnet=<ipv6-net> <name>`
+    - Create bridged network connected to host interface: `docker network create --driver=bridge --subnet=<ipv4-net> --gateway=<ipv4-gateway> --ipv6 --subnet=<ipv6-net> --gateway=<ipv6-gateway> -o "com.docker.network.bridge.name=<host-if> <name>`
     - Run container with network: `docker run --network=<net-name> --ip=<ipv4-addr> --ip6=<ipv6-addr> --dns=<dns-server> <image>`
 
 ## Docker Compose

+ 1 - 1
config/linux-general/examples.md

@@ -75,7 +75,7 @@ breadcrumbs:
 
 - Set the CPU frequency scaling governor mode:
     - High performance: `echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor`
-    - Power save: ` echo powersave | ...`
+    - Power save: `echo powersave | ...`
 - Show current core frequencies: `grep "cpu MHz" /proc/cpuinfo | cut -d' ' -f3`
 
 ### Processes and Memory

+ 1 - 0
config/linux-server/applications.md

@@ -308,6 +308,7 @@ This is not considered secure at all and should only be used on trusted networks
 
 - Many OpenSSL default options are insecure and must be specified.
 - Specifying `-noout -text` prints the data as formatted text instead of raw Base64.
+- Create self-signed cert: `openssl req -new -x509 -sha256 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 3650 -subj "/C=ZZ/ST=Local/L=Local/O=Local/OU=Local/CN=localhost"`
 
 ## Pi-hole (Docker)