docker一些自己的玩法

docker十分方便,免去环境部署的重复性。

一、安装

一键部署docker,运行2条命令就够了。

  • curl -fsSL https://get.docker.com -o get-docker.sh
  • sh get-docker.sh

 二、一些玩法

 

1、配置Debian、alpine系统

  • docker run -d -it --privileged -p 10022:22 --name debian10 debian:buster /bin/bash
  • docker exec -it debian10 /bin/bash
  • #以上的Debian buster
  • docker run -d -it --privileged -p 10022:22 --name alpine alpine /bin/ash
  • docker exec -it debian10 /bin/ash
  • #以上是alpine (/bin/ash可以是/bin/sh、ash、sh)

然后就可以像开小鸡一样折腾Debian、alpine系统了。

 

2、softeher

  • client设置
  • wget --no-check-certificate -O - https://github.com/SoftEther扶墙/SoftEther扶墙/archive/${SOFTETHER_VERSION}.tar.gz | tar xzf - ; \
  • cd SoftEther扶墙-${SOFTETHER_VERSION:1} ;
  • make
  • makeinstall
  • make clean
  • ./扶墙client start
  • ./扶墙cmd
  • 扶墙cmd command - SoftEther 扶墙 Command Line Management Utility
  • SoftEther 扶墙 Command Line Management Utility (扶墙cmd command)
  • Version 4.22 Build 9634 (English)
  • Compiled 2016/11/27 14:33:59 by yagi at pc30
  • Copyright (c) SoftEther 扶墙 Project. All Rights Reserved.
  • By using 扶墙cmd program, the following can be achieved.
  • 1. Management of 扶墙 Server or 扶墙 Bridge
  • 2. Management of 扶墙 Client
  • 3. Use of 扶墙 Tools (certificate creation and Network Traffic Speed Test Tool)
  • Select 1, 2 or 3: 2
  • Specify the host name or IP address of the computer that the destination 扶墙 Client is operating on.
  • If nothing is input and Enter is pressed, connection will be made to localhost (this computer).
  • Hostname of IP Address of Destination:
  • Connected to 扶墙 Client "localhost".
  • 扶墙 Client>NicCreate 扶墙
  • 扶墙 Client>AccountCreate myconnection
  • AccountCreate command - Create New 扶墙 Connection Setting
  • Destination 扶墙 Server Host Name and Port Number: [host or IP]:443
  • Destination Virtual Hub Name: HUB
  • Connecting User Name: test
  • Used Virtual Network Adapter Name: myadapter
  • The command completed successfully.
  • 扶墙 Client>AccountPasswordSet myconnection
  • AccountPasswordSet command - Set User Authentication Type of 扶墙 Connection Setting to Password Authentication
  • Please enter the password. To cancel press the Ctrl+D key.
  • Password: ********
  • Confirm input: ********
  • Specify standard or radius: standard
  • The command completed successfully.
  • 扶墙 Client>AccountConnect myconnection
  • AccountConnect command - Start Connection to 扶墙 Server using 扶墙 Connection Setting
  • The command completed successfully.
  • 扶墙 Client>AccountStatusGet myconnection
  • 扶墙 Client>AccountList
  • 扶墙 Client>AccountStartupSet myconnection
  • 扶墙 Client>exit
  • dhclient 扶墙_扶墙
  • ip addr show 扶墙_扶墙
  • vi /etc/sysctl.conf net.ipv4.ip_forward=1
  • sysctl -p
  • ip route
  • ip route add server_ip/32 via 192.168.0.1(defautl ip gateway) dev eth0(default eth)
  • ip route del default via 192.168.0.1(defautl ip gateway) dev eth0(default eth)
  • dhclient 扶墙_扶墙
  • curl ip.sb
扶墙二字换成VXN

 

 

版权声明:
作者:Lewss
链接:https://www.amzcn.com/thread-041934-1.html
来源:AmzCN – 普通人的普通世界
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>
文章目录

一、安装

 二、一些玩法

1、配置Debian、alpine系统

2、softeher

关闭
目 录