Network service
免費憑證: 使用 Traefik proxy + Let’s Encrypt 幫網站加密 – Configure Traefik to use an ACME provider (Let’s Encrypt) for automatic certificate generation.
Configure Traefik to use an ACME provider (Let’s Encrypt) for automatic certificate generation.
[memo] 設定 Ubuntu 固定 IP/ How to Configure Static IP Address on Ubuntu Server/Desktop
手動改 : sudo ifconfig eth0 192.168.0.1 netmask 255.255.255.0
在 /etc/netplan/00-installer-config.yaml
用 DHCP 取 IP
# more 00-installer-config.yaml # This is the network config written by 'subiquity' network: ethernets: enp0s3: dhcp4: true version: 2
增加 /etc/netplan/01-netcfg.yaml
network: version: 2 renderer: networkd ethernets: eno1: dhcp4: no addresses: - 192.168.100.33/24 gateway4: 192.168.100.1 nameservers: addresses: [8.8.8.8, 1.1.1.1]
需 rm /etc/netplan/00-installer-config.yaml
免得跟原來的config衝突,
再執行
sudo netplan apply
OVH:
Some sample …
for office lan
network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: no addresses: - 192.168.1.11/24 gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8, 1.1.1.1]
[docker] docker tag command 用 filebeat 為例, 放到內部 docker image server
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
URL: https://docs.docker.com/engine/reference/commandline/tag/
Use these steps:
1. 拉下原始 filebeat image
docker pull docker.elastic.co/beats/filebeat:7.14.0
2. 另取一個名字
docker tag docker.elastic.co/beats/filebeat:7.14.0 ai.ruten.tw:32767/filebeat:7.14.0
3. 放到內部的 iamge server
docker push ai.ruten.tw:32767/filebeat:7.14.0
[docker] 用 docker 建立 ipsec vpn server
—
URL: https://github.com/hwdsl2/docker-ipsec-vpn-server
# docker run \ --name ipsec-vpn-server \ --env-file ./vpn.env \ --restart=always \ -p 500:500/udp \ -p 4500:4500/udp \ -v /lib/modules:/lib/modules:ro \ -d --privileged \ hwdsl2/ipsec-vpn-server # # docker logs ipsec-vpn-server # docker exec -it ipsec-vpn-server ipsec status # docker exec -it ipsec-vpn-server ipsec whack --trafficstatus
ssh backup command
tar zcvf – KeepTheseFiles | ssh user@desthost ‘cat > KeepTheseFiles.tgz’