mirror of
https://github.com/oneclickvirt/oneclickvirt.github.io.git
synced 2026-05-23 10:21:29 +08:00
update
This commit is contained in:
@@ -381,9 +381,21 @@ This method will provide a way to split a /80 out of the IPV6 segment on A and a
|
||||
|
||||
If you need to use this set of scripts to configure IPV6 addresses for containers with a single click on the server where B resides, then what you need to install is ```ifupdown2``` for network management
|
||||
|
||||
### Features
|
||||
|
||||
- [x] Self-built IPv6 tunnel for sit/gre/ipip protocols
|
||||
- [x] Support to customize the IPV6 subnet size to be cut out, and the appropriate IPV6 subnet information in CIDR format will be calculated automatically.
|
||||
- [x] Automatically recognizes the IPV6 subnet size of the server side
|
||||
- [x] will automatically set up the tunnel server and print the commands that the client needs to execute
|
||||
- [x] Setting up the IPV6 tunnel is easy to understand and easy to remove
|
||||
|
||||
### Environmental Preparation
|
||||
|
||||
A dual-stack VPS (A) with an IPV6 segment of at least /64 size and an IPV4 address and a VPS (B) with only one IPV4 address, hereafter referred to as server and client, respectively, are split so that the client will be given an IPV6 subnet of /80.
|
||||
| VPS(A) | VPS(B) |
|
||||
| --------|--------|
|
||||
| one IPV4 address (server_ipv4) | one IPV4 address (clinet_ipv4) |
|
||||
| one IPV6 subnet | no IPV6 address |
|
||||
| Hereafter referred to as server | Hereafter referred to as server client |
|
||||
|
||||
### Usage
|
||||
|
||||
@@ -399,11 +411,18 @@ Execute it
|
||||
./6in4.sh client_ipv4 <mode_type>
|
||||
```
|
||||
|
||||
mode_type: sit、gre、ipip
|
||||
| Options | Optional Option 1 | Optional Option 2 | Optional Option 3 |
|
||||
|--------|--------|--------|--------|
|
||||
| <mode_type> | gre | sit | ipip |
|
||||
| <subnet_size> | 64 | 80 | 112 |
|
||||
|
||||
Remember to write the IPV4 address and protocol type of the machine you need to attach IPV6 (not fill in the default sit type), after the execution is completed, it will send back the commands you need to be executed in the client, see the instructions after the execution.
|
||||
```<mode_type>``` only support those three protocols for now, the more advanced the more recommended, no fill in the default is ```sit``` protocol
|
||||
|
||||
In case you forget to copy the command, the command itself will also be written to the 6in4.log file in the current path
|
||||
```<subnet_size>``` as long as it is larger than the original system subnet mask, and is a multiple of 2, if you don't fill it in, it defaults to ```80```.
|
||||
|
||||
Remember to replace ```client_ipv4``` with the IPV4 address of the machine you want to attach IPV6 to, and the command you need to execute on the client side will be sent back to you after execution, see the instructions after execution for details.
|
||||
|
||||
To prevent you from forgetting to copy the commands, the commands themselves will be written to the ```6in4.log``` file under the current path, you can use ```cat 6in4.log``` to query the commands that need to be executed on the client side
|
||||
|
||||
For copied commands, be sure to select option ``6in4`` in [https://ipv6tunnel.spiritlhl.top/](https://ipv6tunnel.spiritlhl.top/) before converting!
|
||||
|
||||
@@ -411,7 +430,7 @@ Then the page will be refreshed automatically and you need to modify the content
|
||||
|
||||
```
|
||||
sudo tee -a /etc/network/interfaces <<EOF
|
||||
# Modify the
|
||||
# Modify here
|
||||
EOF
|
||||
```
|
||||
|
||||
|
||||
@@ -329,13 +329,25 @@ systemctl restart networking
|
||||
|
||||
相关仓库:[https://github.com/oneclickvirt/6in4](https://github.com/oneclickvirt/6in4)
|
||||
|
||||
该方法将提供一种方式,将A上的IPV6网段拆分一个/80的出来,附加到B上使用
|
||||
该方法将提供一种方式,将A上的IPV6网段拆分一个子ipv6网段的出来,附加到B上使用
|
||||
|
||||
如果你需要在B所在的服务器上使用本套脚本给容器一键配置IPV6地址,那么需要安装的是```ifupdown2```进行网络管理
|
||||
|
||||
### 功能
|
||||
|
||||
- [x] 自建sit/gre/ipip协议的IPv6隧道
|
||||
- [x] 支持自定义要切分出来的IPV6子网大小,将自动计算出合适的CIDR格式的IPV6子网信息
|
||||
- [x] 自动识别服务端的IPV6子网大小
|
||||
- [x] 将自动设置隧道服务端并打印客户端需要执行的命令
|
||||
- [x] 设置IPV6隧道的方法简单易懂,易于删除
|
||||
|
||||
### 环境准备
|
||||
|
||||
一个带有 至少/64大小的IPV6网段和一个IPV4地址的 双栈VPS (A) 和 一个只带有一个IPV4地址的VPS (B),下面分别称为服务端和客户端,拆分后客户端将获得一个/80的IPV6子网。
|
||||
| VPS(A) | VPS(B) |
|
||||
|--------|--------|
|
||||
| 一个IPV4地址(server_ipv4) | 一个IPV4地址(clinet_ipv4) |
|
||||
| 一个IPV6子网 | 无IPV6地址 |
|
||||
| 以下称之为服务端 | 以下称之为服务端客户端 |
|
||||
|
||||
### 使用方法
|
||||
|
||||
@@ -348,14 +360,21 @@ curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4
|
||||
执行命令
|
||||
|
||||
```
|
||||
./6in4.sh client_ipv4 <mode_type>
|
||||
./6in4.sh client_ipv4 <mode_type> <subnet_size>
|
||||
```
|
||||
|
||||
mode_type: sit、gre、ipip
|
||||
| 选项 | 可选的选项1 | 可选的选项2 | 可选的选项3 |
|
||||
|--------|--------|--------|--------|
|
||||
| <mode_type> | gre | sit | ipip |
|
||||
| <subnet_size> | 64 | 80 | 112 |
|
||||
|
||||
记得写上你需要附加IPV6的机器的IPV4地址和协议类型(不填则默认为sit类型),执行完毕后会回传你需要在客户端执行的命令,详见执行后的说明即可
|
||||
```<mode_type>```暂时只支持那三种协议,越靠前的越推荐,不填则默认为```sit```协议
|
||||
|
||||
为防止忘记复制命令,命令本身也将写入到当前路径下的 6in4.log 文件中
|
||||
```<subnet_size>```只要比原系统子网掩码大就行,且是2的倍数,不填则默认为```80```
|
||||
|
||||
记得```client_ipv4```替换为需要附加IPV6的机器的IPV4地址,执行完毕后会回传你需要在客户端执行的命令,详见执行后的说明即可
|
||||
|
||||
为防止忘记复制命令,命令本身也将写入到当前路径下的```6in4.log```文件中,可使用```cat 6in4.log```查询客户端需要执行的命令
|
||||
|
||||
复制下来的命令,务必在 [https://ipv6tunnel.spiritlhl.top/](https://ipv6tunnel.spiritlhl.top/) 中选择选项```6in4```后进行转换
|
||||
|
||||
|
||||
Reference in New Issue
Block a user