RancherOS 极简主义

0x1 InI

如果你不希望为了使用Docker 而增加负担,不妨试试这个RancherOS

NAME : RancherOS

SITE : https://rancher.com/

RESUME: 一个极轻量且安全的Linux发行版。它由容器构建,将赋予您更好的容器运行体验。

0x2 INSTALL BY VMWARE

Booting from ISO	https://releases.rancher.com/os/latest/vmware/rancheros.iso
For docker-machine https://releases.rancher.com/os/latest/vmware/rancheros-autoformat.iso
VMDK https://releases.rancher.com/os/latest/vmware/rancheros.vmdk
Initrd https://releases.rancher.com/os/latest/vmware/initrd

0x21 Set Up VM

image-20210608221201817

开机注意连接 ISO

0x22 Power on VM

image-20210608221456216

0x23 cloud-config.yml

### cloud-config.yml
rancher:
docker:
registry_mirror: https://docker.mirrors.ustc.edu.cn
network:
interfaces:
eth0:
dhcp: true
eth1:
dhcp: true
dns:
nameservers:
- 223.5.5.5
- 223.6.6.6

ssh_authorized_keys:
- ssh-rsa
- ssh-rsa

0x24 config & install

# vmware 窗口 输入命令 : 
sudo passwd rancher

# xshell / cmd
ssh rancher@192.168.52.132
vi cloud-config.yml
i
# 把改好的内容复制进去
sudo fdisk -l # 查看你的硬盘
sudo ros install --cloud-config cloud-config.yml --device /dev/sda # 两次y确认
# 接下来会重启,直接使用密钥连接即可,注意配置 sshd 安全
# 可以参考下面配置配置 docker 加速

0x25 daemon.json

// /etc/docker/daemon.json
{
"registry-mirrors": [
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn"
],
"dns": [
"223.5.5.5",
"8.8.8.8"
]
}

0x3 PLAY & WORK

0x31 DBJ

docker run -it --name dbj -p 5000:5000 xrsec/dbj:latest

image-20210608230508425

0x32 V2RAYA

docker run -d \
--restart=always \
--privileged \
--network=host \
--name v2raya \
-v /lib/modules:/lib/modules \
-v /etc/resolv.conf:/etc/resolv.conf \
-v /etc/v2raya:/etc/v2raya \
mzz2017/v2raya

image-20210608230923862

0x33 DDNS-GO

docker run -d \
--name ddns-go \
--restart=always \
--net=host \
-v /opt/ddns-go:/root \
jeessy/ddns-go

image-20210608231108799

0x34 COBALTSTRIKE

docker run -it \
--name cs \
-e "passwd=123456" \
-e "server_ip=192.168.52.132" \
-e "server_port=53235" \
-e "aliasname=Bing Wallpaper" \
-e "dname=CN=www.microsoft.com, OU=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=WA, C=US" \
-p 50000:50000 \
-p 443:443 \
-p 80:80 \
-p 50000:50000/udp \
-p 443:443/udp \
-p 80:80/udp \
registry.cn-hangzhou.aliyuncs.com/xrsec/cobaltstrike:4.3-tgb

image-20210608231526719

0x35 AWVS

docker run -it -d \
--name awvs \
-p 3443:3443 \
xrsec/awvs:v14

image-20210608232106764

. . .

BUG❌

万万不可删除以下容器,也不要使用 sudo 命令 , 需要用到 sudo 命令 务必三思

image-20210608225957734

  • docker rm -f $(docker ps -qa) # 不要尝试这个命令 堪比 rm -rf
  • 其他问题欢迎留言