找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: h***

[N1盒子] 【原创】Docker内OpenWRT设置成主路由,为WiFi接入的客户提供源自有线网口的网络服务

 火.. [复制链接]
发表于 2020-2-10 05:41 来自手机 | 显示全部楼层
不过我还是有些疑问,希望楼主不吝赐教。1,为什么很少看到op是运行在host模式下?2,为什么运行host模式宿主就断连。以及以上两个疑问,是否都和抢占宿主网络和端口有关呢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-2-10 15:17 | 显示全部楼层
俺也是半路出家,自学成才,理论知识欠缺,还望有高手指点。

我的几篇帖子都是自己跌打滚爬的成果,也试过host方案,确实不成功,不明就里
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-3-1 10:22 | 显示全部楼层
本帖最后由 angelazy 于 2020-3-1 10:42 编辑

2 网络设置
# vi /etc/network/interfaces
...
iface eth0 inet dhcp
...
iface wlan0 inet manual
...
# vi /etc/network/interfaces.d/bridge
auto br-lan
iface br-lan inet static
address 10.168.10.1
netmask 255.255.255.0
dns-nameservers 10.168.10.10
gateway 10.168.10.10
bridge_ports wlan0
# vi /etc/default/hostapd
...
DAEMON_CONF="/etc/hostapd.conf"
...
# vi /etc/hostapd.conf
...
interface=wlan0
...
bridge=br-lan
driver=nl80211

我刷的是armbian5.77,就想把N1放到另一房间利用一下它发射热点功能,采用pdf文档中上边代码设置当旁路由,设置完重启,可以看到热点名称,输入密码长时间显示获取网络ip,最后超时无法连接,大老,问题在哪里呢,在线等,现在就这个问题没法解决了,我的主路由ip:192.168.31.1      n1有线网口获得的地址是192.168.31.18   上边代码我一个也没有改动,是不是ip设置有问题??

我把我的/etc/network/interfaces文件内容放上来,大佬帮忙看看哪里有问题:


source /etc/network/interfaces.d/*
# Wired adapter #1
allow-hotplug eth0
no-auto-down eth0
iface eth0 inet dhcp
#address 192.168.0.100
#netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 8.8.8.8 8.8.4.4
#        hwaddress ether # if you want to set MAC manually
#        pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838
# Wireless adapter #1
# Armbian ships with network-manager installed by default. To save you time
# and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
# manually. The below lines are only meant as an example how configuration could
# be done in an anachronistic way:
#
#allow-hotplug wlan0
iface wlan0 inet manual
#address 192.168.0.100
#netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 8.8.8.8 8.8.4.4
#   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
#wireless-mode Managed
#wireless-power off
# Local loopback
auto lo
iface lo inet loopback





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

使用道具 举报

 楼主| 发表于 2020-3-1 12:13 | 显示全部楼层
无线工作正常。

DHCP服务异常,所以无法分配IP。建议查看dnsmasq是否正常工作。以前我就发现设置文件错误,导致开机后dnsmasq并未运行。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-3-10 04:17 | 显示全部楼层
找了好久  终于找到你
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-9-10 19:47 | 显示全部楼层
厉害了 大神
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-10-9 23:01 来自手机 | 显示全部楼层
马克 感谢分享!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-10-12 14:18 | 显示全部楼层
你好,能写详细点吗?我实在是太白了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-9-22 23:23 | 显示全部楼层
您好,我想请教一下,在centos的docker装openwrt,能不做当做主路由拨号使用?按理说,都是Linux,应该都一样啊,但是我按照您的教程,弄到vi /etc/network/interfaces这一步就蒙圈了,因为系统提示没有interfaces这个文件,就算新建一个,我也不知道该往里面写啥。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2023-1-27 21:53 | 显示全部楼层
学习一下思路
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2023-1-27 21:53 | 显示全部楼层
好好学习一下wifi配置思路
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2023-2-5 20:12 | 显示全部楼层
你好,盒子改成wifi连接了,openwrt不能联网,需要怎样设置?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2024-1-17 12:44 | 显示全部楼层
Docker内OpenWRT设置成主路由,为WiFi接入的客户提供源自有线网口的网络服务
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-26 05:08

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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