找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2960|回复: 11

[N1盒子] N1盒子Armbian系统下pull安装Docker版OpenWrt

[复制链接]
本帖最后由 molun 于 2020-3-17 14:46 编辑

拉取Openwrt Docker镜像
  1. docker pull unifreq/openwrt-aarch64:latest
复制代码
或者
  1. docker pull unifreq/openwrt-aarch64:r20.03.11
复制代码


开启网卡混杂模式
  1. ip link set eth0 promisc on
复制代码
*部分教程含有以下命令(了解的朋友告知下作用)
  1. modprobe pppoe
复制代码


创建docker虚拟网络
  1. docker network create -d macvlan --subnet=192.168.2.0/24 --gateway=192.168.2.1 -o parent=eth0 macnet
复制代码
(名称:macnet,模式:macvlan)


*查看已创建:
  1. docker network ls
复制代码


开启openwrt容器
  1. docker run --name OpenWrt --restart always -d --network macnet --privileged unifreq/openwrt-aarch64:latest /sbin/init
复制代码
或者
  1. docker run --restart always -d --network macnet --privileged unifreq/openwrt-aarch64:r20.03.11 /sbin/init
复制代码
导入的包名称保持一致的情况下,后面的/sbin/init可以省略


镜像来源于flippy

我的恩山、我的无线 The best wifi forum is right here.
 楼主| | 显示全部楼层
其他镜像
  1. docker pull kanshudj/n1-openwrtgateway:latest
复制代码
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
本帖最后由 molun 于 2020-3-17 15:20 编辑


Portainer中修改管理地址



  1. vi /etc/config/network
复制代码
nano不起作用




  1. config interface 'loopback'
  2.         option ifname 'lo'
  3.         option proto 'static'
  4.         option ipaddr '127.0.0.1'
  5.         option netmask '255.0.0.0'

  6. config globals 'globals'
  7.         option ula_prefix 'fd07:60bf:5dc0::/48'

  8. config interface 'lan'
  9.         option type 'bridge'
  10.         option ifname 'eth0'
  11.         option proto 'static'
  12.         option ipaddr '192.168.2.3'
  13.         option netmask '255.255.255.0'
  14.         option gateway '192.168.2.1'
  15.         option dns '114.114.114.114 223.5.5.5 180.76.76.76 8.8.4.4'
  16.         option ip6assign '60'

  17. config interface 'virtual**0'
  18.         option ifname 'tun0'
  19.         option proto 'none'
复制代码
根据自己实际情况修改以下部分
  1. option ipaddr '192.168.2.3'
  2. option netmask '255.255.255.0'
  3. option gateway '192.168.2.1'
  4. option dns '114.114.114.114 223.5.5.5 180.76.76.76 8.8.4.4'
复制代码
示例中192.168.2.3为OpenWrt管理地址

*按 i 进入编辑状态,按Esc,输入:wq!保存并退出编辑



重启网络(也可以重启N1盒子
  1. /etc/init.d/network restart
复制代码
退出后等待重启完成即可登录openwrt管理界面
参考资料地址:https://jkdigger.me/2019/12/02/n1-docker%E7%89%88openwrt%E6%9B%B4%E6%96%B0%E6%96%B9%E6%B3%95/




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

我的路由器ip是192.168.1.1.把option ipaddr '192.168.2.3'改为192.168.1.3
option gateway '192.168.2.1'改为192.168.1.1.是这样的吗?

点评

对的,这样你的管理地址就是192.168.1.3  详情 回复 发表于 2020-3-19 15:45
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

docker network create -d macvlan --subnet=192.168.2.0/24 --gateway=192.168.2.1 -o parent=eth0 macnet.这个docker虚拟网络需要改吗?

点评

需要改成 192.168.1.0/24 192.168.1.1  详情 回复 发表于 2020-3-17 21:46
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

wq669 发表于 2020-3-17 21:15
docker network create -d macvlan --subnet=192.168.2.0/24 --gateway=192.168.2.1 -o parent=eth0 macnet ...

需要改成 192.168.1.0/24   192.168.1.1
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

好的,谢谢!!!!!!!!!!!!!!!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

你这个 ipsec可以用么   我刷的用不成  u盘的可以用 docker的不行
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
wq669 发表于 2020-3-17 21:11
我的路由器ip是192.168.1.1.把option ipaddr '192.168.2.3'改为192.168.1.3
option gateway '192.168.2.1' ...

对的,这样你的管理地址就是192.168.1.3
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

这个日志太详细了。点赞。
有个小问题,我在执行modprobe pppoe,出现错误。modprobe: module pppoe not found in modules.dep
我估计我是使用openwrt做为旁路由,因此docker主机没有pppoe。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

pppoe是用来拨号的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-28 03:30

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表