为树莓派配置IPV6公网地址

树莓派 同时被 2 个专栏收录
1 篇文章 0 订阅
2 篇文章 0 订阅

为树莓派配置IPV6公网地址

使用6plat服务为树莓派配置IPV6地址

  • 前提是树莓派已安装openvpn且已申请到6plat的个人账号

1.新建文件输入以下内容并保存为client.ovpn

client
dev tun
proto tcp
remote 46.6plat.org 9185
comp-lzo
resolv-retry infinite
nobind
persist-key
persist-tun
setenv CLIENT_CERT 0
auth-user-pass
remote-cert-tls server
verb 3
sndbuf 0
rcvbuf 0
cipher none
<ca>
-----BEGIN CERTIFICATE-----
MIIE3zCCA8egAwIBAgIJAJVvrlqcS4YsMA0GCSqGSIb3DQEBCwUAMIGlMQswCQYD
VQQGEwJDTjEQMA4GA1UECBMHQmVpamluZzEQMA4GA1UEBxMHQmVpamluZzESMBAG
A1UEChMJNnBsYXQub3JnMRMwEQYDVQQLEwo2cGxhdGdyb3VwMRUwEwYDVQQDEww2
cGxhdC5vcmcgQ0ExEDAOBgNVBCkTB0Vhc3lSU0ExIDAeBgkqhkiG9w0BCQEWETZw
bGF0QGJpaWdyb3VwLmNuMB4XDTE3MDEwNDA5MTc1NVoXDTI3MDEwMjA5MTc1NVow
gaUxCzAJBgNVBAYTAkNOMRAwDgYDVQQIEwdCZWlqaW5nMRAwDgYDVQQHEwdCZWlq
aW5nMRIwEAYDVQQKEwk2cGxhdC5vcmcxEzARBgNVBAsTCjZwbGF0Z3JvdXAxFTAT
BgNVBAMTDDZwbGF0Lm9yZyBDQTEQMA4GA1UEKRMHRWFzeVJTQTEgMB4GCSqGSIb3
DQEJARYRNnBsYXRAYmlpZ3JvdXAuY24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDpTRpxYttg0EsUYWCE3GKLMPTDXlzVtn93yb9MdgUJkCiGNgaXHQ6Y
NCcOXb3pLIxZN7eYH873ZgAY74+LiEIIAAPn+CTQjTcZ82r92xuSj47mMNd4/CcG
5byC9clsNijsWvJ7Rq2Fy2ynSddWMMkmVGZ8oS3psPc57cEOBUBdhTI4szo6aLE0
N3/AAFpIdfxlTATc5EWFxEk4SMPWAIcqkvZ1ETBit+HHU+Bv2oYcpzzi6jHmVw0d
EofxV0w3AUNUN894mWprBtZKZ+DVqms0+LI3mLWPXsv3m8zYBNTXqgE5p4vJ+E3J
3AzDKH2Rb/coBiy3V2g0Cdgc9vATQ4XzAgMBAAGjggEOMIIBCjAdBgNVHQ4EFgQU
M/hZJqaKeV9UVH6WoS7iwAk8/Q0wgdoGA1UdIwSB0jCBz4AUM/hZJqaKeV9UVH6W
oS7iwAk8/Q2hgaukgagwgaUxCzAJBgNVBAYTAkNOMRAwDgYDVQQIEwdCZWlqaW5n
MRAwDgYDVQQHEwdCZWlqaW5nMRIwEAYDVQQKEwk2cGxhdC5vcmcxEzARBgNVBAsT
CjZwbGF0Z3JvdXAxFTATBgNVBAMTDDZwbGF0Lm9yZyBDQTEQMA4GA1UEKRMHRWFz
eVJTQTEgMB4GCSqGSIb3DQEJARYRNnBsYXRAYmlpZ3JvdXAuY26CCQCVb65anEuG
LDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBzYlX/RgvViVvcxwGQ
SN9wP32U9aALFI4GCQz6ODrlYVx4m00zJeuR69bjLO3NZgMv6LtcovbuME+FYq/4
uXJJIfMlo2S/kKp5dBaGk9ERx0xs2OLAKyzc4wgx5zah5Nke1NhdYdCB6Lj6tM+s
vthNz2SWpcctvlOvV+5IdVrefiaLl7RBgf2j81DYmPCILZwHo8rQ0zKppgqAFcFk
tDO0FnHQcwe6xfTE1cIoOU39t+hTnvxQDBW4p9xkxX0hAFnNV41OadgEwxqyo6J0
BZ4dtEw8E9FFF8ewWl897xSv6AMPZTizFl3OReE376Kgv+gtFlSuj4kizCd7uiRp
o5ab
-----END CERTIFICATE-----
</ca>

2. 运行

sudo openvpn client.ovpn

注意:一定要加sudo否则会提示权限不允许

然后输入用户名和密码
在这里插入图片描述

成功后的最后一行信息:

Sat May 11 22:46:41 2019 Initialization Sequence Completed

3. 测试

访问 test-ipv6.com 或者使用另一台在ipv6网内的pc ping一下:
在这里插入图片描述
成功!

  • 2
    点赞
  • 3
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值